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

[amibroker] Re: Index Entry/Exit Rules


  • Date: Sun, 27 Dec 2009 20:57:53 -0000
  • From: "jollypolly999" <jollypolly999@xxxxxxxxx>
  • Subject: [amibroker] Re: Index Entry/Exit Rules

PureBytes Links

Trading Reference Links

Hello. Probably not the right time of year with holiday fun and games but I am keen to get this criteria attached to the bitsa system I have. If anyone finds my following attempt at coding the idea then please LOL. The chart link on the previous post explains the following. It is to buy and sell an index price.

foreign("XAO", "close")
 
Cond1 = Close > DEMA(Close, 250) AND EMA(Close, 250) < DEMA(Close, 250); 
Cond2 = Close > DEMA(Close, 250) AND DEMA(Close, 250) < EMA(Close, 250); 
Cond3 = Close > EMA(Close, 250) AND EMA(Close, 250) < DEMA(Close, 250);
Cond4 = Close < EMA(Close, 250) AND EMA(Close, 250) < DEMA(Close, 250);
Cond5 = Close < DEMA(Close, 250) AND EMA(Close, 250) < DEMA(Close, 250);
Cond6 = Close < DEMA(Close, 250) AND DEMA(Close, 250) < EMA(Close, 250);

Buy = Cond1 OR Cond2; 
Buy = Cond3 only after Cond4 is met; // i.e. a bar has to close lower than the EMA before Cond3 buy can be initiated      	
   
Sell = Cond4 OR Cond5 OR Cond6; // Cond4 sells for Cond3, Cond5 sells for Cond1 and Cond6 sells for Cond2
    
/////////////////////////////////////////////////

--- In amibroker@xxxxxxxxxxxxxxx, "jollypolly999" <jollypolly999@xxx> wrote:

> This is a pictorial representation of what I am trying to achieve. Hopefully someone will be able to help please. The Bitmap is here: http://groups.yahoo.com/group/amibroker/photos/recent/304841756/view
> 
> Please enlargen to see text.
 
> > --- In amibroker@xxxxxxxxxxxxxxx, "jollypolly999" <jollypolly999@> wrote:
> >  
>  There is something that I didn't explain in the above scenario. When the 250 DEMA is above the 250 EMA then one possibility can happen. The lower 250 EMA doesn't get breached by the Index day bars so a re-entry signal would not occur. To overcome this the code would need to act on the 250 DEMA (i.e. enter/exit) if the lower 250 EMA is not breached (Index day bar closes below).
> 
> If the lower 250 EMA is breached (Index day bar closes below) then the 250 EMA is the ruling trigger for re-entry.
>




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

**** 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:
    amibroker-digest@xxxxxxxxxxxxxxx 
    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/