You probably did not calculate the SL/TP values correctly so the price never reached those levels.
My bot works with visual testing.
Just not with optimization.
Anyway, for buying this is my calculation:
Bid = SymbolInfoDouble(_Symbol, SYMBOL_BID); // Current Bid price.
Ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK); // Current Ask price.
TP = Ask + (TakeProfit_inPips * _Point);
SL = Bid - (StopLoss_inPips * _Point);
For selling:
TP = Bid - (TakeProfit_inPips * _Point);
SL = Ask + (StopLoss_inPips * _Point);
Pip is not the same as point. Without knowing the values no one can say exactly what is going on.
How would you suggest changing it?
Spend some time to learn about Pip, Point and Digits. Then check the Digits value of the symbol you want to trade and use it to calculate the right SL/TP value.

Profit to pips
- 2015.01.14
- www.mql5.com
Hi, how can I convert order profit to pips? Asuming I know lotsize etc. I want to create trailing stop, but profit oriented. Thanks...
How do i get a refund for purchasing a bot that is unresponsive to my modifications and just do want it wants?

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
I wrote a simple bot with MQL5.
It only has 2 input parameters (SL and TP distance)
When I run strategy tester I get no results. It just shows as if it's working forever.
Any other bot I'm testing has no problems.
Do I need to do something special for my bot to work with strategy testing?