Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Rise over run on EMA

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

    Rise over run on EMA

    Hi.
    How easy is it to script an EMA to change color with the user's input of rise (price change) and run (n bars)?

    For instance a threshold of ascent and descent can be established by user input, and then the EMA can change green or red accordingly.

    Basically, a slope ratio is established.

    I don't know anything about scripting unfortunately , but I thought is would be a great indicator for just about anyone .

    Thanks!
    -techdoodle
    Last edited by techdoodle; 10-01-2011, 06:49 PM. Reason: added question mark

    #2
    Techdoodle,

    This wouldn't be that difficult. The issue would be to define over how many bars you want to calculate slope. For example, you may get flip-flopping signals if you only calculate slope over 2 bars. Its probably better to do a slope over several bars. There are rules defined for this known as "differential quadrature" or "numerical differentiation". Basically, a derivative at some point (from calculus), is slope.

    Please let me know if I can assist further.
    Adam P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    305 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    198 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    186 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    274 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    228 views
    0 likes
    Last Post CarlTrading  
    Working...
    X