PureBytes Links
Trading Reference Links
|
{I need some help on how to write code for the
following:}
var:H20Low(0);
If high=highest(high,20) then low=H20Low;
If close < H20low then SellPrice=Low;
If close < H20Low then sell at SellPrice - 1 point
stop;
{The problem I am trying to solve is this situation:
Day 1: Highest(high,20) is 100 the low is 90 so
H20Low=90
Day 2: The close is 85 which less than H20Low and the
low is 80 and so SellPrice=80
Day 3: The close is 85 which less than H20Low and the
low is 88 so SellPrice=88
The system then goes short at 87, one tick below 88 as
the close on day 2 was less than H20Low
I want to lock in the selling price on Day 2's low of
80 and disregard any other instances
of the close being below H20Low. Can anyone help me
with this?}
=====
Regards,
Mike Kittelson
|