• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Parabolic SAR

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

    Parabolic SAR

    Parabolic SAR is one of Ninja's default indicators. It is dispayed as a series of points over or under the stock quotation: the passage from upwards to downwards (or viceversa) would signify a trend reversal.
    Since I'm not very familiar with NinjaScript, does anyone have already configured a strategy file with a sound alert whenever a reversal occurs (red squares in the attachment) ?
    Attached Files

    #2
    fliesen, thanks for the post - while it would not yet have an Alert in, you could see a basic strategty example with PSAR here - http://www.ninjatrader.com/support/f...6&postcount=37

    On the condition seen for entries, a call to the NinjaScript Alert() method could be added in for sure as well.

    http://www.ninjatrader.com/support/h...lightsub=Alert
    BertrandNinjaTrader Customer Service

    Comment


      #3
      thnx

      Very kind from you, I'll try it as soon and as much as possible (hope to be able to).
      Thanks by now

      Comment


        #4
        ParabolicSAR

        Ok, I've looked at that old post # 340729, or 311466. As far as I understand (the used language is more suitable for experts), the reported file "ParabolicSARFix.zip" is just a fix for NT6, but now we have NT7 and we don't need it, since the ParabolicSAR indicator works fine in the newest version.

        Another attached file in the post is "PSARRevNT7.zip": I've explored it and found an "Indicator" and a "Strategy" folder, this one with a file "ParabolicSARRev.cs": what must I do with it ?

        Otherwise, am I wrong if I use Tools -> New NinjaScript -> Strategy -> Create a new strategy -> Next -> (Name & Description) -> Next -> (no user defined) -> Next -> Set1 -> Add Condition -> "ParabolicSAR" Indicator "CrossAbove" Price Data "Median" -> Add Condition -> "ParabolicSAR" Indicator "CrossBelow" Price Data "Median" -> Next -> Do the following -> Add Misc Alert -> OK -> Next -> Finish ?

        Comment


          #5
          Fliesen,

          You would want have two sets otherwise if they are on the same set then both condition must be true which will not occur with the crossabove/below.

          Once you have those separated then you can add the Alert to both sets to accomplish this.
          Cal H.NinjaTrader Customer Service

          Comment


            #6
            Thanks.
            After configuring the strategy, how do I activate it ?
            Is there anything simpler than right-clicking on the Control Center/Strategies tab and selecting "New Strategy" + the single instrument + the Session Template 24/7 as in the attachment, plus repeating this for EACH SINGLE instrument (and for ANY frametime) I want to alert + enabling them all ?
            Attached Files
            Last edited by fliesen; 08-06-2013, 05:37 AM.

            Comment


              #7
              Hi Fliesen,

              Unforunately, the only other way is to add them to the charts themselves via right click and select Strategies...
              Cal H.NinjaTrader Customer Service

              Comment


                #8
                Ok no problem.
                Anyway

                - when closing Ninja, is there a way to keep the strategies "enabled", or must we re-enable them all every new day ?

                - I tried to intercept the MACD crossings of the 0 line (red circles in the attachment "MACD"), setting a strategy when MACD = 0, but this doesn't work. Where am I wrong ?
                Attached Files
                Last edited by fliesen; 08-06-2013, 01:13 PM.

                Comment


                  #9
                  Fliesen,

                  You will need to re-enable the strategy each time you shutdown NinjaTrader and restart.

                  For the cross, you would want to use MACD plot of AVG Cross either above or below the MACD plot of Macd. See the attachment of the settings on how to set the different plots.
                  Attached Files
                  Cal H.NinjaTrader Customer Service

                  Comment


                    #10
                    This helped a lot, many thanks.

                    Comment


                      #11
                      Just to understand these settings better:
                      how do I configure when an oscillator (the more if it is the complicate result of more functions, as the one in the attachment) crosses the 0 line or is more than a certain value ?
                      Attached Files
                      Last edited by fliesen; 08-07-2013, 10:55 AM.

                      Comment


                        #12
                        Fliesen,

                        Unfortunately you wouldn't be able to use 'OR' in the strategy wizard.

                        You have two different sets, one where you detect the cross and the other where you detect when one is greater than the other.
                        Cal H.NinjaTrader Customer Service

                        Comment


                          #13
                          but how ? Which entity must I take into account if the oscillator is the result of three averages (a "Fast", a "Slow" and a "Smooth" one), and how do I ascertain when it crosses its 0 line (what means "> 0") if I can't put mathematical numbers as comparison in the second column ?

                          Comment


                            #14
                            Fliesen,

                            When you check the condition of the Price Oscillator as in your example -
                            Code:
                            if(PriceOscillator(1,8,3)[0] > 0)
                            {
                            // Do something
                            }
                            The part PriceOscillator(1,8,3)[0] will return a double value and compare that against 0.

                            [0] will refer to the CurrentBar in which it pulling the double value.

                            This is not like the MACD where it has three different plots and three different values.
                            Cal H.NinjaTrader Customer Service

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by stevenev1, Today, 01:43 PM
                            0 responses
                            5 views
                            0 likes
                            Last Post stevenev1  
                            Started by shinuvu, Today, 11:05 AM
                            2 responses
                            12 views
                            0 likes
                            Last Post shinuvu
                            by shinuvu
                             
                            Started by Hagar, Yesterday, 07:12 PM
                            1 response
                            14 views
                            0 likes
                            Last Post NinjaTrader_ChrisL  
                            Started by PBreen, Today, 11:59 AM
                            1 response
                            8 views
                            0 likes
                            Last Post NinjaTrader_ShawnB  
                            Started by johnnybegoode, 01-14-2019, 07:24 PM
                            13 responses
                            546 views
                            0 likes
                            Last Post seeseea
                            by seeseea
                             
                            Working...
                            X