[求助]序列變量記錄
作者:金字塔 來(lái)源:cxh99.com 發(fā)布時(shí)間:2014年09月23日
- 咨詢內(nèi)容:
variable:cc=0;cc:=ref(cc,1);
if pd=1 then CC:=0;if Pk=1 then CC:=0;if KD=1 then CC:=CC+1;if Kk=1 then CC:=CC-1;我想用CC來(lái)記錄開(kāi)平倉(cāng)記錄,在后臺(tái)程序化和序列模式下,但每計(jì)算一次序列變量cc都會(huì)被清零,如何保持cc和理論倉(cāng)位一致?
- 金字塔客服:
cc:=ref(cc,1);
這個(gè)一句加來(lái)干什么,這一句加上你全局變量不就白定義了
- 用戶回復(fù):
我的意思是當(dāng)沒(méi)有出現(xiàn)任何更改cc值得條件時(shí),cc值維持上個(gè)周期值不變
- 網(wǎng)友回復(fù):
請(qǐng)教,如果想達(dá)到我的目的,該如何編寫,在序列計(jì)算下每次運(yùn)算不會(huì)重新將全局變量初始化
- 網(wǎng)友回復(fù):
variable:cc=0;
if pd=1 then CC:=0;
if Pk=1 then CC:=0;
if KD=1 then CC:=CC+1;
if Kk=1 then CC:=CC-1;
if not(pd) and not(pk) and not(kd) and not(kk) and barpso>1 then cc:=ref(cc,1);
[此貼子已經(jīng)被作者于2014/1/20 10:57:42編輯過(guò)]