Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

instrument pairs, PSar stop

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

    instrument pairs, PSar stop

    Hi,
    1. what code do i need to define instrument pairs?
    (I.e. if retail leads SPY, enter long.....)

    2. I wanted to use a Parabolic Sar Trail Stop, but this might not the way to build it:
    SetTrailStop("",CalculationMode.Ticks,(ParabolicSA R(0.02, 0.2, 0.02)[0]);

    #2
    Hello,

    Thanks for the forum post.

    This unfortunately would require multi series programming to bring in the secondary data point which would be the other instrument. How to do this is detailed here.



    On your secont question you wouldnt use SetTrailStop() you would instead use SetStopLoss() then set it to CalculationMode.Price and add in the indicator output as the price. Then you will want to use this sample code to constantly update it and move the stop up when the SAR tightens.



    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      How would i do that to set indicator output as price?

      I did that so far but get error message "overload"
      SetStopLoss("",CalculationMode.Price, (ParabolicSAR(0.02, 0.2, 0.02)[0]));

      Comment


        #4
        You have too many parameters for this overload of SetStopLoss().

        Try this instead:

        SetStopLoss(CalculationMode.Price, (ParabolicSAR(0.02, 0.2, 0.02)[0]));
        BrettNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        117 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        166 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        85 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        130 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        88 views
        0 likes
        Last Post PaulMohn  
        Working...
        X