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 JoMoon2024, Today, 06:56 AM
    0 responses
    6 views
    0 likes
    Last Post JoMoon2024  
    Started by Haiasi, 04-25-2024, 06:53 PM
    2 responses
    17 views
    0 likes
    Last Post Massinisa  
    Started by Creamers, Today, 05:32 AM
    0 responses
    5 views
    0 likes
    Last Post Creamers  
    Started by Segwin, 05-07-2018, 02:15 PM
    12 responses
    1,786 views
    0 likes
    Last Post Leafcutter  
    Started by poplagelu, Today, 05:00 AM
    0 responses
    3 views
    0 likes
    Last Post poplagelu  
    Working...
    X