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

[amibroker] Re: Index trend coding



PureBytes Links

Trading Reference Links

Hi Pal,

Interesting code you posted -- thanks!

Here's what I have as of this moment. I just tested the results so I 
know it works. This is just a code snippet... note that "fish9" in 
the Buy signal contains a variable from within the SetForeign-
created array.

/* 200EMA Detection */
Var200Support = IIf(C>1.05*EMA(C,200),1,0);
Var200Resistance = IIf(C<0.95*EMA(C,200),1,0);

/* IFT-RSI #3 */
SetForeign("$SPX");

pr9 = (H+L)/2;
Len9 = 10;
maxh9 = HHV(pr9,len9); 
minl9 = LLV(pr9,len9); 
Array19 = .33*2*((pr9-minl9)/(maxh9-minl9)-.5); 
val19 = AMA(Array19,.67); 
value19 = IIf(val19>.99,.999,IIf(val19<-.99,-.999,val19)); 
Array29 = .5*log((1+value19)/(1-value19)); 
fish9 = AMA(Array29,.5); 
Plot(0.20,"",colorRed,styleDots);
Plot(-0.20,"",colorGreen,styleDots);

RestorePriceArrays();

/// BUY SIGNAL ///

Buy = varTroughUptrend AND
C<20 AND
V>1000 AND
V>Ref(V,-1) AND
fish2<-0.20 AND
varTDREI<varOversoldSignal AND
varVFEBuy AND
VarVFIUptrend<1 AND
FLSK<20 AND
fish9<-0.20;


I'm playing with this same code, but trying to get it to work when 
scanning for multiple timeframes. The SPX "fish9" should be below (-
0.20) for both the hourly and the daily -- that's the goal at least. 
I do have a multiple timeframe version of the "IFT-RSI #3" indicator 
shown, but it's not posted above.

I will post more if I make any progress. I may not get back to this 
until Sunday eve...

Thanks,

Bman



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/