Problems back-testing my bot

lippmaje  
You probably did not calculate the SL/TP values correctly so the price never reached those levels.
Alon D  

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);   

lippmaje  
Pip is not the same as point. Without knowing the values no one can say exactly what is going on.
Alon D  
How would you suggest changing it?
lippmaje  

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.

https://www.mql5.com/en/forum/154469

Profit to pips
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...
LeonJ1  
How do i get a refund for purchasing a bot that is unresponsive to my modifications and just do want it wants?
Reason: