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

[amibroker] Re: comparing stock price to an index



PureBytes Links

Trading Reference Links

There are so many approaches to this it boggles the mind. I would 
suggest you use the index that closely represents the whole market. 
RUT or NYA is what I use. If you are looking at NASDAQ stocks only 
use IXIC. If you want to view the index on the same chart pick an 
indicator you want, e.g. EMA(5,15) for shorter term trends and use 
the Foreign function to get the close for the index of choice and 
plot the EMAs or whatever indicator you want. Then if Ema 5 > ema 15 
then you have an upward trend on the index. The you could use the 
same EMAs to see of the stock is also in an upward trend. So the 
logic would be - buy = iif(foreign ema = buy AND stock ema = buy, 1, 
0); You will have to do the code for the conditional statement in 
the IIF and replace the "foreign ema = buy" with the true code. Sell 
is the opposite condition. Done this way the buy and sell points 
will be spikes on the chart so you won't have to look at graphs. 
This logic works in back test too. I have some examples of how to 
combine multiple indicators into a buy or sell signals on my 
website,www.imageview.us. Take the AmiBroker link. Many of the 
formulas there are what I use to time stock entry/exit points. They 
are pretty basic but I still obey the KISS principle.

Barry

--- In amibroker@xxxxxxxxxxxxxxx, eric paradis 
<thechemistrybetweenus@xxxx> wrote:
>
> Im trying to compare the price of an index so that I
> can go long or short on a stock. Is there a formula
> that does this in AFL or sample system code in the
> amibroker forum? 
> 
> Thanks, 
> 
> Eric
> 
> --- eric paradis <thechemistrybetweenus@xxxx>
> wrote:
> 
> > Barry, 
> > 
> > Thanks for your reply. I have tried to Add Linker
> > under the window menu. It does not solve my problem.
> > My price info and bar info is still missing in all
> > the
> > panes. Im considering that my template is either
> > missing or corrupted. Is there such thing as a price
> > template or a panel with the relevant data. Possibly
> > you could attach the file and send to me? Otherwise
> > I
> > might have to take this up with Thomas J.
> > 
> > Thanks,
> > 
> > Eric
> > 
> > --- Barry Scarborough <razzbarry@xxxx>
> > wrote:
> > 
> > > I have had a similar problem. Somehow AB lost the
> > > link to my 
> > > symbols. In Charts I could see the formulas but AB
> > > did not know they 
> > > were there. But in my case they failed on every
> > > sheet. 
> > > 
> > > First you might try and edit the failing pane. If
> > > that does not work 
> > > add the price chart to the sheet using insert
> > > linked. You have to 
> > > have at least one pane on the sheet so you can not
> > > delete them all. 
> > > Then delete all the other panes on that sheet.
> > Then
> > > start adding the 
> > > panes (indicators) you had on the sheet and see if
> > > problem recurs. 
> > > If so edit the indicator and use verify syntax to
> > > see if you can 
> > > find the problem that way.
> > > 
> > > Barry
> > > 
> > > --- In amibroker@xxxxxxxxxxxxxxx, eric paradis 
> > > <thechemistrybetweenus@xxxx> wrote:
> > > >
> > > > 
> > > > I seem to have a problem on my panes where the
> > > data
> > > > does not show up. I have reinstalled over
> > > Amibroker
> > > > without luck. Oddly all the other indicators
> > work
> > > in
> > > > the backgroun after sheet 1. Sheet 1 may be
> > > missing an
> > > > indicator, but it seems I can not add it once
> > Its
> > > > taken off. I can not add a new pane and have the
> > > > problem go away. Apparently its an indicator
> > that
> > > is
> > > > necessary to view the data. Any ideas or
> > > suggestions
> > > > how I can fix this? 
> > > > 
> > > > Thanks,
> > > > 
> > > > Eric
> > > > 
> > > > 
> > > > 	
> > > > 		
> > > > __________________________________ 
> > > > Yahoo! Mail - PC Magazine Editors' Choice 2005 
> > > > http://mail.yahoo.com
> > > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > 
> > 
> > 
> > 	
> > 		
> > __________________________________ 
> > Yahoo! Mail - PC Magazine Editors' Choice 2005 
> > http://mail.yahoo.com
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

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/

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