Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Want to add a value plot, Sine and Lsine to WaveTrend

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

    Want to add a value plot, Sine and Lsine to WaveTrend

    In order to use WaveTrendV2 indicator in the builder, to plot my drawing on chart, I need to add the Value Plot the Sine & Lsine in that script. Like the SineWaveExtendedLines indicator has.

    Actually, I just need to add the Value Plot above WTFast & WTSlow to separate the values. To identify one crossing the other.

    I'm using MacD instead, it's the same thing and has a MacD Value Plot and a Avg Value Plot, so I can have the one crossing over the other in the Builder and be usable.

    Attached Files
    Last edited by trdninstyle; 10-07-2024, 11:57 AM.

    #2
    Hello trdninstyle,

    To add a plot to the indicator you would need to use AddPlot like you pictured and then set a value to the plot from OnBarUpdate. There is a very simple example showing how to set a plot in the following page.

    https://ninjatrader.com/support/helpGuides/nt8/addplot.htm

    From the image of the builder it appears you were able to use the plots in the builder, did you have a specific question question about some use with the builder or the indicator?
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi Jesse,

      Actually the MacD does the same thing that the WaveTrend does and it plots MacD separate from the Avg plot, so I can use it in the Builder.

      I did add two plots in WaveTrend but not the two separate plots in order to draw a line after they crossed, couldnt figure out how to re-script that.

      I like what I have using the MacD now & I'm having it draw a line at the crosses for s/r. In the String box by selecting CurrentBars(0) it continues to draw at every cross. Would I select another string under Misc? In order to continue that s/r line until the opposite cross?

      In the SinewaveExtlines ind it has Draw.Dot(this, "" +Current.ToString(), true, etc in order to have the line to draw outward until the next cross.


      Thanks,
      Attached Files
      Last edited by trdninstyle; 10-07-2024, 12:45 PM.

      Comment


        #4
        Hello trdninstyle,

        To have the drawing continue you would have to use the same tag name. In the image you are saving the CurrentBar to a string variable and then using that. To have that drawing stop when the next cross happens you would have to update that variable and then draw the next object. That would stop updating the previous line and would draw a new line.
        JesseNinjaTrader Customer Service

        Comment


          #5
          *Using the same tag name. Can I use this same tag name in the builder? (This is another one that I unlocked)

          {
          Draw.Line(this, @" " +CurrentBar.ToString(), true, -1, Low[0], 0, Low[0], Brushes.LawnGreen, DashStyleHelper.Solid, 2);
          }

          To update this variable, that being the image of a Line to CurrentBar, that update which is telling it to stop drawing at the opposite cross, would have to be in the above, between the curly brackets right after +CurrentBar(),..

          Can I do this in the builder or do I have to unlock it? To update that variable I'll have to use Inputs and Variables for that, right?

          In the variable I could write, Stop drawing line on cross down, and set it to true with a bool. And this would be under Misc once I add it.

          A while ago I was able to watch videos of setting up filters for strategies step by step using arrows or text, but never a line like I want to use now. I did so many of them I felt like an expert so I'm stuck on continuing a line until another cross opposite. Or in the string box, do I make another string that being 4th string, (under the CurrentBar string) and go into my variable that I create, under Misc.

          I'll show you in a pic.
          Attached Files

          Comment


            #6
            Hello trdninstyle,

            You can use CurrentBar in the builder if that is what you are asking. You can also use a variable for the tag name for objects drawn in the builder. Variables can be created using the inputs and variables page. A string variable is what would be needed for the tag.

            The way a tag works with drawing objects would be each object can have a unique name. If that name is re used later it will update the previous object. If you otherwise supply an always unique name, for example using CurrentBar, that will generate new objects each time you call that method.


            JesseNinjaTrader Customer Service

            Comment


              #7
              Jesse, I must be making it too difficult.

              I only received the message after my recent post; it's not updating as expected. I didn't realize I had a response until now, apologies.
              I'm reading it now.
              Last edited by trdninstyle; 10-08-2024, 10:05 AM.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by NasdaqAnalytica, Today, 03:33 PM
              1 response
              4 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by Auvrayphil, Today, 03:44 PM
              0 responses
              4 views
              0 likes
              Last Post Auvrayphil  
              Started by jamesbhardwaj, Today, 04:41 AM
              1 response
              14 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Started by diorfo, Today, 12:48 PM
              5 responses
              23 views
              0 likes
              Last Post NinjaTrader_ChristopherJ  
              Started by cp202822, Today, 01:38 PM
              2 responses
              13 views
              0 likes
              Last Post cp202822  
              Working...
              X