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

Re:Code for entering with the same dollars as last exit



PureBytes Links

Trading Reference Links

I use constant dollars on a system and would like to code it to buy
about the same dollars as were recovered from the last sale and purchase
the correct number of shares for that amount.  Could someone help me
with the code?

current code.


Input:Dollars(0);
Var:Sharestotrade(0);

Sharestotrade = Dollars*1000/Close[1];


If Buytarget > 0 then buy sharestotrade shares targetprice*Buytarget
stop;


Thanks,

Jimmy