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 sgordet, Today, 11:48 AM
    0 responses
    1 view
    0 likes
    Last Post sgordet
    by sgordet
     
    Started by Trader146, Today, 11:41 AM
    0 responses
    2 views
    0 likes
    Last Post Trader146  
    Started by jpapa, 04-23-2024, 07:22 AM
    2 responses
    16 views
    0 likes
    Last Post rene69851  
    Started by funk10101, Today, 11:35 AM
    0 responses
    1 view
    0 likes
    Last Post funk10101  
    Started by samish18, Today, 11:26 AM
    0 responses
    1 view
    0 likes
    Last Post samish18  
    Working...
    X