Need Help in Coding

#1
Dear Friends and seniors ....


I got AFL code for my formula from one of friend in my previous thread .. in which i need help ... plz anybody rectify the problems given below ..

* as per formula Lines plotting only for current day but i need rectified code so that it should plot lines as per formula on any day while clicking on first candle of the day ... so that i can check for previous day's also ...

* Some times the candle looks compressed while it loaded in some scripts ..


plz help me friends ....

Afl Code ::::::



FB = Day() != Ref(Day(), -1);

A = ValueWhen(FB,O);
B = ValueWhen(FB,H);
Cc = ValueWhen(FB,C);

D=B-A;
E=A-cc;

F=A+(B-A)+10;
G=A-(B-A)-10;
Hh=F-12;
I=F+21;
J=G+12;
K=G-21;
Ll=I-( I*0.0045 );
M=K+( k*0.0025 );

c1=WriteIf(D<E ,"one","two");
Plot( C, "Price", ParamColor( "Color", colorDefault ), ParamStyle( "Style", styleCandle, maskPrice ) );

if(c1=="one")
{
plot (F,"",colorLightGrey,styledashed );
plot (G,"",colorLightGrey,styledashed );
plot (Hh,"",colorLightGrey,styledashed );
plot (I,"",colorLightGrey,styledashed );
plot (J,"",colorLightGrey,styledashed );
plot (K,"",colorLightGrey,styledashed );
}

if(c1=="two")
{
plot (LL,"",colorLightGrey,styledashed );
plot (M,"",colorLightGrey,styledashed );
plot ((LL-12),"",colorLightGrey,styledashed );
plot ((M+20),"",colorLightGrey,styledashed );
plot ((M+12),"",colorLightGrey,styledashed );
plot ((M-20),"",colorLightGrey,styledashed );
}
 
Last edited:

Similar threads