V4中追蹤止盈代碼怎么寫(xiě)? - TradeBlazer公式 [開(kāi)拓者 TB]
- 咨詢(xún)內(nèi)容:
- Params
- Numeric lots(1);
- Vars
- NumericSeries ma5;
- NumericSeries ma20;
- NumericSeries stopprofit;
- NumericSeries EntryPrice;
- NumericSeries ExitPrice;
- NumericSeries PriceAfterEntry;
- Begin
- ma5=Average(close,5);
- ma20=Average(close,20);
- PlotNumeric("ma5",ma5);
- PlotNumeric("ma20",ma20);
- If(CrossOver(ma5[1],ma20[1]))//Ma5上穿Ma20
- Buy(lots,open);
- Entryprice=open;
- If(marketposition==1&&PositionProfit>5)//盈利大于五點(diǎn)時(shí)追蹤止盈
- {stopprofit=EntryPrice+2;//止盈點(diǎn)在進(jìn)場(chǎng)點(diǎn)上方2點(diǎn)
- ExitPrice=Max(open,stopprofit);
- }
- Sell(lots,ExitPrice);
- End
- TB技術(shù)人員: 請(qǐng)參考 幫助文檔 - 公式應(yīng)用進(jìn)階
- TB客服: 如果用A指令下單又怎么寫(xiě)呢?
有思路,想編寫(xiě)各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 262069696 進(jìn)行 有償 編寫(xiě)!(不貴!點(diǎn)擊查看價(jià)格!)
- 上一篇:急急急 無(wú)源碼加密 同時(shí)加上公式加密問(wèn)題…
- 下一篇:沒(méi)有了!
相關(guān)文章
-
指定的模型還沒(méi)有相關(guān)內(nèi)容!