Discussion - page 141

 

All the statements/performance, excel files and leaders' threads were updated. Please read this post https://www.mql5.com/en/forum/173403/page39 and this thread https://www.mql5.com/en/forum/174416

(note: next week it will be the different location of the statements/performance - just to keep old performance inside this section).

 

Ray

Even though I do not see an iCustom() call in the EA, I suppose this is what you are trying to achieve :
double ma1Now = iCustom(NULL,0,"RK-Heatmap-MAwAlerts-trend_arrows",0,MaPeriod1,MaShift1,MaMethod1,MaPrice1,MaPeriod2,MaShift2,MaMethod2,MaPrice2,0,0)

double ma2Now = iCustom(NULL,0,"RK-Heatmap-MAwAlerts-trend_arrows",0,MaPeriod1,MaShift1,MaMethod1,MaPrice1,MaPeriod2,MaShift2,MaMethod2,MaPrice2,1,0)

double ma1Pre = iCustom(NULL,0,"RK-Heatmap-MAwAlerts-trend_arrows",0,MaPeriod1,MaShift1,MaMethod1,MaPrice1,MaPeriod2,MaShift2,MaMethod2,MaPrice2,0,1)

double ma2Pre = iCustom(NULL,0,"RK-Heatmap-MAwAlerts-trend_arrows",0,MaPeriod1,MaShift1,MaMethod1,MaPrice1,MaPeriod2,MaShift2,MaMethod2,MaPrice2,1,1)

You do not need to call it separately (by changing some parameters) - all the "communication" done between you and indicator called through iCustom() is done through last 2 parameters : the number of the buffer you retreive determines which value you want and shift which determines which value from that buffer do you want. In fact, if you change any parameter except the last 2, then you are getting another instance of indicator running. The way it is done in the example only 1 instance of the indicator will be running and you just "pick" the value you wish

__________________________________

PS: first parameter of RK-Heatmap-MAwAlerts is the time frame again. If you want to use other time frames, set it to 0 (as it is now in the example) and use the second parameter of iCustom() for that instead

PPS: you should change the default alertsOn and showArrows parameter from true to false too (otherwise you risk a "phantom" arrows and alerts in runtime and you are not going to know where do they come from)

regards

Mladen

traderduke:
ND or Mladen or Mrtools.

ND- Thanks for your time and the suggestions but I need more help!

This indicator & EA work as attached. The Ea looks for a cross of the MAs and a diff of .0004 to enter a buy or sell. I primarily use on Renko but it also wins on backtest with EURUSD-H4. It uses the Indicator settings except for the diff which CAN be controlled from the EA and that is my problem.

How do you set up the iCustom to control the 2 MA periods, I can’t seem to get the format correct?? Is this the right thread to be asking this question, If not then where should I be??

Thank you and have a nice weekend

Ray
 

Mladen beat me too it !!

 

mladen

Your perception of what I want is clearer then my request.

Thank you

Ray

mladen:
Ray

PS: first parameter of RK-Heatmap-MAwAlerts is the time frame again. If you want to use other time frames, set it to 0 (as it is now in the example) and use the second parameter of iCustom() for that instead

PPS: you should change the default alertsOn and showArrows parameter from true to false too (otherwise you risk a "phantom" arrows and alerts in runtime and you are not going to know where do they come from)

regards

Mladen
 

All the statements/performance, excel files and leaders' threads were updated. Please read this post https://www.mql5.com/en/forum/173403/page39 and this thread https://www.mql5.com/en/forum/174416

(note: next week it will be the different location of the statements/performance - just to keep old performance inside this section).

 

All the statements/performance, excel files and leaders' threads were updated. Please read this post https://www.mql5.com/en/forum/173403/page39 and this thread https://www.mql5.com/en/forum/174416

(note: next week it will be the different location of the statements/performance - just to keep old performance inside this section).

 

I just looked at elite servers for Metatraders and many EAs (most of them) made good profit today. Especially NewsTrader EA.

I will post all the statements during the weekend.

 

All the statements/performance, excel files and leaders' threads were updated. Please read this post https://www.mql5.com/en/forum/173403/page39 and this thread https://www.mql5.com/en/forum/174416

(note: next week it will be the different location of the statements/performance - just to keep old performance inside this section).

Reason: