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 NullPointStrategies, Today, 05:17 AM
    0 responses
    50 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    126 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    69 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X