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

Re: [amibroker] Re: Consistent coding structure problem



PureBytes Links

Trading Reference Links

Title: Re: [amibroker] Re: Consistent coding structure problem

I am not sure where you are heading, but perhaps this gives you a start:


HLRange = absH - L );

ABC = HLRange > Ref( HLRange, -1 ) AND HLRange > Ref( HLRange, -2 ) AND HLRange > Ref( HLRange, -3 );

XYZ_Check = IIfRef( ABC, -1 ), 1IIfRef( ABC, -2 ), 2IIfRef( ABC, -3 ), 30 ) ) );


RU1_Check = 

IIf( XYZ_Check == 0Open>Ref(Open,-1AND Open>Ref(Open,-2AND Open>Ref(Open,-3),

IIf( XYZ_Check == 1Open>Ref(Open,-2AND Open>Ref(Open,-3AND Open>Ref(Open,-4),

IIf( XYZ_Check == 2Open>Ref(Open,-3AND Open>Ref(Open,-4AND Open>Ref(Open,-5),

IIf( XYZ_Check == 3Open>Ref(Open,-4AND Open>Ref(Open,-5AND Open>Ref(Open,-6),

0))));


You have to consider what happens when multiple XYZ_Check values are true at the same time.


herman




herman


Thursday, November 6, 2008, 2:51:21 PM, you wrote:


> Herman,


> This is where the problem occurs... because what I actually want to do

> within each conditional if() statement is carry out some more array

> manipulations. For example,


> HLRange = abs( H - L );

ABC = HLRange >> Ref( HLRange, -1 ) AND HLRange > Ref( HLRange, -2) AND

HLRange >> Ref( HLRange, -3 );

> XYZ_Check=IIf(Ref(ABC,-1),1,IIf(Ref(ABC,-2),2,IIf(Ref(ABC,-3),3,0)));


> if(XYZ_Check==0)

> {

RU1_Check = Open>>Ref(Open,-1) AND Open>Ref(Open,-2) AND Open>Ref(Open,-3);

> }

> if(XYZ_Check==1)

> {

RU1_Check = Open>>Ref(Open,-2) AND Open>Ref(Open,-3) AND Open>Ref(Open,-4);

> }

> if(XYZ_Check==2)

> {

RU1_Check = Open>>Ref(Open,-3) AND Open>Ref(Open,-4) AND Open>Ref(Open,-5);

> }

> if(XYZ_Check==3)

> {

RU1_Check = Open>>Ref(Open,-4) AND Open>Ref(Open,-5) AND Open>Ref(Open,-6);

> }


> Any way to achieve this across the entire price array outside of a

> loop....?


> TIA



> ------------------------------------


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



__._,_.___

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

*********************************




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___