Hedging - Close open positions in profit first

ixbone
Posts: 2
Joined: Fri May 18, 2012 5:46 pm
Location: Vienna, Austria

Hedging - Close open positions in profit first

Post by ixbone »

the easy way:
-select all orders you want to close
-flag your orders with profit >"0" with flag "profitflag"
-flag your orders with profit <="0" with flag "lossflag"
-select all order with flag "profitflag" and close
-select all order with flag "lossflag" and close
check if any flagged orders open, if, go back and run close function again
if no flagged orders open, clear both flags ""
Post Reply

Return to “Coders Hangout”