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

Re: Simple Easy Language Code



PureBytes Links

Trading Reference Links

Bob and Bill:

Thank you for your insight.  Bob thank you for the code.  I am going to
study it and try to figure out what is going on with each line.  I have a pretty
good idea, but I would never have come up with that by myself.

Thank you for your help. 

Charles

Bill Wynne described the problem correctly.

But I am guessing that you want to sell at some amount below the tops, etc.

The trouble with the Highest(High, XX) function is that it searches back in
time to a high. What I think you want is to move forward in time keeping
track of new highs.

The following code should do that:

Bob Fulks

---

Inputs: BZ(2), SZ(1);

Vars: HHigh(0), LLow(0), MP(0);

MP = MarketPosition;

HHigh = iff(High > HHigh or MP <> MP[1], High, HHigh);
LLow  = iff(Low  < LLow  or MP <> MP[1], Low,  LLow);

if MP >= 0 then Sell next bar at HHigh * (1 - 0.01 * SZ) stop;
if MP <= 0 then Buy  next bar at LLow  * (1 + 0.01 * BZ) stop;




--