代發(fā)貼
作者:金字塔 來源:cxh99.com 發(fā)布時間:2016年03月13日
- 咨詢內(nèi)容:
請客服幫忙把以下有關(guān)頭寸管理編程的請教報告貼到論壇合適的老師處,謝謝謝謝了!!
一、資金管理采取浮動手?jǐn)?shù)方式;
二、具體規(guī)則是:
1、無論是做多還是做空,首次開倉為1手;
2、如果本次交易盈利,下一次無論是開多還是開空,開倉加1手,即為2手;下一次如連續(xù)盈利,還是開2手,也就是最高就是2手。
3、如果本次交易虧損,下一次無論是開多還是開空,開倉恢復(fù)到1手。
下面一個,修改了一下,請幫助貼一下,謝謝
- 金字塔客服:
//多頭為例
VARIABLE:n=0;
if 開多條件 and holding=0 then buy(1,ss,market);
if 平多條件 and holding>0 then sell(1,holding,market);
if numprofit>0 then n:=1;
if 開多條件 and holding>0 and n=1 then buy(1,2,market);
if NUMPROFIT<0 then n:=2;
if 開多條件 and n=2 holding>0 then buy(1,1,market);
- 用戶回復(fù):
謝謝