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

[amibroker] BARCOUNTER



PureBytes Links

Trading Reference Links

Hi group,


Quite a while back I had asked for help regarding
finding lowest/highest value of array between two
occurences of a specific condition.

One of the members here was kind enough to help me out
with the following indicator/function:


//*********************************************//
function HighestBetween(_expression,array,n)
{
e=_expression;a=array;
Hb=IIf(n>0,ValueWhen(e,Ref(HighestSince(e,a,1),-1),
    Min(LastValue(Cum(e)),n)),HighestSince(e,a));
return LastValue(Hb);
}
//*********************************************//

function LOWESTBetween(_expression,array,n)
{
e=_expression;a=array;
Hb=IIf(n>0,ValueWhen(e,Ref(LowestSince(e,a,1),-1),
    Min(LastValue(Cum(e)),n)),LowestSince(e,a));
return LastValue(Hb);
}




X_UP=Cross(macd( ),signal());
X_DN=Cross(signal( ),macd( ));
M_Occ=Param("occ",0,0,10);




Low1=LOWESTBETWEEN(X_DN,L,0);
Low2=LowestBETWEEN(X_DN,L,1);

=======================================================


For quite sometime I have been trying to find the
respective bar # on which those two occurences took
place. To the extent I could I tried everything but
all my efforts bombed. So here is my request - How can
we find the bar# on which the condition was satisifed
i.e. the bar# of low1 and low2?

Thanks in advance for any help.

Regards


Rakesh



	
		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail


------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

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/

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