Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

set trailing stop

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

    set trailing stop

    Hi,
    my strategy is calculating based on oneachtick and I am using SetTrailStop(@"Long", CalculationMode.Ticks, StopLossDistanceInTicks, false); to trail the stop. Now, is it possible to update the trailing stop only on bar close? I am using the settrailstop method in state.configure? If yes, can you please suggest?

    #2
    Hello asmmbillah,

    Thanks for the post.

    The SetTrailStop would follow the scripts Calculate setting so that would not be possible with that method specifically. You could submit your own stop order using SetStopLoss instead of using the SetTrailStop and then control the trailing from OnBarUpdate. In OnBarUpdate you can add a condition that uses IsFirstTickOfBar to simulate OnBarClose.





    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    681 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    386 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    111 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    584 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    585 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X