Help with code

sai20_2000

Newbie
Messages
8
Likes
0
Iam trying to combine the following condition ie

Buy cond 1 Buy when Price touch 6 period EMA diaplaced 4 periods of HIGH ahead , when cond 2 is valid

Buy cond2
when EWO is above its Upper Breakout Band

and for sell

sell cond 1 sell when Price touch 6 period EMA diaplaced 4 periods of LOW ahead , when cond 2 is valid

sell cond2
when EWO is Below its Lower Breakout Band

ELA Code fo EWO


Inputs: Price1(Average((H+L)/2,5) - Average((H+L)/2,35)),K(1),K2
(0.0555),Len(5);
Vars: UpperBand(0),LowerBand(0),AvgP(0);

If Price1 >0 then begin
upperband=price1;
If barnumber>=2 then
UpperBand= (upperband[1] + k2*(K*Price1 - upperband[1]));
end;


If Price1 < 0 then begin
LowerBand = Price1;
If barnumber>=2 then
LowerBand=(lowerband[1] + K2*(K*Price1 - lowerband[1]));
end;

AvgP = XAverage(Price1,Len);

Plot2(Price1,"Osc535");
Plot3(UpperBand,"upper");
Plot4(LowerBand,"lower");

Any Help in this regard is highly appreciated.
 
HI sai

How are you doing?
is it possible for you to send me the txt format for the ELA CODEwhich is attached here,please,if youdont mind,
kindly mail me at
[email protected]


regards
thanks for your time












Iam trying to combine the following condition ie

Buy cond 1 Buy when Price touch 6 period EMA diaplaced 4 periods of HIGH ahead , when cond 2 is valid

Buy cond2
when EWO is above its Upper Breakout Band

and for sell

sell cond 1 sell when Price touch 6 period EMA diaplaced 4 periods of LOW ahead , when cond 2 is valid

sell cond2
when EWO is Below its Lower Breakout Band

ELA Code fo EWO


Inputs: Price1(Average((H+L)/2,5) - Average((H+L)/2,35)),K(1),K2
(0.0555),Len(5);
Vars: UpperBand(0),LowerBand(0),AvgP(0);

If Price1 >0 then begin
upperband=price1;
If barnumber>=2 then
UpperBand= (upperband[1] + k2*(K*Price1 - upperband[1]));
end;


If Price1 < 0 then begin
LowerBand = Price1;
If barnumber>=2 then
LowerBand=(lowerband[1] + K2*(K*Price1 - lowerband[1]));
end;

AvgP = XAverage(Price1,Len);

Plot2(Price1,"Osc535");
Plot3(UpperBand,"upper");
Plot4(LowerBand,"lower");

Any Help in this regard is highly appreciated.
 

Attachments

  • ASCTREND.ELA
    13.8 KB · Views: 330
Top