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

[amibroker] Re: Two Days after the Bullish Inflection



PureBytes Links

Trading Reference Links

Ken,
I have nothing more to do than copy the 4.41.0 Beta Read Me

///////////////////////////////////////////////////////////
SetForeign( 'ticker' )
- replaces current price/volume arrays with those of foreign 
security, returns True if ticker exists, False otherwise.
If ticker does not exist (and function returns false) price arrays 
are not changed at all.

Equivalent to the following sequence:
C = Foreign( "ticker", "C" );
O = Foreign( "ticker", "O" );
H = Foreign( "ticker", "H" );
L = Foreign( "ticker", "L" );
V = Foreign( "ticker", "V" );
OI = Foreign( "ticker", "I" );
Avg = ( C + H + L )/3;

but 6x faster (SetForeign takes about the same time as single 
foreign). To restore original prices call
RestorePriceArrays();

EXAMPLE:
SetForeign( "MSFT" );
dm = MACD(); // dm holds MACD of MSFT regardless of currently 
selected symbol
RestorePriceArrays();
Plot( dm, "MACD of MSFT", colorRed );
Plot( MACD(), "MACD of " + Name(), colorBlue );
///////////////////////////////////////////////////////

In my database, the current symbol for the index is ^NDX. You should 
replace it with your index name, else you will be in the case
"If ticker does not exist (and f...". Tomasz has anticipated even 
this !!
In my code there are two lines
SetForeign("^NDX"); 
C1=C; 
In the second line, C1 is the ^NDX Close. All the following analysis 
uses ONLY this array for further smoothing, convex/concave principle 
and, finally, Buy/Sell conditions.
If you comment the SetForeign("^NDX"); then the 
C1=C; 
remains and now you follow another [interesting] procedure : You use 
individual concavity/convexity per each stock. 
This is also interesting, but it is different.
If you want to use NDX data as a vehicle, then keep the SetForeign
("^NDX"); line and change the symbol to match yours.
The outline of the difference : The individual system [the one you 
get if you comment the SetForeign("^NDX"); line] gives for the whole 
N100 a +12% from Jan2003. The TTM gives +39%.
And do not tell me now how a single line may triple the profits, 
because I will agree with you !!!
Thank you for the interesting [as usual] comments.
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Ken Close" <closeks@xxxx> wrote:
> DT:  I find this quite interesting after plotting and backtesing 
numbers
> of stocks and watchlists.
> 
> I do not understand .... " All signals are based on ^NDX chart."
> 
> I do not understand the use of the SetForeign command and what it 
does
> in this context.  I comment it out and nothing changes.  
> 
> Errrrrr.....I just changed "^NDX" to my index symbol "NDX-X" and the
> returns tripled......Errrrrr......Why??
> 
> This was attractive when I was using it incorrectly, and now it is 
even
> better.
> 
> How do you come up with these things???????
> 
> Thanks for any further explanation.
> 
> Ken
> 
> -----Original Message-----
> From: DIMITRIS TSOKAKIS [mailto:TSOKAKIS@x...] 
> Sent: Tuesday, September 30, 2003 10:22 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Two Days after the Bullish Inflection
> 
> The main purpose was to show the use of inflection points.
> The results are not bad, if you consider it is a TTM [Trade The 
> Market] system. All signals are based on ^NDX chart. 
> This approach [and the successful behavior of the majority] gives a 
> good reason to use ^NDX as a trading platform.
> The comparison with B&H is also good to me.
> We didn't decide on Jan1 to Buy & Hold, as far as I remember !!
> We mainly decided to trade a cloudy market with very sad bearish 
> memories. When I was searching, last spring, for prolonged uptrend 
> indications, the request was a bit funny, many traders were waiting 
> another bearish episode and *nobody* would trust a B&H strategy.The 
> other useful result of this study is the transformation of Price 
> directly into an oscillation [without the indirect methods like 
RSI, 
> Stochastics etc]. Give me some time, the project is ready, but it 
> needs the bloody writing time !!
> Thank you for your comments.
> Dimitris Tsokakis
> --- In amibroker@xxxxxxxxxxxxxxx, "Dave Merrill" <dmerrill@xxxx> 
> wrote:
> > thanks for this Dimitris, it looks very interesting.
> > 
> > unfortunately, I don't see the performance results as positively 
as 
> you seem
> > to. over the past year, the NASDAQ 100 stocks show Annual system 
% 
> return of
> > 44.13%, but Annual B&H % return was 65.01%. for 2003, Annual 
system 
> % return
> > was 29.73%, but Annual B&H % return was 54.14%. for all quotes 
> (QuotesPlus),
> > Annual system % return was 19.14%, Annual B&H % return 30.58%.
> > 
> > there may be other ways we can make use of this principle, which 
> seems quite
> > right-headed, but for reasons that aren't entirely clear to me, 
it 
> doesn't
> > perform that well in its current state.
> > 
> > dave
> 
> 
> 
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/