Right way to Reset a BrokerCommand

Posted By: dpn

Right way to Reset a BrokerCommand - 12/28/21 11:37

Hello to all.

The following is an abstract from the manual:

Variables or text set up with brokerCommand keep their content until modified by another brokerCommand. Take care of this when a previous trading session has used this command to set a variable or text


I have a question (probably stupid):
After setting a BrokerCommand(SET_ORDERTEXT, abc), is it correct to set another BrokerCommand(SET_ORDERTEXT, "") to reset the ordertext "abc" to the default value (i.e. "blank")?
Or does exists another way [f.i. BrokerCommand (RESET_ORDERTEXT)]?


Thank you
Have a Nice Day
Posted By: jcl

Re: Right way to Reset a BrokerCommand - 12/28/21 14:59

The warning in the manual is for commands that affect external programs, like MT4 or MT5. Normal broker API commands are automatically reset at login.

For resetting the order text, use brokerCommand(SET_ORDERTEXT, "").
Posted By: dpn

Re: Right way to Reset a BrokerCommand - 12/28/21 15:34

Thank you @jcl

Best Regards
© 2024 lite-C Forums