Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 09-05-2008, 12:35 PM   #1

Join Date: Aug 2008
Posts: 5
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Need Rewrite from Mql or Multichart for NT

A specific macd need to write for NinjaTrader... in MT its name macdforest.... mayby anyone knows
backfoot is offline  
Reply With Quote
Old 09-05-2008, 12:40 PM   #2

Join Date: Aug 2008
Posts: 5
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Re: Need Rewrite from Mql or Multichart for NT

......and what language Ninja uses???
backfoot is offline  
Reply With Quote
Old 09-05-2008, 12:45 PM   #3
forsearch

Status: Guest
Posts: n/a
Ignore this user


Re: Need Rewrite from Mql or Multichart for NT

You got the code to post in plaintext here? Or are we to decipher whatever it is you're looking for....
 
Reply With Quote
Old 09-05-2008, 01:01 PM   #4

brownsfan019's Avatar

Join Date: Jan 2007
Location: USA
Posts: 4,255
Ignore this user

Thanks: 1,912
Thanked 1,789 Times in 895 Posts

Re: Need Rewrite from Mql or Multichart for NT

Just figure it out FS. Geeze, cut the guy some slack.

brownsfan019 is offline  
Reply With Quote
Old 09-05-2008, 01:20 PM   #5

Join Date: Aug 2008
Posts: 5
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Re: Need Rewrite from Mql or Multichart for NT

... here is ... a mql...


//+------------------------------------------------------------------+
//| Custom MACD.mq4 |
//| Copyright © 2004, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2004, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net/"
//---- indicator settings
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Green
#property indicator_color2 Orange
//---- indicator parameters
extern int FastEMA=34;
extern int SlowEMA=144;
extern int SignalSMA=34;
//---- indicator buffers
double ind_buffer3[];
double ind_buffer4[];


//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- drawing settings
SetIndexStyle(0,DRAW_HIST OGRAM,STYLE_SOLID,1);
SetIndexStyle(1,DRAW_HIST OGRAM,STYLE_SOLID,1);

// SetIndexDrawBegin(1,Signa lSMA);
IndicatorDigits(MarketInf o(Symbol(),MODE_DIGITS)+1 );
//---- indicator buffers mapping
if(!SetIndexBuffer(0,ind_ buffer3) && !SetIndexBuffer(1,ind_buf fer4))
Print("cannot set indicator buffers!");
//---- name for DataWindow and indicator subwindow label
IndicatorShortName("MACDF orest("+FastEMA+","+SlowE MA+","+SignalSMA+")");
SetIndexLabel(0,"MACDfore st");
SetIndexLabel(1,"MACDfore st");
//---- initialization done
return(0);
}
//+------------------------------------------------------------------+
//| Moving Averages Convergence/Divergence |
//+------------------------------------------------------------------+
int start()
{

int limit,i;
double MACDForestPre;
int counted_bars=IndicatorCou nted();
//---- check for possible errors
if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(i=limit; i>=0; i--) {
double MACDForest=iMACD(NULL,0,F astEMA,SlowEMA,SignalSMA, PRICE_MEDIAN,MODE_MAIN,i)-iMACD(NULL,0,FastEMA,Slow EMA,SignalSMA,PRICE_MEDIA N,MODE_SIGNAL,i);
if (MACDForest>=MACDForestPr e) {ind_buffer3[i]=MACDForest; ind_buffer4[i]=EMPTY_VALUE;}
if (MACDForest<MACDForestPre ) {ind_buffer4[i]=MACDForest; ind_buffer3[i]=EMPTY_VALUE;}

MACDForestPre=MACDForest;
}
//---- done
return(0);
}


... thanks for response..
backfoot is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to Rewrite Specific Macd from MQL or MultiChart for NT backfoot Automated Trading 2 09-05-2008 01:24 PM
Need Help in Convert This MACD to Multichart theman Coding Forum 3 06-01-2008 09:03 AM

All times are GMT -4. The time now is 11:56 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.