Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Time since entry

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

    Time since entry

    I am looking to trigger a breakeven stop after x minutes by adding multi time frame to a bars since entry but not sure exactly how to set it up...



    && BarsSinceEntry(BarsArray[1],"L1") >=1

    ie. entry on 5 minute but breakeven after 1 hour.

    Thanks.
    Last edited by brucelevy; 10-05-2016, 09:06 PM.

    #2
    Hello brucelevy, and thank you for your question.

    The easiest way to do this would be to set a stop loss well away from the current price in the Initialize section with SetStopLoss, and then to modify it in OnBarUpdate once the condition you mentioned has passed. If you can provide a more complete code sample, I can modify it directly to demonstrate what I mean.

    Please let us know if there are any other ways we can help.
    Jessica P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Rapine Heihei, Today, 08:19 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by Rapine Heihei, Today, 08:25 PM
    0 responses
    6 views
    0 likes
    Last Post Rapine Heihei  
    Started by f.saeidi, Today, 08:01 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by Rapine Heihei, Today, 07:51 PM
    0 responses
    8 views
    0 likes
    Last Post Rapine Heihei  
    Started by frslvr, 04-11-2024, 07:26 AM
    5 responses
    98 views
    1 like
    Last Post caryc123  
    Working...
    X