afl formula datenum

  1. P

    why this code not working

    Hi, Can you help me why below code not working & why? _SECTION_BEGIN("MAX Moving Avg broke"); n=0; function fun_name(C,LB ) { LB=IIf(IsNull(LB),1,LB) OR IIf(LB<=0,1,LB); R=ValueWhen(Cross(MA(C,LB),C),HHV(H,LB),1); result=IIf(C>=R,LB,0); return result; } for( i = 0; i < BarCount; i++ ) {...
  2. O

    afl to mark Brexit

    I need help to write an indicator which will show significant dates such as Brexit on all charts shown. I know it's possible to manually draw a line and add text but I want to achieve this automatically. I have used Metastock and it was possible via their Expert Advisor. I have tried using...