開(kāi)拓者兩儀四象源碼,《期市截拳道》P21的思路
作者:開(kāi)拓者 TB 來(lái)源:cxh99.com 發(fā)布時(shí)間:2013年08月13日
- 源碼內(nèi)容:
- Params
- Numeric s_Length(10);
- Numeric l_Length(20);
- Numeric lots(1);
- Numeric OffSet(3);
- Vars
- NumericSeries EFMA;
- NumericSeries EF;
- Numeric MER;
- NumericSeries LY;
- NumericSeries LYSX;
- Numeric i_Offset;
-
- Begin
-
- i_Offset = OffSet * MinMove * PriceScale;
-
- EF = Max((Highest(Close,s_Length) - Lowest(Close,s_Length)),Abs(Close -Close[s_Length]))/Summation(Abs(Close - Close[1]),s_Length);
-
- EFMA = Average(EF,s_Length);//在文化里用EMA平滑EF值,但TB的XAverage算出來(lái)的值差很多,所以就用MA了。www.kzuj.com.cn
- // www.kzuj.com.cn
- MER = IntPart(s_Length-(efma-0.5)*l_Length);
- LY = Summation((Close - Close[1])*Vol,MER);
- LYSX = Average(LY,s_Length);
-
- If(LYSX[1]>0) Buy(lots,open+i_offset);
- If(LYSX[1]<0) SellShort(lots,open-i_Offset);
-
- //PlotNumeric ("OpenToClose",High,Low,red);
-
- End
- TB技術(shù)人員: TB里這樣的BAR出來(lái)嗎?!
- TB客服: 變色k線tb寫(xiě)的出來(lái)的,置頂帖里面有
- 網(wǎng)友回復(fù): 找了一遍,好像沒(méi)有呢!以前有個(gè)plotbar,現(xiàn)在這個(gè)也沒(méi)有了
- 網(wǎng)友回復(fù):