Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy with Pivots

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

    Strategy with Pivots

    I think the Pivot indicator is a wonderful indicator, but when I run my strategy where orders are placed determined by where the pivots are, it does not work. On my chart, it says "Insufficient historical data to calculate pivots. Increase chart look back period(days back)". Even if I go back 500 days, it still says that.

    Part of my code reads:
    if (Close[0] < Pivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 20).S1[0]
    && Close[0] > Pivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 20).S2[0]

    .....yet, it takes a trade even if the close is well below S3?? Any ideas?

    #2
    edgeliner, even if your code points to CalcFromIntraday is your indicator applied to the chart perhaps set to use daily data which your connection may not supply? -> http://www.ninjatrader-support.com/H...ricalData.html

    It would suggest you simplify your entry conditions as much as possible and then add a drawing to visually mark the triggered entrypoint to compare, it also looks like the if ( ) statement in your posted code is not properly finishing, so it could be evaluated incorrectly...

    Comment


      #3
      Bertrand.....

      Thanks you....I use GAIN and they do not support Daily Historical Data. That is only part of the code, so it does finish properly. I am confused though because when I run the strategy in Sim mode, it works perfectly?? When I use my live account, it performs completely different trades (making trades below the S2 & S3 levels)?? Is there something that in comparable to PIVOTS that would work similarly?

      Comment


        #4
        edgeliner, it should not matter to which account you execute to as far as generated trades go - I would suggest you add a visual confirmation of a generated signal (like an arrow) and also take proper care to sync strategy vs account positions as explained here - http://www.ninjatrader-support.com/H...tPosition.html

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        648 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        369 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        108 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        572 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        574 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X