Articles on: Create Strategy

Difference between Repair Once and Repair Continuous

A Repair once condition once satisfied will not be checked again unless there is set exit or universal exit.

Whereas a Repair continuous condition will be checked perpetually.

This keeps room open for lot of infinite loop problems and hence the condition will have to be structured logically.

To use the Repair Continuous condition prudently, you may have to pair it with net qty keyword so that it does not run in loop or maybe use Lastrepairedprice keyword depending on the strategy logic requirement

Example of a bad Repair Continuous condition : LTP(XXX) < YYY

Example of a good Repair Continuous condition : LTP(XXX) < LastRepairedPrice - 15

In the first example, the condition will most likely be true every second and a new position will be taken every second which will lead to an infinite loop. After a certain number of loops, we mark such strategies to "Blocked"

In the second example, the condition is checked every second, the first time it passes as True and some positions are taken, it will also automatically update the lastrepairedprice keyword with the new data. Hence the very next second it checks, it will not pass as true unless the price drops by another 15 points and at that point it will again pass as True.

Updated on: 28/09/2022

Was this article helpful?

Share your feedback


Thank you!