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
print(currentbar, " H ", High, " H ", High, " hgUp ", highUp, " D ", Date, " T ", Time );
if ( High < High and not highUp ) then
highUp = TRUE;
if ( High > High and highUp ) then
highUp = FALSE;
Value1 = Arw_new( Date, Time, High, True );
Value2 = Arw_setstyle( Value1, 0 );
print ( currentbar, " Arrow D ", Date, " T ", Time, " H ", High );
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.