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
Hi all:
I'm a new comer to MQL5. When I want to write a simple EA with SL and TP , I can't set SL and TP correctly. I choose Standart library Ctrade. The code is like following. The PrintRequest and PrintResult show I set TP and SL correctly. But when I use history tester , I found there is no SL/TP set. So always only 1 trade invoked. Anyone can give a hand ?
trade.Buy(0.1,NULL,sym.Ask(),sl,tp);
trade.PrintRequest();
trade.PrintResult();
Print("Result = ",trade.RequestTP()," " ,trade.RequestSL());