[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: AFL help to understand my bug



PureBytes Links

Trading Reference Links

You 're right razzbarry12000 , I don't need a loop .
And thanks for the triks   int(barindex()) ; i would not found this
alone ...

In fact my purpose is to draw automatically a kind of support as soon
as 2 MA are crossing ..

Something like this but there is another bug ...

aire1 = WMA(C,150);
aire2 = MA(C,50);
aire3 = aire1 / aire2 ;

Croisement = 0 ;
bi = BarIndex();
beforebar =0 ;
barnum = 0;
barvalue=0 ;

Croisement = IIf(aire3 >= 0.99 AND aire3 <= 1.00, 1 ,2); //ugly !But I
don't know how to do ...
barnum = IIf(Croisement == 1,int(bi),False);
beforebar = IIf(Croisement == 1,int(bi) -80,False);
//barnum = IIf( Cross(MA(C,50),WMA(C,150)),int(bi),False);   /// this
line don't walk
//beforebar = IIf(Cross(MA(C,50),WMA(C,150)),int(bi) -80,False);  //
this line don't walk

barvalue =  ValueWhen(Cross(MA(C,50),WMA(C,150)),WMA(C,150));  

Plot(IIf(BarIndex() >= beforebar AND BarIndex() <= barnum ,barvalue
,Null),"TEST",colorBlack,1);


Filter =1;

AddColumn(bi,"bar's number");
AddColumn(aire1,"aire1",1.2);
AddColumn(aire2,"aire2",1.2);
AddColumn(aire3,"aire3",1.2); // value of wma / ma
AddColumn(Croisement,"croisement"); // 1 or 2 when statement is
true,else 0
AddColumn(IIf(Croisement == 1, int(bi),False), "barnum"); // shows the
bar where true
AddColumn(beforebar,"before bar");
AddColumn(barvalue,"value's bar"); 



------------------------------------

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com
*********************

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html

*********************************
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/