PureBytes Links
Trading Reference Links
|
Do these as 2 separate paintbar studies so that you can} plot the
crossups a different color from the crossdowns. You can set the color
you want for the study under File-Properties in the PowerEditor.
dbs
crossup paintbar study.........
vars:crossup(0),crossdn(0);
if whatever1 crosses above whatever2
then begin
crossup=1;crossdn=0;
end;
if whatever1 crosses below whatever2
then begin
crossdn=1;crossup=0;
end;
if currentbar>=1 then begin
if crossup=1 then begin
plot1(H,"H");
plot2(L,"L");
end;
end;
crossdn paintbar study.........
vars:crossup(0),crossdn(0);
if whatever1 crosses above whatever2
then begin
crossup=1;crossdn=0;
end;
if whatever1 crosses below whatever2
then begin
crossdn=1;crossup=0;
end;
if currentbar>=1 then begin
if crossdn=1 then begin
plot1(H,"H");
plot2(L,"L");
end;
end;
|