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

MACD from Ema to Sma

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

    MACD from Ema to Sma

    Hi All,

    Reaching out to see if anyone has modified a MACD from Exponential to Simple? I would like to be able to switch the Fast, Slow, and Smooth to either Ema or Sma. I tried tweaking the MACD that comes with NT8, but not sure I did anything.

    I turned the slowEma to slowSma, but again not sure that worked correctly. Also, I have no idea where to even start with the Smooth making it either Ema or Sma.

    Thanks in advance.
    -Shaun

    #2
    Hello Shaun,

    I'm not aware of an existing indicator as you have described, this thread will remain open for any community members that may know of this or who would like to build this for you as a convenience.

    The equation for the fast and slow ema is the same, but uses different inputs for the period.
    Try comparing the following to the EMA indicator's code:

    constant1 = 2.0 / (1 + Fast);
    constant2 = (1 - (2.0 / (1 + Fast)));
    double fastEma0 = constant1 * input0 + constant2 * fastEma[1];

    Instead, you could replace this with the code from the SMA indicator.


    You can also contact one of our professional NinjaScript Consultants who would be eager to create or modify this script at your request or assist you with your script. Please let me know if you would like our business development follow up with you with a list of professional NinjaScript Consultants who would be happy to create this script or any others at your request.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by cre8able, Yesterday, 01:16 PM
    3 responses
    11 views
    0 likes
    Last Post cre8able  
    Started by ChartTourist, Today, 08:22 AM
    0 responses
    6 views
    0 likes
    Last Post ChartTourist  
    Started by LiamTwine, Today, 08:10 AM
    0 responses
    2 views
    0 likes
    Last Post LiamTwine  
    Started by Balage0922, Today, 07:38 AM
    0 responses
    5 views
    0 likes
    Last Post Balage0922  
    Started by JoMoon2024, Today, 06:56 AM
    0 responses
    6 views
    0 likes
    Last Post JoMoon2024  
    Working...
    X