Artificall.com

There are different ways to shut down a ProOrder strategy launched on ProrealTime. You can stop it on interface or thanks to instruction in source code.

Stop a system from the interface

To stop an automatic trading system on the interface, you just click on the stop button :

After you clicked on STOP button, ProOrder will ask you to confirm :

Stop all systems from the interface

It’s already possible to stop all systems thanks to “STOP ALL” button.

After you clicked on STOP ALL button, ProOrder will ask you to confirm :

Automatic closing of your opened positions

When you stop a strategy or stop all your strategies from the Prorealtime interface, all your opened positions will be closed at the market.

Halt a system in source code

You can stop an automatic trading system in source code thanks to the « QUIT » instruction. This instruction must be encapsulated in a condition block. When the condition becomes true, QUIT instruction turns off the program.

Be careful with opened positions and orders !

One has to be very careful then about the opened positions and the current orders because, after the system stoppage, they will be already actives. You must absolutely implement a closing instruction in your QUIT block in purpose to close all your opening positions.

To close a call position, you can use SELL AT MARKET instruction, and to close a short position you can use EXISTSHORT AT MARKET.

Example of source code with QUIT instruction :

//----------------------------------------------------------
// * ARRET DU PROGRAMME *//
conditionARRET=// set your stopping condition here
IF conditionARRET THEN
IF LongOnMarket THEN
SELL AT MARKET
ENDIF
IF ShortOnMarket THEN
EXISTSHORT AT MARKET
ENDIF
// * ARRET DU PROGRAMME *//
QUIT
ENDIF
//----------------------------------------------------------

If you want learning more about automatic trading, please click here.

If you are any questions, please ask me in a comment and if this article pleased you I would be grateful to see you share it.


Subscribe to our newsletter!


Leave a Reply

Your email address will not be published. Required fields are marked *