ExecuteMarketOder accepting one more double than what is in the docs
ExecuteMarketOder accepting one more double than what is in the docs
13 Jul 2021, 02:54
So as you can see from this warning my executeMarketOrder is accepting when more double after the SL and TP and i have no idea what it is. Does anyone knows?
Error CS0618: 'cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType, cAlgo.API.Internals.Symbol, double, string, double?, double?, double?, string, bool, cAlgo.API.StopTriggerMethod?)'.....
And what i wrote in the code: ExecuteMarketOrder(TradeType.Buy, Symbol, volumeInUnits, label, 20, 20, 10, "", true, StopTriggerMethod.Trade);
No idea what that 10 means but if i dont put a number there it gives an error.
Replies
manelfx9530
13 Jul 2021, 11:22
RE:
PanagiotisCharalampous said:
Hi,
As the message indicates
Error CS0618: 'cAlgo.API.Robot.ExecuteMarketOrder(cAlgo.API.TradeType, cAlgo.API.Internals.Symbol, double, string, double?, double?, double?, string, bool, cAlgo.API.StopTriggerMethod?)' is obsolete: 'Parameter 'Symbol symbol' was replaced with 'string symbolName'. More details here https://ctrader.com/forum/announcements/15847'
Check here for the available overloads of the method.
Best Regards,
Panagiotis
Never thought an obsolete parameter would affect so much the whole class, its working as it should now. Thanks :)
@manelfx9530
PanagiotisCharalampous
13 Jul 2021, 11:06
Hi,
As the message indicates
Check here for the available overloads of the method.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous