Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help with strategy

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

    Help with strategy

    I have constructed a simple crossover strategy (futures w/minute chart)and have a question on exiting the trade.

    Once in a Long trade, I would like to exit (market order) if there are two consecutive bars where the close of each bar is lower than the open, or ... once in a Short trade, I would like to exit (market order) if there are two consecutive bars where the close of each bar is higher than the open.

    Can anyone tell me how to write that in the NinjaScript conditions and actions screen ?

    Any help would be appreciated.

    #2
    Sure. In that page just select the Close on the left hand side, make it bars ago=0, then do < in the middle, then on the right hand side choose Open and do bars ago=0. Repeat with bars ago=1 to add the second condition. Then you can do the exit long order as an action
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by briansaul, Today, 05:31 AM
    0 responses
    1 view
    0 likes
    Last Post briansaul  
    Started by fwendolynlpxz, Today, 05:19 AM
    0 responses
    4 views
    0 likes
    Last Post fwendolynlpxz  
    Started by traderqz, Yesterday, 12:06 AM
    11 responses
    28 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by PaulMohn, Today, 03:49 AM
    0 responses
    8 views
    0 likes
    Last Post PaulMohn  
    Started by inanazsocial, Today, 01:15 AM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_Jason  
    Working...
    X