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 gbajaj, Yesterday, 11:16 PM
      0 responses
      1 view
      0 likes
      Last Post gbajaj
      by gbajaj
       
      Started by PWillard, Yesterday, 10:30 PM
      0 responses
      1 view
      0 likes
      Last Post PWillard  
      Started by waldoalvarez, 06-19-2021, 05:50 AM
      2 responses
      16 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by Noongun, Yesterday, 03:17 PM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_EricB  
      Started by Reardon, Yesterday, 12:48 PM
      1 response
      21 views
      0 likes
      Last Post NinjaTrader_EricB  
      Working...
      X