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

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 yertle, Yesterday, 08:38 AM
      7 responses
      28 views
      0 likes
      Last Post yertle
      by yertle
       
      Started by bmartz, 03-12-2024, 06:12 AM
      2 responses
      21 views
      0 likes
      Last Post bmartz
      by bmartz
       
      Started by funk10101, Today, 12:02 AM
      0 responses
      5 views
      0 likes
      Last Post funk10101  
      Started by gravdigaz6, Yesterday, 11:40 PM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by MarianApalaghiei, Yesterday, 10:49 PM
      3 responses
      11 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Working...
      X