PS 5 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 5 Day range switch

Post by henry1224 »

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


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

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