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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    64 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    35 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    59 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    62 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    51 views
    0 likes
    Last Post CarlTrading  
    Working...
    X