幫我寫個語句 [金字塔]
- 咨詢內(nèi)容:
我想做個日內(nèi)止損的,用日內(nèi)螺紋的1分鐘線,當(dāng)當(dāng)日的總盈虧也就是平倉盈虧加持倉盈虧達到500元的時候平倉,然后當(dāng)日不再開倉,第二日繼續(xù)從總盈虧為0開始
- 金字塔客服:
variable:n=0;
a1:ref(asset,todaybar);
if a1-asset>500 or a1-asset<500 then n:=1;
if 開倉條件 and n=0 then begin
下單語句;
end
if time=closetime(0) then n:=0;
用全局變量來記錄當(dāng)前的狀態(tài),盈虧小于500時n=0,能夠開倉,盈虧大于500時n=1,不能下單,
最后每天收盤時重置全局變量
- 用戶回復(fù):
variable:n=0;
a1:ref(asset,todaybar);
if asset-a1>500 or asset-a1<-500 then n:=1;
if 開倉條件 and n=0 then begin
下單語句;
end
if time=closetime(0) then n:=0;
中間有一段寫錯了,改了下
- 網(wǎng)友回復(fù):
我改寫了以后幾乎不開倉了
能不能遠(yuǎn)程幫我看下我的程序
- 網(wǎng)友回復(fù): 用在日線上的?
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 1145508240 進行 有償 編寫!(不貴!點擊查看價格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容