Without showing the codes, you're asking to play the guessing game. Tell you what ... do some debugging. Put a Print statement after every condition. Example:
start(){ Print("Here=========1"); if(condition == true){ Print( "Here=========2" ); for(int i=0; i<Total; i++){ Print( "Here=========3" ); } } if() Print( "Here=========4" ); ..........And So On.................... }You might be able to substitute Print with Comment. That'll probably be easier to look at. You're just looking for the last Print Statement where it Stopped. Or the ones which wasn't executed. Then you go to where it Stopped and Think why didn't this Condition execute.
Hi guys, i have an EA which i coded myself entirely, and apparently it doesnt put on trades for i dont know what reason.I wont tell you what the algorithm does but i can tell that no matter what the market conditions are it should trade atleast 1 trade/day, since in backtest it traded in average 20 trades/day.But 1 trade atleast/day NO MATTER WHAT, yet i left the MT4 on yesterday the entire day, and it didnt took any trades.Please help me sort out why it didnt.
Here is what i already know are NOT the problem:
- There is enough capital in the demo account, i started with 100 €, and the start lot size will be 0.01 LOT which is supported by my 200:1 leverage
- The lot size is calculated by an algorithm,but its truncated by NormalizeDouble, to 2 decimals so it should work fine
That isn't the correct way of sorting your position size, it must be a multiple of LotStep . . . this has been discussed many times on the Forum. If you are reporting errors this would produce an error 131
Proximus:
- In the Experts and Journal tab there was no error reported
Do you check return values from all your trading functions and report any errors ?
- The EA has a spread filter it only lets us trade when the spread is smaller than 15 pip (5 digit broker), but on the EUR/USD my broker has a targed spread of 10 pip so that should also work
How do you know that you have the correct conditions for a trade to be placed ? are you printing this fact to the log ? do you have debugging in your EA so you can trace issues like this ?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi guys, i have an EA which i coded myself entirely, and apparently it doesnt put on trades for i dont know what reason.I wont tell you what the algorithm does but i can tell that no matter what the market conditions are it should trade atleast 1 trade/day, since in backtest it traded in average 20 trades/day.But 1 trade atleast/day NO MATTER WHAT, yet i left the MT4 on yesterday the entire day, and it didnt took any trades.Please help me sort out why it didnt.
Here is what i already know are NOT the problem: