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

Slope of an oscillator

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

    Slope of an oscillator

    Is there a way to find the slope of an oscillator (say for example MACD fast line) - all i need to know is +ve or -ve slope.

    One way is to find the value for current bar and previous bar but when you calculate on each tick this might give a false values.

    #2
    Hello ark321,

    Thanks for your post.

    You can use the Slope() method which can be applied to any data series: https://ninjatrader.com/support/help...html?slope.htm

    If you only want to check once per bar in a script running with Calculate.OnEachTick, you can use the system bool of IsFirsTickOfBar: https://ninjatrader.com/support/help...ttickofbar.htm (See usage example in help guide).


    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Skifree, Yesterday, 11:38 PM
    1 response
    15 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by Mathias79, Today, 10:38 AM
    6 responses
    21 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by eladlevi, Today, 11:02 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by Skifree, Yesterday, 11:41 PM
    2 responses
    13 views
    1 like
    Last Post eDanny
    by eDanny
     
    Started by TraderCro, 04-12-2024, 11:36 AM
    8 responses
    105 views
    0 likes
    Last Post NinjaTrader_ChristopherJ  
    Working...
    X