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 carnitron, Today, 08:42 PM
    0 responses
    5 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Today, 07:51 PM
    0 responses
    6 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,974 views
    3 likes
    Last Post jhudas88  
    Started by rbeckmann05, Today, 06:48 PM
    0 responses
    8 views
    0 likes
    Last Post rbeckmann05  
    Started by rhyminkevin, Today, 04:58 PM
    4 responses
    58 views
    0 likes
    Last Post dp8282
    by dp8282
     
    Working...
    X