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();
TimeFrameSet(inDaily);
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 );
TimeFrameRestore();
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);
thanks