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 aussugardefender, Today, 01:07 AM
      0 responses
      3 views
      0 likes
      Last Post aussugardefender  
      Started by pvincent, 06-23-2022, 12:53 PM
      14 responses
      238 views
      0 likes
      Last Post Nyman
      by Nyman
       
      Started by TraderG23, 12-08-2023, 07:56 AM
      9 responses
      384 views
      1 like
      Last Post Gavini
      by Gavini
       
      Started by oviejo, Today, 12:28 AM
      0 responses
      4 views
      0 likes
      Last Post oviejo
      by oviejo
       
      Started by pechtri, 06-22-2023, 02:31 AM
      10 responses
      125 views
      0 likes
      Last Post Leeroy_Jenkins  
      Working...
      X