|
如何將畫面切割成兩種不一樣的圖表看盤!....譬如你想一個畫面同時,可以看"台指","加權"圖表!
有兩種方法...可以按照,以下引述....B大教學方法內容試試看吧!
有兩種方法
其一是增加 Blank Chart
其二是只有一個Blank Chart,由AFL來進行選擇Symbol
先說其一,請看影片
http://www.amibroker.com/video/TwoSymbols.html
這裡有很多教學影片
你可以參考看看
http://www.amibroker.com/support.html
第2 個方法,寫AFL程式碼
-
- _SECTION_BEGIN("ForeignSymbol");
- RequestTimedRefresh( 0 );
- SetChartOptions(0,chartShowArrows|chartShowDates,0);
- GraphXSpace=12;
- /////////////////////
- ticker = ParamList("Ticker", "WTX&|WT200|WTE&|WTF&" );
- SetForeign(ticker , True, True );
- /////////////////////
- TH = TimeFrameGetPrice( "H", inDaily, 0 );
- TL = TimeFrameGetPrice( "L", inDaily, 0 );
- TO= TimeFrameGetPrice( "O", inDaily, 0 );
- PC = TimeFrameGetPrice( "C", inDaily, -1);
- /////////////////////
- Plot( C, "C",IIf(C>O,4,28), styleCandle+4096);
- Plot( SelectedValue(C), "",54,styleNoLine );
- /////////////////////
- VL = (Ref(Minute(), -1)%60 > 60/2 AND Minute()%60 < 60/2);
- Plot(VL,"", 23, 2+32+4096+32768+131072 ,0,1);
- /////////////////////
- GfxSetOverlayMode(1);
- GfxSelectFont("Tahoma", Status("pxheight")/28 );
- GfxSetTextAlign( 6 );
- GfxSetTextColor( 31 );
- GfxSetBkMode(1);
- GfxTextOut( Name(), Status("pxwidth")/2, Status("pxheight")/6 );
- /////////////////////
- Title =
- EncodeColor(37 )+Name() +
- EncodeColor(54)+ " -ForeignSymbol "+ticker+"- "+EncodeColor(41 )+WriteVal( DateTime(), formatDateTime)+" "+
- EncodeColor(30)+"Daily "+EncodeColor(30)+EncodeColor(47)+" O " + TO+ " H " + TH +" L " + TL +" C " + C +" PC " + PC +
- " O-PC " +WriteVal(TO-PC,1.0)+
- " HL " +round((TH -TL)*100)/100+" (" +round(((TH - TL) / PC ) * 10000)/100 + "%)" +
- " Change "+WriteIf((C-PC)>0,EncodeColor(4),EncodeColor(34))+round((C-PC )*100)/100+" "+EncodeColor(47)+"(" +round(((C - PC ) / PC ) * 10000)/100+ "%)"+
- " "+EncodeColor(30)+Interval(2)+" "+EncodeColor(47)+
- "O " +O + " H " + H +" L " + L +" C " + C+
- " Change " +WriteIf((C-Ref(C, -1))>0,EncodeColor(4),EncodeColor(34))+round((C - Ref(C, -1))*100)/100;
- _SECTION_END();
-
複製代碼 |
|