Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plotting wave... Need help

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

    Plotting wave... Need help

    Hi.

    I defined a function in this way...
    Code:
    		protected void wave()
    		{
    			if (ToDay(Time[0]) == 20080821) { value = 31.2; }
    			if (ToDay(Time[0]) == 20080822) { value = 32.2; }
    			if (ToDay(Time[0]) == 20080823) { value = 33.2; }
    			if (ToDay(Time[0]) == 20080824) { value = 34.1; }
    			if (ToDay(Time[0]) == 20080825) { value = 35.2; }
    			if (ToDay(Time[0]) == 20080826) { value = 36.2; }
    			if (ToDay(Time[0]) == 20080827) { value = 35.2; }
    			if (ToDay(Time[0]) == 20080828) { value = 34.2; }
    			if (ToDay(Time[0]) == 20080829) { value = 33.2; }
    			if (ToDay(Time[0]) == 20080830) { value = 32.2; }
    			if (ToDay(Time[0]) == 20080831) { value = 31.2; }
    			if (ToDay(Time[0]) == 20080901) { value = 30.2; }
    
    		}
    For each Day,a pre-defined double variable 'value' has a different value in this function. Now, I want to plot this wave() on the main price chart without any scaling issue... How to do that... Please inform.

    Please look at screenshot... this is how I want the final result to show up... after plotting the wave()...
    Attached Files

    #2
    Hello karthik007,

    This depends on what you are using these values for.

    If you wanting to plot values from 30 to 40 on a panel where the primary instrument scale is from 1000 to 1010, these would need to be set to different scale justifications so that they have their own price scales.
    For example set the bars scale justification to the right, and set the indicator to the left.

    If you are wanting to use the 30 as an offset such as 30 ticks from the close price, add this to the bar price you would like.
    For example:
    Value[0] = Close[0] + value * TickSize;

    I can only guess what the prices of the bars are, because the price scale is hidden from the screenshot.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi...I only included one small part of the wave I'm trying to draw. In reality, the values fluctuate between -40 to +40...

      Another important point is... the values are predetermined and predefined in the function and they never change... and also.. they are not dependent up on price...

      After I enter all the values in the wave() function, then I want to see the full swings as mentioned in the screenshot...

      Please give me the code to plot this... wave()
      Last edited by karthik007; 05-23-2016, 12:19 PM.

      Comment


        #4
        Hello karthik007,

        I will not be able to write the logic for you, however, this thread will remain open for any community members that would like to assist.

        Our support does not create, debug, or modify code for our clients. This is so that we can maintain a high level of service for all of our clients as well as our partners.


        Are you asking how to set a plot?

        A plot is set using Value[0] = or Value.Set().
        http://ninjatrader.com/support/helpGuides/nt7/value.htm


        If the plot is set to the value you would like, setting the scale justification to the left in the indicator parameters will cause the indicator to be scaled independently of the chart bars.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          well... looks like it is more complicated than I thought.... :/

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          574 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          333 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          553 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X