Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How can I?

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

    How can I?

    Hi All,
    How can I ask the stragey analyzer to draw a Gann Fann from the lowest low of the day.
    Also draw one from the higest high of the day?
    I have tried it but come up with a bunch of oblique lines using Current OHL.

    #2
    I suppose you mean drawing a Gann fan from a strategy and not the strategy analyzer. Please see here for how to draw a Gann fan in strategies: http://www.ninjatrader-support.com/H...awGannFan.html

    You then would need to determine the right "y" value e.g. by CurrentOHL like you already figured.

    To verify that you used the correct "y" you could Print() that value to the output window.

    Comment


      #3
      Originally posted by NinjaTrader_Dierk View Post
      I suppose you mean drawing a Gann fan from a strategy and not the strategy analyzer. Please see here for how to draw a Gann fan in strategies: http://www.ninjatrader-support.com/H...awGannFan.html

      You then would need to determine the right "y" value e.g. by CurrentOHL like you already figured.

      To verify that you used the correct "y" you could Print() that value to the output window.
      Hi Dierk,

      Yes, you are correct- I meant strategy! If I succeed I will post the strategy- I am sure that others will find it useful!

      In the condition builder in the right window what would I need to select to make current OHL to recognize the Low?

      Comment


        #4
        >> I need to select to make current OHL to recognize the Low
        try selecting Plot=CurrentLow

        Comment


          #5
          How can I call the current Day Low?
          Looks like the dataseries Low requires an integer but I actually need it to take the current day low from (Current OHL)

          protected override void OnBarUpdate()
          {
          // Condition set 1
          if (CurrentDayOHL().CurrentLow[0] == CurrentDayOHL().CurrentLow[0])
          {
          DrawGannFan("My gann fan" , false, 0, Low[?CurrentLow?]);

          The default is 0- I get that calls up the current bar.
          Also an integer greater than 0 calls up bars prior to the current one.

          BTW- yes it worked drawing a Gann Fan to the current bar using 0!
          Last edited by Bamboo; 07-01-2008, 04:25 AM.

          Comment


            #6
            Not sure I follow:
            a) This condition always is true, thus does not make sense:
            CurrentDayOHL().CurrentLow[0] == CurrentDayOHL().CurrentLow[0]
            b) are you now working with the wizard or coding manually?
            c) code likely should read:
            DrawGannFan("My gann fan" , false, 0, CurrentDayOHL().CurrentLow[0]);

            Comment


              #7
              Sorry - yes went over to manual.

              Changed the code :

              // Condition set 1
              ///This part I do not understand as to how to make it just recognise the Current Low
              if (CurrentDayOHL().CurrentLow[0] == CurrentDayOHL().CurrentLow[0])
              It will not let me choose a boolean e.g true
              ///

              {
              DrawGannFan("My gann fan" , true, 0, CurrentDayOHL().CurrentLow);

              Comment


                #8
                Sorry, due to bandwidth issues we are unable to provide support down to the level of actual coding NinjaScript strategies.

                However, here is one more hint: The key factor is to figure out on which bar the daily low occurred. You could do something like:
                - if timestamp is current day
                - and low of current bar is CurrentDayOHL().CurrentLow[0]
                - and flag is not yet set then
                * issue DrawGann command
                * set flag to avoid further drawing attempts

                As last resort you could contact a certified NinjaScript consultant: http://www.ninjatrader.com/webnew/pa...injaScript.htm

                Comment


                  #9
                  New Query!

                  Hi,
                  I am trying to make a strategy for an indicator I have devloped. One of my lines of the indicator is offset by -1 (to read it one bar earlier).
                  How can I set this offset into the strategy?

                  Comment


                    #10
                    Sorry I don't follow. May be this helps: you can access any value of you indicator by using the barsAgo parameter you'd like.

                    double val = SMA(<yourParameterValue>)[<yourBarsAgoValue>];

                    whereas SMA, which is a NT default indicator, needed to be replaced by your custom indicator and <yourBarsAgoValue> could "1" to denote the indicator's value 1 bar ago.

                    Comment


                      #11
                      Originally posted by NinjaTrader_Dierk View Post
                      Sorry I don't follow. May be this helps: you can access any value of you indicator by using the barsAgo parameter you'd like.

                      double val = SMA(<yourParameterValue>)[<yourBarsAgoValue>];

                      whereas SMA, which is a NT default indicator, needed to be replaced by your custom indicator and <yourBarsAgoValue> could "1" to denote the indicator's value 1 bar ago.
                      Hi Dierk,

                      Thanks yes- I believe that it has worked. Will need to see it in action live this week.
                      Many thanks.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by cre8able, Today, 03:20 PM
                      0 responses
                      5 views
                      0 likes
                      Last Post cre8able  
                      Started by Fran888, 02-16-2024, 10:48 AM
                      3 responses
                      47 views
                      0 likes
                      Last Post Sam2515
                      by Sam2515
                       
                      Started by martin70, 03-24-2023, 04:58 AM
                      15 responses
                      114 views
                      0 likes
                      Last Post NinjaTrader_Jesse  
                      Started by The_Sec, Today, 02:29 PM
                      1 response
                      7 views
                      0 likes
                      Last Post NinjaTrader_Jesse  
                      Started by jeronymite, 04-12-2024, 04:26 PM
                      2 responses
                      31 views
                      0 likes
                      Last Post NinjaTrader_BrandonH  
                      Working...
                      X