[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

optimization



PureBytes Links

Trading Reference Links

can some one help me with coding the following:

After i take a position, i wish to exit my contract in parts and 
at different percentages. so if i enter a long position at, say, 
10 contracts @ 1000 and the market moves in my favor, then i wish 
to exit 10% of position at 3% profit, then, exit 30% of position 
at 4% profit, then, exit 40% of position at 5% profit and so on in 
step wise fashion.

i wish to run an optimization for this, but cant really figure out 
the code. can someone help me write this optimization code to 
figure out

( 01 ) "NO OF CONTRACTS TO EXIT", and,
( 02 ) "THE RESPECTIVE PERCENTAGES".