Instruction to close a long position.
Syntax:
1 |
SELL |
Example :
1 2 3 |
If LongOnMarket AND ExitConditions THEN SELL AT MARKET ENDIF |
Instruction to close a long position.
Syntax:
1 |
SELL |
Example :
1 2 3 |
If LongOnMarket AND ExitConditions THEN SELL AT MARKET ENDIF |
With “DEFPARAM CUMULATEORDERS = TRUE” I was not able to sell all shares of a position in one step.
Example: I buy 3 shares and sell them later with “SELL AT MARKET”. Two shares are sold, the last one hours later. It is not preditable.
Is there a way to force all shares of a position to be sold at the same time?
I get the same problem and solve it using a round at 10 units using this kind of formula :
qty = ROUND((n_lot)/10)*10