convert MACD_ZeroLag Ninja indicator to Multi Charts - EasyLanguage Programming | futures io social day trading
futures io futures trading


convert MACD_ZeroLag Ninja indicator to Multi Charts
Updated: Views / Replies:2,172 / 7
Created: by emini_Holy_Grail Attachments:1

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

convert MACD_ZeroLag Ninja indicator to Multi Charts

  #1 (permalink)
Elite Member
Dallas,TX
 
Futures Experience: Intermediate
Platform: NinjaTrader, OpenQuant
Broker/Data: Zaner/Zen Fire
Favorite Futures: ES,6E,6B,GC,CL
 
Posts: 590 since Nov 2009
Thanks: 176 given, 116 received

convert MACD_ZeroLag Ninja indicator to Multi Charts

Can anyone help to convert this Ninja indicator to Multi Charts
MACD_ZeroLag_Colors_BigMike_ctrlbrk.zip

View Download Details - Big Mike's Trading Forum

thks and appreciate it

I am not sure if there is a thread about conversions to Multi Charts

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Atlanta, Georgia
 
Futures Experience: Intermediate
Platform: NT
Broker/Data: DDT
Favorite Futures: ZN, ZB
 
cbritton's Avatar
 
Posts: 224 since Mar 2010
Thanks: 152 given, 237 received


I have TS, so here's the code you can add to MC.

Zero Lag EMA function. Save it as "_ZeroLagEMA"

 
Code
{
Zero Lag EMA

from the NT version

            EMA ema1 = EMA(Input, Period);
            double difference = ema1[0] - EMA(ema1, Period)[0];
            ZLEMA.Set(ema1[0] + difference);
            
}
input: price(NumericSeries),
        period(NumericSimple);


Value1 = XAverage(price, period);
// diff
Value2 = value1[0] - XAverage(value1, period);
// zlema
Value3 = value1 + value2;

_ZeroLagEMA = value3;
ADXVMA function (also found elsewhere on futures.io (formerly BMT)). Save it as "ADXVMA".

 
Code
// Big Mike Trading https://futures.io
// April 17 2010
// Converted from NinjaTrader version, original author unknown
// Function

inputs:     
    Price (NumericSeries),
    Length (NumericSimple);

vars:
    TR(0),
    DI_Diff(0),
    DI_Sum(0),
    ma(0),
    pdm(0),
    mdm(0),
    pdi(0),
    mdi(0), 
    DI_Factor(0), 
    VI(0), 
    diff(0), 
    HHV(0), 
    LLV(0),
    WeightDM(Length), 
    WeightDI(Length), 
    WeightDX(Length),
    ChandeEMA(Length),
    out(0),
    j(0);

once ma=Price;    

if(Price>Price[1]) then pdm=Price-Price[1] else mdm=Price[1]-Price;//This array is not displayed.

pdm=((WeightDM-1)*pdm[1] + pdm)/WeightDM;//ema.
mdm=((WeightDM-1)*mdm[1] + mdm)/WeightDM;//ema.

TR=pdm+mdm;

if (TR>0) then begin    pdi=pdm/TR; mdi=mdm/TR; end
 else begin
    pdi=0;
    mdi=0;
end;

pdi=((WeightDI-1)*pdi[1] + pdi)/WeightDI;//ema.
mdi=((WeightDI-1)*mdi[1] + mdi)/WeightDI;//ema.
DI_Diff=pdi-mdi;
  
if (DI_Diff<0) then  DI_Diff= -DI_Diff;//Only positive momentum signals are used.

DI_Sum=pdi+mdi;
DI_Factor=0;//Zero case, DI_Diff will also be zero when DI_Sum is zero.

if (DI_Sum>0) then out=DI_Diff/DI_Sum else out=0;

out=((WeightDX-1)*out[1] + out)/WeightDX;
//HHV = highest(out, length+1);
//LLV = lowest(out, length+1);

if (out>out[1]) then begin HHV=out; LLV=out[1]; end 
 else begin
    HHV=out[1];
    LLV=out;
end;

for j = 1 to Length-1 begin    
    if(out[j+1]>HHV)then HHV=out[j+1];
    if(out[j+1]<LLV) then LLV=out[j+1];
end;

diff = HHV - LLV;
VI=0;

if (diff>0) then  VI=(out-LLV)/diff;
          
ma=((ChandeEMA-VI)*ma[1]+VI*Price)/ChandeEMA;//Chande VMA formula with ema built in.

ADXVMA = ma;
The indicator itself.

 
Code
{
MACD using the ZeroLag EMA function and ADXVMA function.
Converted from the NT version on BigMike's
}

input: price(close),
       fast(12),
       slow(26),
       smoothing(9),
       threshold(0),  // amount past zero line it needs to cross to trigger
       acceleration(1);  // 0.5, 1, 1.5, 2.0
vars:
    fastEMA(0),
    diff(0),
    macd1(0),
    macdAvg2(0),
    adxvma1(0),
    signal(0);
    
value1 = fast/acceleration; //
value2 = slow/acceleration; // 
fastEma = _ZeroLagEMA(price, value1) - _ZeroLagEMA(price, value2);

macdAvg2 = _ZeroLagEMA(fastEMA, smoothing);
adxvma1= ADXVMA(fastEMA, value1);
diff = fastEMA - macdAvg2;

Plot1(fastEMA, "MACD");
Plot2(macdAvg2, "Avg");
Plot8(0, "MACD_");
Plot3(diff, "Diff");  //histogram
Plot5(0, "MACD Up");
Plot6(0, "MACD Down");
Plot7(0, "MACD Neutral");

noPlot(5);
noPlot(6);
noPlot(7);

//todo - add alers on the threshold 
if fastEMA > adxvma1 and fastEMA > threshold then begin
    setPlotColor(8, getPlotcolor(5));
end else if fastEMA < adxvma1 and fastEMA < -threshold then begin
    setPlotColor(8, getPlotcolor(6));
end else begin
    setPlotColor(8, getPlotcolor(7));
end;
I did not add the alerts for the signals. If you want it, let me know and I'll add it. Also included a screen shot.

Regards,
-C

“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
Attached Thumbnails
convert MACD_ZeroLag Ninja indicator to Multi Charts-zlmacd_cl.png  
Reply With Quote
The following 5 users say Thank You to cbritton for this post:
 
  #4 (permalink)
Elite Member
Dallas,TX
 
Futures Experience: Intermediate
Platform: NinjaTrader, OpenQuant
Broker/Data: Zaner/Zen Fire
Favorite Futures: ES,6E,6B,GC,CL
 
Posts: 590 since Nov 2009
Thanks: 176 given, 116 received

nice work cbritton

cbritton
thks much and really appreciate it.
I will have to reinstall MC in another PC and will let you know about the alerts

Reply With Quote
 
  #5 (permalink)
Elite Member
Weston, Florida, USA
 
Futures Experience: Advanced
Platform: Ninja Trader
Favorite Futures: ES, CL, TF, 6E, GC
 
Posts: 42 since Oct 2010
Thanks: 43 given, 45 received

MACD zero lag colors for NT 7

Hello big Mike,

Do you or anyone have changed the code for the indicator MACD zero lag colors for Ninja Trader 6.5 to Ninja trader 7.xx?? I've been looking for that indicator every where and couldn't find it.

Thanks,
Alan

Reply With Quote
 
  #6 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,216 since Jun 2009
Thanks: 628 given, 6,314 received
Forum Reputation: Legendary

a quick search with 'MACD' yielded this https://futures.io/elite-trading-journals/8393-started-journal-because-30.html#post158975

Reply With Quote
 
  #7 (permalink)
Trading Apprentice
Versailles, Yvelines France
 
Futures Experience: Advanced
Platform: NT, MT4, MultiCharts
Favorite Futures: EUR/JPY, QQQ, AAPL
 
Posts: 1 since Jan 2014
Thanks: 0 given, 0 received

Cannot compile functions without errors?!

Hello Big Mike!

This indicator looks great!
But, I am not able to correct the "Compile error" for both functions in MC:
for "_ZeroLagEMA":
------ Compiled with error(s): ------
Compile error
line 0, column 0

For "ADXVM":
------ Compiled with error(s): ------
Compile error
line 0, column 0

What the hell is it, please?

Thank you very much for your support!

Best regards.

Vinchente

Reply With Quote
 
  #8 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,527 since Apr 2013
Thanks: 229 given, 854 received
Forum Reputation: Legendary

Vinchente,

maybe your errors are related to this: errLine_0,_errColumn_0,_errLineEnd_0,_errColumnEnd_0. In case this doesn't help you, you will likely have to contact Multicharts support via their chat.

Regards,
ABCTG


Vinchente View Post
Hello Big Mike!

This indicator looks great!
But, I am not able to correct the "Compile error" for both functions in MC:
for "_ZeroLagEMA":
------ Compiled with error(s): ------
Compile error
line 0, column 0

For "ADXVM":
------ Compiled with error(s): ------
Compile error
line 0, column 0

What the hell is it, please?

Thank you very much for your support!

Best regards.

Vinchente


Reply With Quote

Reply



futures io > > > > > convert MACD_ZeroLag Ninja indicator to Multi Charts

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
NT Multi Timeframe and multi indicator review eurostoxx NinjaTrader 3 August 29th, 2011 01:07 PM
Convert Ninja Indicators to Tradestation daytrader4 The Elite Circle 2 December 15th, 2010 05:16 PM
Ninja Strategy multi-timeframe issue/Strategy to indicator nw123 NinjaTrader Programming 2 December 20th, 2009 07:24 PM


All times are GMT -4. The time now is 05:35 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-13 in 0.10 seconds with 20 queries on phoenix via your IP 54.92.194.75