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

[amibroker] Re: Minimum MAximum Function



PureBytes Links

Trading Reference Links

Hello,

The problem is not with Max or Min
Problem is with assignment vs comparison operator.

Just put == like this

sig1=  BarsSince(p4)== Max(BarsSince(p1),Max(BarsSince(P2),
Max(BarsSince(P3),BarsSince(P4))));
 
sig2=  BarsSince(p3)== Min(BarsSince(p1),Min(BarsSince(P2),
Min(BarsSince(P3),BarsSince(P4))));

Hope this helps,
Kar

--- In amibroker@xxxxxxxxxxxxxxx, "textriloquist" <textriloquist@xxx>
wrote:
>
> Hey Herman
> 
> Thanks for your reply.
> 
> I see where it pays to be more specific. I have added random
> conditions to your code to reflect what im trying to achieve with the
> Max() Min() AND barssince() functions.  
> 
> 
> P1=O>C;
> 
> P2=H>Ref(C,-1);
> 
> P3=L>Ref(C,-2);
> 
> P4=C>Ref(C,-4);
> 
> //final plots
> sig1=  BarsSince(p4)=Max(BarsSince(p1),Max(BarsSince(P2),
> Max(BarsSince(P3),BarsSince(P4))));
> 
> sig2=  BarsSince(p3)=Min(BarsSince(p1),Min(BarsSince(P2),
> Min(BarsSince(P3),BarsSince(P4))));
> 
> can you see my syntax problem now?
>




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