//Code part double price=iClose(NULL,TimeFrame,0); double open = iOpen(NULL,TimeFrame,1); double close = iClose(NULL,TimeFrame,1); double high = iHigh(NULL,TimeFrame,1); double low = iLow(NULL,TimeFrame,1); double tamanhoBarra; double retracao; double entrada; double stop=0; double take=0; tamanhoBarra = open - close; retracao = tamanhoBarra * (percent/100); entrada = NormalizeTick(close + retracao); stop=NormalizeTick(entrada-StopLoss*Scale); take=NormalizeTick(entrada+StopGain*Scale); trade.BuyStop(Contratos,entrada,NULL,stop,take,0,0,NULL);
Thiago Schappo :
I have trouble with orders that trigger automatically.
When it is performed, the order is automatically triggered with new price and then the stop loss as well.
See the image:
I have trouble with orders that trigger automatically.
When it is performed, the order is automatically triggered with new price and then the stop loss as well.
See the image:
This happens in the strategy tester. What can it be?
On the EXCHANGE, a limit order (in this case Buy LImit) placed ABOVE the current price - immediately triggers.
Thiago Schappo:
I have trouble with orders that trigger automatically.
When it is performed, the order is automatically triggered with new price and then the stop loss as well.
See the image:
I have trouble with orders that trigger automatically.
When it is performed, the order is automatically triggered with new price and then the stop loss as well.
See the image:
This happens in the strategy tester. What can it be?
The order was not immediately triggered, it was 2 seconds later (placed at 10:15:00 at 100560, triggered at 10:15:02). So it seems normal.
For the stoploss it seems strange as the SL was at 100510 but triggered at 100545 and the deal is at 100535. However that's the last price that triggers order on WIN and we don't see it.
What testing mode are you using ? (real ticks or ...)
What MT5 build is it ?
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
When it is performed, the order is automatically triggered with new price and then the stop loss as well.
See the image:
This happens in the strategy tester. What can it be?