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

*****SPAM***** [amibroker] AFL code question to retrieve the barindex when two MA are crossing



PureBytes Links

Trading Reference Links

SPAM: -------------------- Start SpamAssassin results ----------------------
SPAM: This mail is probably spam.  The original message has been altered
SPAM: so you can recognise or block similar unwanted mail in future.
SPAM: See http://spamassassin.org/tag/ for more details.
SPAM: 
SPAM: Content analysis details:   (5.50 hits, 5 required)
SPAM: USER_AGENT         (-0.5 points) Found a User-Agent header
SPAM: FROM_ENDS_IN_NUMS  (0.9 points)  From: ends in numbers
SPAM: COMMENT            (0.8 points)  Found a Comment header
SPAM: TO_BE_REMOVED_REPLY (0.4 points)  BODY: Says: "to be removed, reply via email" or similar
SPAM: SPAM_PHRASE_03_05  (1.1 points)  BODY: Spam phrases score is 03 to 05 (medium)
SPAM:                    [score: 3]
SPAM: DATE_IN_PAST_48_96 (1.4 points)  Date: is 48 to 96 hours before Received: date
SPAM: FORGED_YAHOO_RCVD  (1.4 points)  'From' yahoo.com does not match 'Received' headers
SPAM: 
SPAM: -------------------- End of SpamAssassin results ---------------------

Lol !!

I tried to build a custom indicator .
I want to retrieve the bar's number as soon as two  moving average are
crossing , or the index number at the point of intersection  . I
wished to spy the value by using "filter = 1 ;"
As soon as I have caught this number I can to compute a second number
80 bar ago .
With that I have a time interval and I can plot this interval at the
screen .


Here is my code 


Curve1= 0 ;
Curve2 = 0;
Curve1 = Cross(WMA(C,150),MA(C,150));
Curve2= Ref(Cross(WMA(C,150),MA(C,150)),80);
a = 0 ;
b = 0 ;

a = ValueWhen(Curve1,MA(C,150));
b= ValueWhen(Curve2,MA(C,150));

Refindex1 = Curve1[0];//Here I trie to catch the bar' number without
success
Refindex2 = Curve2[0];

numdesbarres =BarIndex();  

Plot(IIf(BarIndex() >= Refindex2 AND BarIndex() <= Ref
index1,a,Null),"TEST",colorBlack,1);
Plot(IIf(BarIndex() >= Refindex2 AND BarIndex() <=
Refindex1,b,Null),"TEST",colorRed,1);

Filter = 1;
AddColumn(numdesbarres,"bar's number");
AddColumn(Refindex1,"index number");
AddColumn(Refindex2,"index number 80 bars ago");


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

**** 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/