PureBytes Links
Trading Reference Links
|
Replacing the plot statments with buy/sell should have done the trick.
Maybe you could try:
if marketPosition < 1 and mode = 1 then buy;
if marketPosition > -1 and mode = -1 then sell;
Also, be sure to save it as a system.
Kent
-----Original Message-----
From: leegoldberg@xxxxxxxxxxxx <leegoldberg@xxxxxxxxxxxx>
To: omega-list@xxxxxxxxxx <omega-list@xxxxxxxxxx>
Date: Tuesday, July 11, 2000 7:25 PM
Subject: Stop and reverse code Help needed
Hi
Recently one of the members helped with this indicator - starting and
stoping
of the ploting in response to the market action.
Can anyone suggest changes to generate a signal that can be backtested and
quantified?
I tried adding buy and sell instead of the plot command, but not the right
way to do it.
If anyone can suggest a way I would appreciate it a great deal. (I am trying
to make a stop and reverse system).
Thanks
Lee
***************************************
Input:
TickSize(.1),
XTics(3),
MA1Len(10),
MA2Len(10);
Var:
MA1(0),
MA2(0),
Mode(1);
MA1 = Average(L, MA1Len);
MA2 = Average(H, MA2Len);
If Mode = 1 and C < MA1 - XTics * TickSize then Mode = -1;
If Mode = -1 and C > MA2 + XTics * TickSize then Mode = 1;
If Mode = 1 then Plot1(MA1, "MA1");
If Mode = -1 then Plot2(MA2, "MA2");
|