Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Closes with Indicator Trailing Stop

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

    Closes with Indicator Trailing Stop

    I have a strategy running on a NQ 12-20 chart that is executing trades on a secondary instrument MNQ 12-20

    AddDataSeries("MNQ 12-20", Data.BarsPeriodType.Tick, 1, Data.MarketDataType.Last);


    I want to create an exit if the primary instrument NQ 12-20 trades below the ATR trailing stop.


    if (BarsInProgress == 1)
    && Closes[0][0] <= AtrTrailingOnClose1.Upper[1])
    && Position.MarketPosition == MarketPosition.Long)

    Will this reference the AtrTrailingOnClose1 from the primary chart?


    I wasn't sure and tried... AtrTrailingOnClose1.Upper[0][1] this caused errors when compiling.



    #2
    Hello sdauteuil,

    Thank you for your note.

    How is your AtrTrailingOnClose1 series set up in State.DataLoaded? If you didn't specify a different series for it to be calculated on, this would calculate on the primary bars series. I'd suggest taking a look at this section of our help guide for a detailed example:



    Please let us know if we may be of further assistance to you.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    93 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    138 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    123 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    73 views
    0 likes
    Last Post PaulMohn  
    Working...
    X