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

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 Perr0Grande, Yesterday, 08:16 PM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by f.saeidi, Yesterday, 08:12 AM
          3 responses
          24 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by algospoke, Yesterday, 06:40 PM
          1 response
          14 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by quantismo, Yesterday, 05:13 PM
          1 response
          14 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by The_Sec, 04-16-2024, 02:29 PM
          3 responses
          16 views
          0 likes
          Last Post NinjaTrader_ChristopherS  
          Working...
          X