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

Re: [amibroker] Re: how to code this condition



PureBytes Links

Trading Reference Links

cross1 = Cross(CCI(),200);
cross2 =
Cross(90, CCI());
bsc1 =
BarsSince(cross1) < 2;// set how many bars

Short = cross2 AND bsc1;


murthysuresh wrote:
right......
but this time around i have no clue how to combine these 2 conditoins

BarsSinceCCICrossed200=BarsSince(Cross(array,200));

cciless90=cross(90,array);
now how do i check to see if cciless90 for bars since BarsSinceCCICrossed200





--- In amibroker@xxxxxxxxxxxxxxx, "sidhartha70" <sidhartha70@xxx> wrote:
  
I don't understand your explanation.
However, the easiest way to check and code this is to find some appropriate data, and plot the various elements that will make up your final condition... by doing this you can correctly build the correct logic and order.


--- In amibroker@xxxxxxxxxxxxxxx, "murthysuresh" <money@> wrote:
    
that will not work. example data is as below

210	200	270	220	190	160	100	90	110		valid
210	200	270	220	190	160	100	89	110		invalid



--- In amibroker@xxxxxxxxxxxxxxx, "sidhartha70" <sidhartha70@> wrote:
      
Just a guess but try this...

BarsSinceCCICrossed200andBelow90= BarsSince(BarsSinceCCICrossed200 AND Cross(90,array));

--- In amibroker@xxxxxxxxxxxxxxx, "murthysuresh" <money@> wrote:
        
the CCI should have crossed 200. Once it crossed 200, it should have have crossed below 90.
i got the first one right as below
array = CCI( 20 );
BarsSinceCCICrossed200=BarsSince(Cross(array,200));

without using a for loop, how can i code the second condition.
Once it crossed 200, it should have have crossed below 90.

          




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

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

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

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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

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 PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

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

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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





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

__,_._,___