這個公式錯在哪里,為什么編譯不通過?
作者:開拓者 TB 來源:cxh99.com 發(fā)布時間:2019年01月17日
-
咨詢內(nèi)容:
//------------------------------------------------------------------------
// 簡稱: zyzs
// 名稱: 止盈止損
// 類別: 用戶函數(shù)
// 類型: 用戶函數(shù)
// 輸出: 布爾型
//------------------------------------------------------------------------
Vars
? ? ? ? Numeric Minpoint;
? ? ? ? Numeric myentryprice;
? ? ? ? Numeric takeprofitset(150);
? ? ? ? Numeric stoplossste(50);
? ? ? ? Numeric myexitprice;
? ? ? ?
Begin
? ? ? ? Minpoint=MinMove*PriceScale;
? ? ? ?
? ? ? ? myentry=AvgEntryPrice ;
? ? ? ? if(MarketPosition==1 and BarsSinceEntry>=1
? ? ? ? {
? ? ? ? if (high >=myentry +takeprofitset*Minpoint)
? ? ? ? {
? ? ? ? myexitprice=myentry +takeprofitset*Minpoint;
? ? ? ? if(open >myexitprice)myexitprice=open;
? ? ? ? sell(0,myexitprice);
? ? ? ? }
? ? ? ? else if(Low<=myentryprice-stoplossste*Minpoint)
? ? ? ? {
? ? ? ? myexitprice=myentryprice-stoplossste*Minpoint;
? ? ? ? if (open<myexitprice)myexitprice=Open;
? ? ? ? Sell(0,myexitprice);
? ? ? ? }
? ? ? ? }
? ? ? ? Else if (MarketPosition==-1 and BarsSinceEntry>=1)
? ? ? ? {
? ? ? ? if (low<=myentryprice-takeprofitset*Minpoint)
? ? ? ? {
? ? ? ? myexitprice=myentryprice-takeprofitset*Minpoint;
? ? ? ? if (open<myexitprice)myexitprice=Open;
? ? ? ? BuyToCover(0,myexitprice);
? ? ? ? Else if (High>myentryprice+takeprofitset*Minpoint)
? ? ? ? {
? ? ? ? myexitprice=myentryprice+stoplossste*Minpoint;
? ? ? ? if (Open>myexitprice)myexitprice=Open;
? ? ? ? BuyToCover(0,myexitprice);
? ? ? ? }
? ? ? ? }
? ? ? ?
End
//------------------------------------------------------------------------
// 編譯版本? ? ? ? GS2015.12.25
// 用戶版本? ? ? ? 2018/09/05 18:57:22
// 版權(quán)所有? ? ? ? lhpztb
// 更改聲明? ? ? ? TradeBlazer Software保留對TradeBlazer平臺
//? ? ? ? ? ? ? ? ? ? ? ? 每一版本的TradeBlazer公式修改和重寫的權(quán)利
//------------------------------------------------------------------------
?
?來源:CXH99.COM
-
TB技術(shù)人員:
新建一個公式應(yīng)用而不是用戶函數(shù)再編譯看看
?
-
TB客服:
已經(jīng)在公式應(yīng)用中編譯,但是仍然顯示已保存、未編譯。
?
-
網(wǎng)友回復(fù):
hlp0410 發(fā)表于 2018-9-6 08:47
新建一個公式應(yīng)用而不是用戶函數(shù)再編譯看看
已經(jīng)在公式應(yīng)用中編譯,但是仍然顯示已保存、未編譯。
?
-
網(wǎng)友回復(fù):
lhpztb 發(fā)表于 2018-9-6 09:02
已經(jīng)在公式應(yīng)用中編譯,但是仍然顯示已保存、未編譯。
激活公式后點(diǎn)編輯界面的綠色√,進(jìn)行編譯并保存 |