afl debugging

  1. M

    sell cover end of trading session. need help

    Hello All, I have a problem with exit trade at EOD end of trading session 11:00 PM. I am trying the following code. tim=Param("Square off time ",230000,09000,240000); StopLevel = Param( "Stop Loss (%)", 0.06, 0.01, 10, 0.01 ); TgtLevel = Param( "Profit target (%)", 0.25, 0.01, 10, 0.01 )...
  2. MCXgain

    Need help in improving Non- rapainting AFL to scan stocks

    Hi, I’m working on a intraday stock scanner which is plotting the signal on previous bars in many cases(see the attached image for clarification). I would be grateful if anyone can help me modifying its behavior and plot the signal on current bar. https://ibb.co/czL8p6 https://ibb.co/h1ypwm...
  3. 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++ ) {...
  4. S

    Any one please correct this AFL Error?

    _SECTION_BEGIN("INTRADAY AFL"); _SECTION_BEGIN ( "Chart Display Theme" ); ChartDisplayTheme = ParamList ( "Chart Display Theme", "White background with B/W candles|Black background with R/G candles", 1 ); param_ShowSystemTitle = ParamToggle ( "Show System Title ?", "No|Yes", 1 )...
  5. C

    Help debugging simple AFL code

    Hi, Please help me debug following code. I am encountering error in 6th line when accessing the array Close beyond a certain index. The error encountered is following: Error 10. Array subscript out of range. You must not access array elements outside 0..(BarCount-1) range. You attempted...