ExecuteMarketOder accepting one more double than what is in the docs

Created at 13 Jul 2021, 02:54
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
MA

manelfx9530

Joined 16.10.2019

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.


@manelfx9530
Replies

PanagiotisCharalampous
13 Jul 2021, 11:06

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 

Join us on Telegram and Facebook 


@PanagiotisCharalampous

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 

Join us on Telegram and Facebook 

Never thought an obsolete parameter would affect so much the whole class, its working as it should now. Thanks :)


@manelfx9530