
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
in the strategy tester ?
Forum on trading, automated trading systems and testing trading strategies
Invalid Stops,can't place an order
fxsaber, 2018.01.20 16:53
Alternative Code
Alternative Code
but this is doing an instant sell alright ?
i need to put a pending order
When using your code,the EA open position,but i need a pending order and when using pending order that i have this problem with invalid stops.
i need to put a pending order
Read this please
Forum on trading, automated trading systems and testing trading strategies
Invalid Stops,can't place an order
fxsaber, 2018.01.20 10:50
Tester's EA
Result
MQL4-style
Alternative code
Read this please
MQL4-style
Alternative code
The alternative Code works to put pending order BUY,but when i change it to sell,i have errors:
getting 4756 error
The alternative Code works to put pending order BUY,but when i change it to sell,i have errors:
getting 4756 error
Good Luck!
Good Luck!
now it's selling ! but i'm having a issue with stop loss that is blowing my mind .
if i put like your code :
Works !
if i put :
Works !
if i put :
doesn't work.
See the image please :
Now,using this,i get this image :
if i use this :
i get :
the value of stop_loss = 79406
What is wrong when i use the stop loss var ?
I think we are close to fix it ! Thanks for helping me !
The alternative Code works to put pending order BUY,but when i change it to sell,i have errors:
getting 4756 error
ORDER_TYPE_SELL
That's not a pending order.
That's not a correct way to set price/sl, you need to normalize to tick size, not to points.
On Bra50Feb18 prices vary by 5 points (1 tick).
Forum on trading, automated trading systems and testing trading strategies
Need help to round order last digit to 0 or 5
Alain Verleyen, 2016.10.23 18:47
Normalize your price like that :
//| Normalize price according to tick size |
//+------------------------------------------------------------------+
double normalizePrice(double price)
{
double tickSize=SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_SIZE);
return(MathRound(price/tickSize)*tickSize);
}
That's not a pending order.
That's not a correct way to set price/sl, you need to normalize to tick size, not to points.
On Bra50Feb18 prices vary by 5 points (1 tick).
WOW,After 1 day trying to solve the problem !
Thank you Very much Alain and fxsaber !!!!!!!!!!!!!!!!
WOW,After 1 day trying to solve the problem !
Thank you Very much Alain and fxsaber !!!!!!!!!!!!!!!!
As a side note, in general, you also have to check the stops level (15 currently for this symbol).