Please do not post the same question multiple times. I have posted an answer to 
your original question here:

http://finance.groups.yahoo.com/group/amibroker/message/139867

If that does not answer your question, it would be better to add a new reply 
instead of starting a new thread.

Mike

--- In [email protected], "schnitt_tt" <schnitt...@...> wrote:
>
> Hi,
> 
> just make my first steps in AFL, to get a "Debugging" functionality I
> try to put a shape on a chart if a condition is met. (Software
> development is givin`.
> 
> target: if "GAP DOWN" appears show a shape.
> 
>   "ARRAY"-Version
> 
> it_gap     = GapDown();
> 
> PlotShapes( IIf( it_gap,  shapeDownTriangle , shapeNone ), colorRed );
> PlotShapes( IIf( GapUp(),  shapeUpTriangle , shapeNone ), colorGreen);
> 
> does function !!!!  [:)]
> 
>   "LOOP"-Version:
> 
> it_gap     = GapDown();
> for( i = 1; i < BarCount; i++ )
> {
> 
>     if( it_gap[i] == True )
>     {
>       PlotShapes(   shapeUpTriangle , colorGreen );
>      }
>      else
>      {
>        PlotShapes(   shapeNone , colorRed );
>      }
> }
> 
> ->result is .... on every single bar a shape is drawn.
> 
> here is how I think the "LOOP-Version" is function ...
> 
> 1) the array it_gap is filled via function "GAP_DOWN()"
> 
>      in it_gap is for every bar that has a gap the "number" 1.
> 
> 2) FOR loop
> 
>       doesn`T work ... I thought in the For loop I look at every single
> day. if it is true (1) a green shape should appear,
>      otherwise no shape will be drawn  ..
> 
> 
> 
> thx for your reply schnitt ...
>


Reply via email to