I have the following code:
Basically it is going to mark each swing high.
This code seems to work fine in 5 minute bar chart.
But in a volume chart some work some don't.
Is my logic wrong or arw_new is not accurate enough to put the arrow in volume bars ?
Code: Select all
variables: highUp(FALSE);
print(currentbar, " H[1] ", High[1], " H ", High, " hgUp ", highUp, " D ", Date, " T ", Time );
if ( High[1] < High and not highUp ) then
begin
highUp = TRUE;
end;
if ( High[1] > High and highUp ) then
begin
highUp = FALSE;
Value1 = Arw_new( Date[1], Time[1], High[1], True );
Value2 = Arw_setstyle( Value1, 0 );
print ( currentbar, " Arrow D[1] ", Date[1], " T[1] ", Time[1], " H[1] ", High[1] );
end;
I attached the screenshot the one with ticker red arrow I think is wrong.
Looking at the output log the High value pointing to the correct bar.
Thank you
Tony