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 argusthome, 03-08-2026, 10:06 AM
        0 responses
        72 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        44 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        25 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        29 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        60 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X