PureBytes Links
Trading Reference Links
|
Hi. Tomasz and all,
How do I code so that I can be stopped out the same day I got in.
For example:
Day0 1
---------- ----------
- Signal trigged 2 end of day0
- entered to buy @ H + 0.125 stop
- entered loss stop @ L - 0.125 STOP
- H > ref(H, -1) + 0.125, buy order trigged
first, LONG
- the same day, L < ref(L,-1) - 0.125, loss
stop order trigged later, FLAT. (got
stopped out the same day.)
Actually, I do not need to know which one, H or L, comes first as
long as day1 is an outside day, the orders issued on day0 should go
LONG then FLAT or go SHORT then FLAT.
Thanks a lot.
Thomas
|