關于開平倉問題
作者:開拓者 TB 來源:cxh99.com 發布時間:2020年07月06日
-
咨詢內容:
? ? 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線開倉的時候,圖表信號已經開倉了,但是委托和成交記錄都沒有信息,視圖選項的消息中心有沒有信息,請問老師是為什么