PS 4 day Range switch

This is the place to discuss EdgeRater Chart Script

Moderator: Chris White

Post Reply
henry1224
Posts: 457
Joined: Wed Feb 24, 2016 12:04 pm

PS 4 day Range switch

Post by henry1224 »

D1:=If(C>Ref(Max(H,Max(Ref(H,3),Max(Ref(H,1),Ref(H,2)))),1),
Min(L,Min(Ref(L,1),Min(Ref(L,2),Ref(L,3)))),Max(H,Max(Ref(H,1),Max(Ref(H,2),Ref(H,3)))));
D2:=If(C<Ref(Min(L,Min(Ref(L,1),Min(Ref(L,2),Ref(L,3)))),1),
Max(H,Max(Ref(H,1),Max(Ref(H,2),Ref(H,3)))),Min(L,Min(Ref(L,1),Min(Ref(L,2),Ref(L,3)))));


a:=Cross(C,d1);
b:=Cross(d2,C);

Long:BarsSince(A)<BarsSince(B),ColorGreen;
Short:BarsSince(A)>BarsSince(B),ColorRed;
FillRgn(Long>0,0,Long),Brush#50008000;
FillRgn(Short>0,0,Short),Brush#50800000;
Post Reply