Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Combining MA of Price with Mom on the same panel

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

    Combining MA of Price with Mom on the same panel

    Is it possible to combine a MA of price and an indicator such as momentum on the same panel such that they scale together. in other words, if MOM is .78 and MA of price is 140.66 can I combine them so that they scale together and not independently.

    Obviously when I combine them now, the vast difference in data points makes for a very squished and illegible plot. Is there a setting that allows them to be on the same panel without that squishing effect?

    I know I'm probably not describing this very well. hopefully someone out there knows what I mean.

    #2
    Hello ShruggedAtlas,

    Thank you for your post.

    The option you are looking for is the Scale Justification. You can change this by right clicking in your chart > select Indicators > select one of the indicators > change the Scale Justification to another scale such as left or overlay.

    To change Scale Justification in your NinjaScript code you can define the ScaleJustification in the Initialize method, however this cannot be set per plot. If you want two different scale justifications on the same panel you will have to define scale justification in two seperate indicators.

    For information on ScaleJustification please visit the following link: http://www.ninjatrader.com/support/h...tification.htm

    Please let me know if I may be of further assistance.

    Comment


      #3
      Originally posted by ShruggedAtlas View Post
      Is it possible to combine a MA of price and an indicator such as momentum on the same panel such that they scale together. in other words, if MOM is .78 and MA of price is 140.66 can I combine them so that they scale together and not independently.

      Obviously when I combine them now, the vast difference in data points makes for a very squished and illegible plot. Is there a setting that allows them to be on the same panel without that squishing effect?

      I know I'm probably not describing this very well. hopefully someone out there knows what I mean.
      You could also copy and then paste the indicator under another name - Mymomentum etc then add a multiplier to the following line

      Value.Set(CurrentBar == 0 ? 0 : Input[0] - Input[Math.Min(CurrentBar, Period)]);

      Like this:

      Value.Set(CurrentBar == 0 ? 0 : Input[0] - Input[Math.Min(CurrentBar, Period)] * MyMultiplier);

      You will of course need to list the multiplier as a variable and define it in properties.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by kazisl, Today, 06:41 PM
      0 responses
      4 views
      0 likes
      Last Post kazisl
      by kazisl
       
      Started by einstein, Today, 06:20 PM
      0 responses
      6 views
      0 likes
      Last Post einstein  
      Started by op1031, Today, 05:51 PM
      0 responses
      5 views
      0 likes
      Last Post op1031
      by op1031
       
      Started by nighttrader99, Today, 04:34 PM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_ShawnB  
      Started by Simon Investimens, Today, 02:51 PM
      1 response
      16 views
      0 likes
      Last Post NinjaTrader_ChrisL  
      Working...
      X