All time high and low with date stamp in the form of GfxTextOut...

Dear Respected Members,

I am new to the forum and coding the AFL.

Could you please help me out to get out the error from the following code;

I just need the date when the script hit all-time

dt = DateTime();
hh = highest( H);
nwhh = hh != Ref( hh, -1 );      // Detect new points where hhv is different from previous one
dthh = ValueWhen( nwhh, dt, 1 ); // Assign the date where the above condition was true  
ll = Lowest(L);
nwll = ll != Ref( ll, -1 );      // Same logic as hh
dtll = ValueWhen( nwll, dt, 1 );
Filter = 1;
AddColumn( hh, "ATH", 1.2 );
AddColumn( dthh, "DT ATH", formatDateTime, -1, -1, 150 );
AddColumn( ll, "ATL", 1.2 );
AddColumn( dtll, "Date ATL", formatDateTime, -1, -1, 150 );

GfxTextOut(dthh, 100, 100);


As per AmiBroker Warning and Error message:

See Time Frame Set and Date Time to String.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.