|
利用AmiBroker的Explore功能比較兩個系統產生的訊號
如果想要比較的是兩個相近的系統(或是同系統不同參數)的訊號
可以把SHOW_EXCLUSIVE_ONLY打開
這樣就只會顯示兩者之間不同步訊號
例如下面這張圖
實心箭頭是MA(10), MA(20)的訊號
空心箭頭是EMA(10), EMA(20)的訊號
這樣就能方便比較兩個系統
- SHOW_EXCLUSIVE_ONLY = ParamToggle("Show Exclusive Only", "No|Yes");
- // MA 10 / 20 crossover
- Buy1 = Cross(MA(C,10), MA(C,20));
- Sell1 = Cross(MA(C,20), MA(C,10));
- // EMA 10 / 20 crossover
- Buy2 = Cross(EMA(C,10), EMA(C,20));
- Sell2 = Cross(EMA(C,20), EMA(C,10));
- if(SHOW_EXCLUSIVE_ONLY)
- {
- Buy = Buy1 AND (NOT Buy2);
- Sell = Sell1 AND (NOT Sell2);
- Cover = Buy2 AND (NOT Buy1);
- Short = Sell2 AND (NOT Sell1);
- }
- else
- {
- Buy = Buy1;
- Sell = Sell1;
- Cover = Buy2;
- Short = Sell2;
- }
- Filter = Buy OR Sell OR Short OR Cover;
- // Filter = BarIndex() == BarCount - 1; // show only last bar info
- AddColumn( Cum(Buy), "Buy 1", 1.0);
- AddColumn( Cum(Sell), "Sell 1", 1.0);
- AddColumn( Cum(Cover), "Buy 2", 1.0);
- AddColumn( Cum(Short), "Sell 2", 1.0);
複製代碼
|
評分
-
查看全部評分
|