I am trying to put in a bar delay or time delay.Either will do, just can't get the conditon error to go away.Obviously I can't understand
what condition means for this Delay code? I assume it means the condition for order entry. When I put in the signal criteria I just keep
getting errors. I have been spending a LOT of time on this with NO success.That's why I am here.
JimTrader1
You mean the bit where you compile it and it says "condition: variable not defined"
Well that is because you have a test
if (condition) LastEntryDetected = Time[0];
so unless you define a Boolean variable called condition and assign a useful value to it it will not work!
You also have
int ord; { if (Use_Static_Lot==true&&Static_Lot>=MarketInfo(Symbol(),MODE_MINLOT))LOT=Static_Lot; else if(Use_Static_Lot==false&& risk>0) { double MINLOT = MarketInfo(Symbol(),MODE_MINLOT); LOT = AccountFreeMargin()*risk/100/MarketInfo(Symbol(),MODE_MARGINREQUIRED)/ord; if (LOT>MarketInfo(Symbol(),MODE_MAXLOT)) LOT = MarketInfo(Symbol(),MODE_MAXLOT); if (LOT<MINLOT) LOT = MINLOT; if (MINLOT<0.1) LOT = NormalizeDouble(LOT,2); else LOT = NormalizeDouble(LOT,1); } else {Alert("Error You Have Choosed Wrong Lots ",Symbol());return;} return(LOT); }
A piece of orphan code which looks as though somebody has deleted the function name and type.
It seems to me that you are trying to run before you can walk, diving in to modify a large program without understanding the basics. That is not a good way to learn. Try starting at the beginning of the book.
You mean the bit where you compile it and it says "condition: variable not defined"
Well that is because you have a test
so unless you define a Boolean variable called condition and assign a useful value to it it will not work!
You also have
A piece of orphan code which looks as though somebody has deleted the function name and type.
It seems to me that you are trying to run before you can walk, diving in to modify a large program without understanding the basics. That is not a good way to learn. Try starting at the beginning of the book.
dabbler, thanks. Yes you are right, I am chopping up other EA'S and putting my own stuff in .I KNOW this is tricky and difficult. There are still a lot of words and functions I need to learn yet. Trouble is I have been working at this for over a year and need to get a small account going also. I have studied the book and understand the basic building blocks of the code. Got a unique method that really knocks them out, even 100% accuracy. If I can just get the code cleaned up and right. Raptor found the error in the code. Now it just doesn't seem to do what it is supposed to. I am going to send you the one I am using to test this Delay code.It is NOT the advanced Scalping method that I really want it to work on. The one I am sending has a Stochastics and RSI Overbought, Oversold for the Delay entry instead of a bar or time Delay. This is the one I prefer but doesn't seem to be doing anything right now. See if you can tell why and I am also going to get back into the MQL4 book basics myself.
JimTrader1
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I am trying to put in a bar delay or time delay.Either will do, just can't get the conditon error to go away.Obviously I can't understand
what condition means for this Delay code? I assume it means the condition for order entry. When I put in the signal criteria I just keep
getting errors. I have been spending a LOT of time on this with NO success.That's why I am here.
JimTrader1