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

Stop a Prorealtime bot

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.

credit image : https://www.maxpixel.net/Attention-Traffic-Sign-Shield-Stop-Road-Sign-634941


Download for free the “SEVEN PILLARS TO BUILD A WINNER PROREALTIME BOT”

The “SEVEN PILLARS TO BUILD A WINNER PROREALTIME BOT” is a PDF containing 63 pages allowing you to improve the success of your automated trading system.

Leave a Reply