Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy that only trails a stop

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

    Strategy that only trails a stop

    I am trying to create a strategy that is only used to trail a stop based on the ParabolicSAR. I am able to do this in a "full" strategy that enters positions and then trails the stop based on ParabolicSAR, so I know that part of the code works. My problem occurs in the strategy that will only trail the stop from a position that was entered manually. I can't seem to have the strategy get the correct atmstrategyId of the working orders and I'm unable to have it get the entry price. I have been using
    atmStrategyId = GetAtmStrategyUniqueId();
    which seems to get random ID's and
    if (GetAtmStrategyMarketPosition(atmStrategyId) != MarketPosition.Flat)
    entryPrice = GetAtmStrategyPositionAveragePrice(atmStrategyId);
    for the entry price which isn't working either.
    I'm wondering if this is even possible (getting the strategy ID from manually placed orders). Any help would be appreciated.

    Thank you

    #2
    Hello mlarocco,

    Thank you for your post.

    As you have guessed, this is unfortunately not possible with manual entries.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    59 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    143 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    161 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    97 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    276 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X