Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi Time Frame PSAR question

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

    Multi Time Frame PSAR question

    When I run the following code segment in the Strategy Analizer:

    protectedoverridevoid Initialize()
    {
    Add(ParabolicSAR(
    0.02, 0.2, 0.02));
    Add(PeriodType.Day,
    1);
    TraceOrders =
    true;
    CalculateOnBarClose =
    false;
    }
    ///<summary>
    /// Called on each bar update event (incoming tick)
    ///</summary>
    protectedoverridevoid OnBarUpdate()
    {
    if (BarsInProgress == 0)
    {
    DrawDot(
    "D"+CurrentBar.ToString(), 0, ParabolicSAR(BarsArray[1],0.02,0.02,0.2)[0], Color.Blue);
    }
    }

    It draws the PSAR values for my backtest time frame - as expected - and draws a blue dot at what I would expect to be the PSAR value for the Daily time frame.

    However, when I run this in the Analizer at a Day=1 time frame the blue dot and the normal PSAR do not match up. Shouldn't they - I mean they are both indicating a PSAR value for a the same single day.

    Does that make sense?

    #2
    cht time

    Yes, i am running 6.5.0.10,

    Comment


      #3
      So I tried this again... under the assumption I was doing something wrong the first time.

      This time I did the same strategy except I used an EMA(10) instead of the PSAR.

      The result... just as I would have expected. When run in a Day=1 time frame the value of the EMA(BarsArray[1],10)[0], as show by a blue dot, was drawn at the exact same value as the EMA(10) for the prior day.

      Can anyone help explain why this does not work with PSAR?

      Comment


        #4
        Hi kgillis23,

        The reason is probably because you are passing in different parameters.

        Add(ParabolicSAR(0.02, 0.2, 0.02));
        ParabolicSAR(BarsArray[
        1],0.02,0.02,0.2)[0]
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          So I noticed that I recently went from a "Junior Member" to a certified "Member" on this forum. If ask to many stupid questions do I get demoted back to "Junior"?

          Yup, you hit it right on the money, my PSAR paramters were wrong. Can I blame my failing eye sight and get away with it?

          Thanks again... but I'm afraid I can't make any promises... I am sure I can come up with more stupid questions

          Comment


            #6
            Hah. No worries. Those small things get us all.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            647 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            368 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
            571 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            573 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X