Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using Time as a variable

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Using Time as a variable

    Is it possible to substitute a variable for time, instead of fixing time in a strategy? The ToTime() documentation shows an example where

    if (ToTime[0] >= 74500 && ToTime(Time[0]) <= 134500)

    I would like to substitute a variable for the 74500 value and the 134500 value
    such as "starttradetime" "and endtradetime"

    When I do that as below, I get a CS1026 error message. Is this documented somewhere> I tried searching the forum but I must not be phrasing the search properly because I can find nothing about it.
    Thanks
    DaveN

    #2
    Just use an int variable. 74500 is an int value.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by arvidvanstaey, Today, 02:19 PM
    0 responses
    2 views
    0 likes
    Last Post arvidvanstaey  
    Started by mmckinnm, Today, 01:34 PM
    3 responses
    5 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by f.saeidi, Today, 01:32 PM
    2 responses
    5 views
    0 likes
    Last Post f.saeidi  
    Started by alifarahani, 04-19-2024, 09:40 AM
    9 responses
    55 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by Conceptzx, 10-11-2022, 06:38 AM
    3 responses
    60 views
    0 likes
    Last Post NinjaTrader_SeanH  
    Working...
    X