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

Re: EL Help - a system from "The Trading Game"



PureBytes Links

Trading Reference Links

Not a bad little idea...  The ELA is attached.

Here's the code:


Input:

BAvgLen(11),
BBarsAgo(21),
SAvgLen(11),
SBarsAgo(21);


Var:

BuyAvg(0),
SellAvg(0);


BuyAvg = Average(C, BAvgLen);
SellAvg = Average(C, SAvgLen);


If BuyAvg > BuyAvg[BBarsAgo] and C < C[BBarsAgo] and C > C[BAvgLen + BBarsAgo] then 
	Buy next bar at Open;


If SellAvg < SellAvg[SBarsAgo] and C > C[SBarsAgo] and C < C[SAvgLen + SBarsAgo] then 
	Sell next bar at Open;



______________________

ViZIeR <tradewiz@xxxxxxx> wrote:

Hi,

Here is a system from Ryan's books "The Trading Game", I'd appreciate if somebody can code it in EL and post it on the list. TIA

Buys: 
1)the average close of X days to be greater than the same average close Y days ago;
2)the close to be less than the close Y days ago;
3)the close to be greater than the close Y+X days ago

if the above 3 conditions are met, buy on the open next day.

Sells:
1)the average close of X days to be less than the same average close Y days ago;
2)the close to be greater than the close Y days ago;
3)the close to be less than the close Y+X days ago.

if the above 3 conditions are met; sell on the open next day.