PureBytes Links
Trading Reference Links
|
I kept these lines, in case you did not read them...
Best regards
Copious notes Courtesy by Joris M.schuller
//if you have the same database provider for Futures and Stocks all you
have to do is:
1. Have all the symbols Of interest in the same database (I Have no
futures, so demonstrate it with Forex AND stocks}
2. Make a new indicator.afl for each symbol that you want in a separate
pane
///////////////Examples
///////////////Example1 (both symbols in 1 pane)//////////////////
Create an indicator Example1.afl)
Plot(Foreign("EUR.USD-IDEALPRO-CASH","Close"),"EUR.USD",1,styleOwnScale|5);
Plot(Foreign("DIA","Close"),"DIA",1,styleOwnScale|5);
///////////////Example2 (1 symbol each in its own pane)///////////////
Example21.afl
Plot(Foreign("EUR.USD-IDEALPRO-CASH","Close"),"EUR.USD",1,5);
Example22.afl
Plot(Foreign("DIA","Close"),"DIA",1,5);
////////////////Example3 (Rel Performance in 1 pane)///////////////////
Ticker1= "EUR.USD-IDEALPRO-CASH";
price1 = Foreign( ticker1, "C");
Ticker2= "DIA";
price2 = Foreign( ticker2, "C");
Plot( price1 ,"\n"+ StrMid( ticker1,4,3)+StrMid(ticker1,0,3),
colorBlack,styleOwnScale|5);
Plot( price2 ,"\n"+ Ticker2, colorBlue,styleOwnScale|5);
///////////////Example4//////////////////////
// A little bit more fluff, but basically the same: Instead pf stepping
thru each tickerlist in 1 pane,
//one can of course assign each tickerlist to an individual tickerlist.afl
DrawList = ParamList("TickerList1|TickerList2","1|2|3|4");
_N( TickerList1 = ParamStr("EUR",
"DIA,EUR.CAD-IDEALPRO-CASH,EUR.CHF-IDEALPRO-CASH,EUR.JPY-IDEALPRO-CASH,EUR.USD-IDEALPRO-CASH,EUR.GBP-IDEALPRO-CASH,EUR.AUD-IDEALPRO-CASH")
);
_N( TickerList2 = ParamStr("Tickers2",
"QQQQ,USD.CHF-IDEALPRO-CASH,USD.JPY-IDEALPRO-CASH,USD.CAD-IDEALPRO-CASH")
);
_N( TickerList3 = ParamStr("Tickers3",
"SPY,GBP.USD-IDEALPRO-CASH,GBP.JPY-IDEALPRO-CASH,GBP.CHF-IDEALPRO-CASH,GBP.AUD-IDEALPRO-CASH")
);
_N( TickerList4 = ParamStr("Tickers4",
"MSFT,AUD.JPY-IDEALPRO-CASH,AUD.NZD-IDEALPRO-CASH,AUD.USD-IDEALPRO-CASH,AUD.CHF-IDEALPRO-CASH")
);
//TickerList = IIf(DrawList==1,TickerList1,TickerList2);
if(DrawList=="1")TickerList=TickerList1;
if(DrawList=="2")TickerList=TickerList2;
if(DrawList=="3")TickerList=TickerList3;
if(DrawList=="4")TickerList=TickerList4;
NumBars = 40;
fvb = Status("firstvisiblebar");
//Plot( 100 * ( C - C[ fvb ] ) / C[ fvb ], Name(), colorBlue );
for( i = 0; ( symbol = StrExtract( TickerList, i ) ) != ""; i++ )
{
fc = Foreign( symbol, "C" );
if( ! IsNull( fc[ 0 ] ) )
{
//use either following
Plot( 100 * ( fc - fc[ fvb ] )/ fc[ fvb ],"\n"+symbol,colorGreen+ (
(2*i) % 15 ),styleLine );
//or to shorten display; shows only 3 letters for stocks
// symbol2 = "\n"+ StrMid( symbol ,4,3)+StrMid(symbol ,0,3);
// Plot( 100 * ( fc - fc[ fvb ] )/ fc[ fvb ],symbol2,colorGreen+ (
(2*i) % 15 ),styleLine );
}
}
PlotGrid( 0, colorYellow );
_N( Title = "Rel.Str-FX-Loop - Rel. Perf. [%]: {{VALUES}}" );
consolejoker a écrit :
>
>
> I'd like to chart two symbols, Gold and USD on the same pane, but they
> are so different in values that the result is two almost flat lines. Is
> there a way to scale the two together or normalize them to see their
> relative moves?
>
>
------------------------------------
**** 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/
|