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

RE: [amibroker] Displaying composite



PureBytes Links

Trading Reference Links



Listnum should obvously not be 1,2 or 3. I just used that in the
example.
<MSG>
At 11:03 PM 28/07/2003 +1000, you wrote:
Ok, Try this - You will need to
create a watchlist containg tickers ~energy , ~health and  ~mining
first though.
I havn't tested it though. ;-)
listnum =
1;
//Watchlist
containing Composite symbols in order 1,2,3.
CNum =
IIf(InWatchList(1),
1,
IIf(InWatchList(2),
2,3));
list =
GetCategorySymbols(
categoryWatchlist, listnum );
chart =
StrExtract(
list, CNum );
O =
Foreign(Chart,"O",1);
H =
Foreign(Chart,"H",1);
L =
Foreign(Chart,"L",1);
C =
Foreign(Chart,"C",1);
OI =
Foreign(Chart,"I",1);
myO =
Cum(
(O/Ref(O,-1))-1
)/OI
*1000
;
myH =
Cum(
(H/Ref(H,-1))-1
)/OI
*1000
;
myL =
Cum(
(L/Ref(L,-1))-1
)/OI
*1000
;
myC =
Cum(
(C/Ref(C,-1))-1
)/OI
*1000
;
PlotOHLC(myo,
myh, myl, myC,
"Candle",
colorBlack,styleCandle+styleNoLabel); 

KR
<Michael>
At 08:20 PM 28/07/2003 +0800, you wrote:
Here is what I am doing with the
composites, or at least trying to do. I
have set up 3 individual charts for each "sector" composite,
but would like
it in a single panel.
I want to be able to go through the stocks on my watchlist, then as I
move
through the panels for each stock see the composite of stocks according
to
their watchlist. These watchlists are comprised of stocks from a
separate
sector for each. Below is the indicator build for the composites. I
cannot
seem to get the IIF statement working and comes up with Bad Arguments
for
the IIF statement. I have also tried SectorID() as well with no
success.
Any positive suggestions appreciated.
Chart = IIf(InWatchList(1), "~energy", IIf(InWatchList(2),
"~health",
"~mining"));
O = Foreign(Chart,"O",1);
H = Foreign(Chart,"H",1);
L = Foreign(Chart,"L",1);
C = Foreign(Chart,"C",1);
OI = Foreign(Chart,"I",1);
myO = Cum( (O/Ref(O,-1))-1 )/OI *1000 ;
myH = Cum( (H/Ref(H,-1))-1 )/OI *1000 ;
myL = Cum( (L/Ref(L,-1))-1 )/OI *1000 ;
myC = Cum( (C/Ref(C,-1))-1 )/OI *1000 ;
PlotOHLC(myo, myh, myl, myC, "Candle", colorBlack,
styleCandle+styleNoLabel); 
Cheers,
Graham
http://groups.msn.com/ASXShareTrading
http://groups.msn.com/FMSAustralia

-----Original Message-----
From: Michael.S.G.
[mailto:OzFalcon@xxxxxxxx]

Sent: Monday, 28 July 2003 8:12 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Displaying composite

Graham,
I guess you have tried swapping the order of the plot 
statments?
<MSG>
At 01:42 PM 28/07/2003 +0800, you wrote:
>When I display a composite that is referenced by the foreign function
I 
>have found it only displays the chart as far back as the stock
selected 
>in the watchlist Eg I have a composite of my watchlist displayed in a

>panel using the Foreign function to define the OHLC from the
composite. 
>This data starts in 1985. Depending on which stock is selected for
the 
>main panels the composite only shows the data over the same period.
Eg 
>if the stock started trading in Aug 1998 that is where the composite

>chart begins, from that date. The true values are ok for current
dates, 
>it just seems to ignore everything before that start date.
>Does anyone else find this happening?
>
>Graham

Yahoo! Groups Sponsor 
ADVERTISEMENT


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 the Yahoo! Terms of Service. 






Yahoo! Groups Sponsor


  ADVERTISEMENT 









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 the Yahoo! Terms of Service.


Attachment: Description: ""

Attachment: Description: ""