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

Can anyone help me



PureBytes Links

Trading Reference Links



<SPAN 
class=220314304-14082001>Hello, 
<SPAN 
class=220314304-14082001> 
<FONT 
size=2>Can anyone please help me with 
the indicator I have written for stops.
 
I have short and long SD 
and ATR stops. (Stops are shifted forward)
 
I only want the long stop to be 
displayed on the chart only if it is the lowest of the SD or ATR long 
stop
and the short stop to 
be displayed on the chart only if it is the highest of the SD and ATR short 
stop. 
 
I am using a white 
background.
 
Can anyone help, 
please?
 
Thankyou,
Larry 
Lovrencic
 
/*ATR-SD 
Stops Forward by Larry Lovrencic*/
 
maxgraph=6;
 
graph0 
=close;graph0style=128;graph0color=36;
<FONT color=#000080 
size=2> 
<FONT color=#000080 
size=2>/*Standard Dev Long Stop*/
<FONT color=#000080 
size=2>sdls=((ref(low,-1))-(2*(ref(stdev(low,5),-1))));
<FONT color=#000080 
size=2>/*Standard Deviation Short 
Stop*/sdss=((ref(high,-1))+(2*(ref(stdev(high,5),-1))));
 
/*Highest 
high value of SD long stop*/
sdhhvl 
=HHV(sdls,7);graph1=sdhhvl;
 
<FONT 
size=2>/*Lowest low value of SD short 
stop*/<FONT color=#000080 
size=2>sdllvs=LLV(sdss,7);graph2=sdllvs;
 
<FONT color=#000080 
size=2>graph1style=4+8+16+512;
graph2style=4+8+16+512;graphxspace = 
5;
 
/*Average 
True Range Long Stop*/
atrls=(ref(c,-1)- 
(1.5*(ref(ATR(5),-1))));
<FONT color=#000080 
size=2>/*Average True Range Short 
Stop*/atrss=(ref(c,-1)+(1.5*(ref(ATR(5),-1))));
 
/*Highest 
high value of ATR long stop*/
atrhhvl=HHV(atrls, 
7);
<FONT color=#000080 
size=2>graph3=atrhhvl;
/*Lowest 
low value of ATR short stop*/atrllvs=LLV(atrss, 
7);
graph4=atrllvs;
 
<FONT color=#000080 
size=2>graph3style=4+8+16+512;
<FONT color=#000080 
size=2>graph4style=4+8+16+512;
 
<FONT color=#000080 
size=2>graph1color=iif((sdhhvl)<(atrhhvl),5,2);graph2color=iif((atrhhvl)<(sdhhvl),10,2);graph3color=iif((sdllvs)>(atrllvs),6,2);graph4color=iif((atrllvs)>(sdllvs),11,2);
 
title = name() + "- SD L Stopwas-" + 
writeval(graph1) + "-SD S Stop was-" + writeval( graph2 ) + "- ATR L Stop was-" 
+ writeval(graph3) + "- ATR S Stop was-" + 
writeval(graph4);