Rank: Advanced Member
Groups: Moderators, Registered, Registered Users, Subscribers Joined: 10/8/2010(UTC) Posts: 1,960
Thanks: 92 times Was thanked: 155 time(s) in 150 post(s)
|
Walid Khalil’s article, “Sentiment Zone Oscillator”
introduced his indicator of the same name.
Below are the steps to make one indicator that plots both the SZO and
the OB/OS levels:
- Tools menu, select New to open the Indicator Editor
for a new indicator.
-
Period:= Input("Y",2,200,14);
lperiod:= 30;
pcent:= 95;
R:= If(C>Ref(C,-1),1,-1);
SP:= Tema(r,period);
SZO:= 100*(SP/period);
hlp:= HHV(szo, lperiod);
llp:= LLV(szo, lperiod);
prange:= (hlp-llp)*(pcent/100);
ob:= llp+prange;
OS:= hlp-prange;
SZO;
OB;
OS
- Ok to close the Indicator Editor.
- Ok to close the Indicator Editor.
- Ok to close the Indicator Builder.
The system test for the SZO can be made as follows:
- Tools > the New
- Buy Order tab and enter the
following formula.
Period:= 14;
lperiod:= 30;
pcent:= 95;
R:= If(C>Ref(C,-1),1,-1);
SP:= Tema(r,period);
SZO:= 100*(SP/period);
hlp:= HHV(szo, lperiod);
llp:= LLV(szo, lperiod);
prange:= (hlp-llp)*(pcent/100);
ob:= llp+prange;
OS:= hlp-prange;
con1:= C > Mov(C,60,E) AND
Cross(Mov(szo,30,S),0);
con2:= C > Mov(C,60,E) AND
ROC(Mov(szo,30,S),1,$)>0 AND
szo < os;
con3:= Cross(SZO, os) AND
Mov(szo,30,S)>0 AND
ROC(Mov(C,60,E),1,$)>0;
con1 OR con2 OR con3
- Sell Order tab and enter
the following formula.
Period:= 14;
R:= If(C>Ref(C,-1),1,-1);
SP:= Tema(r,period);
SZO:= 100*(SP/period);
Cross(0,SZO) OR
(Cross(7,SZO) AND
Mov(szo,30,S)<0)
- OK to close the system editor.
|