關于開平倉問題 [開拓者 TB]
-
咨詢內容:
? ? Bool BuyCondition(false);
Begin//公式主體部分
? ???//變量計算部分
? ?? ?//此處添加代碼正文
? ? ? ???If(!CallAuctionFilter()) Return;? ? ? ? // 對集合競價和小結開始的行情進行過濾,防止無效的發單操作。
? ???LowerBand= LowestFC(Low,Length);
? ???DonchianHi = LowerBand+kaicang;
? ???//寫出數據
? ???PlotNumeric("DonchianHi",DonchianHi,0,Red);
? ? ? ? PlotNumeric("LowerBand",LowerBand);
? ? ? ? BuyCondition =CrossOver(High,DonchianHi);
//開倉部分
If(MarketPosition==0 and BuyCondition==True)??
{
buy(lots,Max(open,DonchianHi ));
}
Commentary("EntryPrice="+Text(EntryPrice));
If(MarketPosition == 1 and BarsSinceEntry>=1)
{? ?
? ?? ?? ?? ???If(Low<= EntryPrice-TrailingStop)
? ?? ?? ?? ???{? ? ? ? ? ? ? ?? ?
? ? ? ? ? ? ? ?? ? MyExitPrice = EntryPrice-TrailingStop;
? ?? ?? ?? ???If(Open < MyExitPrice) MyExitPrice = Open;? ?
? ? ? ? ? ? ? ?? ? Sell(0,MyExitPrice);
? ? ? ? ? ? ? ?? ? }
? ? ? ? ? ? ? ?? ? If(High >= EntryPrice+ zhiying)? ? ? ???
? ? ? ?? ?? ?? ?{
? ? ? ?? ?? ?? ?Sell(0,EntryPrice+ zhiying);
? ? ? ?? ?? ?? ?}
}
這樣的寫法有問題嗎,比如蘋果,為什么開盤第一根K線開倉的時候,圖表信號已經開倉了,但是委托和成交記錄都沒有信息,視圖選項的消息中心有沒有信息,請問老師是為什么
有思路,想編寫各種指標公式,交易模型,選股公式,還原公式的朋友
可聯系技術人員 QQ: 262069696 或微信號:cxh99cxh99 進行 有償收費 編寫!
(注:由于人數限制,QQ或微信請選擇方便的一個聯系我們就行,加好友時請簡單備注下您的需求,否則無法通過。謝謝您!)
相關文章
-
沒有相關內容