Hi colleagues,
I have a question above averaging. If shortonmarket and I have accumulated 2 contracts, and the price emerge above zero, I mean it is already positive, how can I close these two contracts??
IF SHORTONMARKET AND COUNTOFSHORTSHARES>=2 AND positionprice>tradeprice(2) (??????) THEN
EXITSHORT AT MARKET
ENDIF
I mean, I don’t know how to code the position price when is already in positive.
Thanks,
Juan