Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

receive a figure

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

    receive a figure

    hi,

    i'd like to use the results of the indicator "ninjapriceaction" (given as text) in the form of a figure (High [0] for example) to overwork it with the stategy wizzard in the first step.

    is this possible and if so, what do i have to do ?
    additional: how can i define the varible 0 - 9 in the strategy wizzard?
    thx

    #2
    Hi Tradexxx,

    May I have a link to the indicator you are using so that I can see what plots are available?

    (Only plots can be used in the Strategy Wizard)
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      attached it is
      Attached Files

      Comment


        #4
        Hello Tradexxx,

        This indicator does not make any plots that you can use in the Strategy Wizard.

        You may be able to edit the code for this indicator and add the plots and set them to the values that are drawn on the chart.

        It looks like this draws text on the chart. There are 6 pairs of letters. There are 2 sets of if else statements and from looking at the chart, these are not true on the same bar. Meaning, just at a glace you could theoretically use 1 plot that has 6 states.
        0 = DT, 1 = HH, 2 = LH, 3 = DB, 4 = LL, 5 = HL

        So the plot, whenever the conditions are true to draw, will also be set. This can be used the Strategy Wizard.

        An important note though. This indicator does not draw text on the current bar.

        In other words the letters never appear on the current bar, they always draw on one of the past bars.

        You could write some logic to trigger this for a past bar, but if you use the current bar none of these will trigger.

        Below is a link to the Add() and Plot() methods in the help guide for adding plots.
        Add - http://www.ninjatrader.com/support/h...es/nt7/add.htm
        Plots - http://www.ninjatrader.com/support/h...plot_class.htm
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi chelsea,
          thank you very much !
          how can i request the necessary data if the "sign" comes with delay?
          Is there a kind of code i can use?

          Comment


            #6
            Hello Tradexxx,

            Your logic would have to look at historical bars and make decisions. Basically these would be the same decisions you make in your head, because i'm pretty sure on a real time chart, this indicator does not draw these letters on the current bar.

            So if you want to look 5 bars ago for a value, call the indicator and use 5 as the Bars Ago value.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              hi chelsea, hi all
              in an earlier post you wrote:

              An important note though. This indicator does not draw text on the current bar.

              In other words the letters never appear on the current bar, they always draw on one of the past bars.
              that's true!

              You could write some logic to trigger this for a past bar, but if you use the current bar none of these will trigger.
              - what dou you mean with logic to trigger?
              - and how does this looks like?
              - what do i have to do?

              the signals are fine, but as you said, they appear between 3 and 5 candles to late.
              (the idea -- in the meantime -- is to use this indicator only as indicator, not in a strategy).
              thx for your help !
              Last edited by Tradexxx; 04-13-2015, 07:32 AM.

              Comment


                #8
                Hi Tradexxx,

                By use logic I mean check the values of the data series a few bars back to see if anything has changed.

                First you need a plot that records the which drawing object was drawn. 1 plot that has 6 states should accomplish this.

                Then you would call that plot a few bars back to look for your signal.

                For example if I was setting a plot and wanted to find if this plot has a value of 3 within the last 5 bars.

                if (Value[0] == 3 || Value[1] == 3 || Value[2] == 3 || Value[3] == 3 || Value[4] == 3)
                {
                // execute code

                OR

                for (int i = 0; i < 5; i++)
                {
                if (Value[i] == 3)
                {
                // execute code
                }
                }

                This looks to see if the Value plot contains a 3 within the last 5 bars.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  hi chelsea,

                  thank you very much.
                  at the end of the day this means:
                  even if value is 3 or 2 - i will have delays...
                  and: i'll have to change to indicator to create plots to be able to overwork it.

                  isn't there any other way to "speed up" this indicator?
                  (having in mind, i won't use it for a strategy!)
                  thx

                  Comment


                    #10
                    Hello Tradexxx,

                    I am unsure what you mean when you say:
                    "at the end of the day this means:
                    even if value is 3 or 2 - i will have delays..."

                    I'm not sure what would be causing these delays or what delays you are referring to. Are you saying that the delay is that the text is not drawn on the bar until a few bars later?

                    On the current bar, text is drawn on older bars. You need to detect this and then set the value for that bar to a plot.

                    Then you can use this as a signal in another script. That signal can be produced at the time the text is drawn.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      hi chelsea,

                      i'll try to explain:
                      as far as i have recogniced - the indicator "NinjaPriceAction" is displaying the text 3- 5 candles, after the signal appeard. but the signal (comming as text) itself, appears than at the right position.

                      from my understanding i thought it would be possible to display the signal at position [0] if the candle is finished and the follwoing is starting. I have the impression that the signals appears at [3]-[5].

                      the only thing i'd like to reach is a signal at [0].

                      what would you suggest to detect where the delay comes from?
                      thx

                      Comment


                        #12
                        Originally posted by Tradexxx View Post
                        hi chelsea, hi all
                        in an earlier post you wrote:


                        that's true!



                        - what dou you mean with logic to trigger?
                        - and how does this looks like?
                        - what do i have to do?

                        the signals are fine, but as you said, they appear between 3 and 5 candles to late.
                        (the idea -- in the meantime -- is to use this indicator only as indicator, not in a strategy).
                        thx for your help !
                        The signals are not late: a turning point can only be seen in hindsight, after it is established. You cannot tell in advance which bar is the turning bar. After the bar is established as a turning bar, it will get marked as such, and it will necessarily be behind the current bar, by as many bars as need to be examined to determine if that bar was a turning bar.

                        Comment


                          #13
                          Hi Tradexxx,

                          koganam is correct. This indicator does not draw on the current bar. This indicator draws on past bars.

                          In other words, this is how the script is designed, to change information on the chart for previous bars. It does not provide a signal for the current bar.
                          You would need to rewrite the indicator with your own custom logic if you are wanting the indicator to behave differently.
                          Chelsea B.NinjaTrader Customer Service

                          Comment


                            #14
                            chelsea, koganam,
                            ok so far.
                            thank you very much for your assistance!

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by rocketman7, Today, 09:41 AM
                            1 response
                            2 views
                            0 likes
                            Last Post NinjaTrader_Jesse  
                            Started by traderqz, Today, 09:44 AM
                            0 responses
                            1 view
                            0 likes
                            Last Post traderqz  
                            Started by rocketman7, Today, 02:12 AM
                            7 responses
                            31 views
                            0 likes
                            Last Post NinjaTrader_ChelseaB  
                            Started by guillembm, Yesterday, 11:25 AM
                            3 responses
                            16 views
                            0 likes
                            Last Post NinjaTrader_Jesse  
                            Started by junkone, 04-21-2024, 07:17 AM
                            10 responses
                            149 views
                            0 likes
                            Last Post NinjaTrader_BrandonH  
                            Working...
                            X