DislikedHi, first of all what courses do you coders recommend for learning to code mql4? I was in the bookstore looking at a Java script book.... it was so big, I think they chopped down 3 trees to print it. I've found this EA.. I've spent days and days (because I don't know code) tweaking the settings to what I like...I like all the MM inside. but there are some yellow triangle return value checks. But no red errors. I don't know how to get rid of the 'sniper' stuff inside without creating errors...not important.. I just think it slows backtesting... don't...Ignored
At this time, dist is not exposed... first, you will need to expose as option in 250.mq4
250.mq4
extern int dist=250;
extern int SignalGap = 50;
extern int BarsToCount = 500;
Next, you will need to add this param to your EA as options so you can change at test time.
iCustom-EA.mq4
extern string IndicatorName = "250";
extern int BuyBuffer = 1; //BUY
extern int SellBuffer = 0; //SELL
extern int distance = 250; //distance used in 250.mq4
Finally, you pass this param when you call iCustom.
if(usesniper){
double SNI0=iCustom(Symbol(),0, IndicatorName,distance,BuyBuffer,shift); //BUY
double SNI1=iCustom(Symbol(),0, IndicatorName,distance, SellBuffer,shift); //SELL
}
That should work for your test.
Regarding yellow warnings.. it is just warning - recommended coding practice.
Because you have used just sample code from autogeneraged EA... it is not perfact.
you just have to fix one by one..
example:
'void' function returns a value iCustom-EA.mq4 524 19
code says
return(0);
and it should just be return, not return(0) - returning a value in void function.
Since you are studying code, I thought this would give you a chance to fix by yourself.
Good luck.
I still don't know where is the Holy Grail
1