I am using a Ctrade object for trade execution:
the volume, stop loss, take profit is OK, but the price execution, no matter how I set, it always trade at the current price.
Is it a mistake in Ctrade library, anyone who meet the same problem? Thanks for any help.
https://www.mql5.com/en/docs/standardlibrary/tradeclasses/ctrade/ctradebuystop
https://www.mql5.com/en/docs/standardlibrary/tradeclasses/ctrade/ctradebuylimit
these should help you
- www.mql5.com
https://www.mql5.com/en/docs/standardlibrary/tradeclasses/ctrade/ctradebuystop
https://www.mql5.com/en/docs/standardlibrary/tradeclasses/ctrade/ctradebuylimit
these should help you
And for sure, is function PositionOpen(symbol,order_type,volume,price,sl,tp,cmt) in this CTrade class, the price parameter is for nothing, it will trade at market price?
And for sure, is function PositionOpen(symbol,order_type,volume,price,sl,tp,cmt) in this CTrade class, the price parameter is for nothing, it will trade at market price?
it's not for nothing, it's for the order type you want to assign as part of the arguments to that method, ORDER_TYPE_BUY and ORDER_TYPE_SELL will use market price, other than that read the documentation about stop or limit order
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I am using a Ctrade object for trade execution:
trade_obj.Buy(trade_volume,_Symbol,trade_price,stop_loss,take_profit);
the volume, stop loss, take profit is OK, but the price execution, no matter how I set, it always trade at the current price.
Is it a mistake in Ctrade library, anyone who meet the same problem? Thanks for any help.