inputs:value1(buy), value2(l[1]);
vars:value1,value2
value1=buy or sellshort;
value2=l[1] or h[1];
if o>value2 then value1 next bar at value2 stop;
end;
setexitonclose;
1.我想把buy和sell作成參數
2.我想value2的高低點作成參數
拿來跑2*2最佳化 請問這語法哪里錯了,感謝
end 前的 begin 在那里?
value1 及 value2 是數字變數不是邏輯變數
買賣指令不能變數化 .... 錯誤寫不完
程式碼完全不合語法
直接改寫如下,自已修正大於小於處
inputs: pMode(1), pPriceMode(1);
if pPriceMode=1 then begin
value1 = L[1];
condition1 = O<L[1];
end else begin
value1 = H[1];
condition1 = O>H[1];
end;
if pMode = 1 then begin
if condition1 then buy next bar value1 stop;
end else begin
if condition1 then buy next bar value1 stop;
end;
setexitonclose;
thx for ur answer!!!!
make a big help to me
inputs: pMode(1), pPriceMode(1);
if pPriceMode=1 then begin
value1 = L[1];
condition1 = O<L[1];
end else begin
value1 = H[1];
condition1 = O>H[1];
end;
if pMode = 1 then begin
if condition1 then buy next bar value1 stop;
end else begin
if condition1 then buy next bar value1 stop;
end;
setexitonclose;
1,請問您的意思,邏輯變數是用else區分h[1]和l[1]的?
2.可以請教參數中的1,1代表昨天這樣嗎?
1. 你可能要先弄懂 邏輯變數的義意,這是程式的基礎
2. [1] 表示的是前一跟K棒,不一定是昨天,在日線而言你是對的,在分線或其他線來說,你是錯的
謝謝 我好好研究基礎
令請教這跳空訊號: input:aa(0); vars:value1(0); value1=h[1]+aa; if open>value1 then buy next bar at value stop; end; setexitonclose; 這問題在哪里?謝謝! 另外 if date[0] <> date[1] then begin
thx
編輯不出來
他說問題出在離開那里咧
我發現是少begin
但begin不是用在2行以上的程式碼嗎
語法里面的第二行是?
編輯文章 by 12331 2012-03-09 11:28:14
thx for ur answer!!!!
make a big help to me
inputs: pMode(1), pPriceMode(1);
if pPriceMode=1 then begin
value1 = L[1];
condition1 = O<L[1];
end else begin
value1 = H[1];
condition1 = O>H[1];
end;
if pMode = 1 then begin
if condition1 then buy next bar value1 stop;
end else begin
if condition1 then buy next bar value1 stop;
end;
setexitonclose;
1,請問您的意思,邏輯變數是用else區分h[1]和l[1]的?
2.可以請教參數中的1,1代表昨天這樣嗎?
1. 你可能要先弄懂 邏輯變數的義意,這是程式的基礎
2. [1] 表示的是前一跟K棒,不一定是昨天,在日線而言你是對的,在分線或其他線來說,你是錯的
謝謝 我好好研究基礎
令請教這跳空訊號: input:aa(0); vars:value1(0); value1=h[1]+aa; if open>value1 then buy next bar at value stop; end; setexitonclose; 這問題在哪里?謝謝! 另外 if date[0] <> date[1] then begin
thx
編輯不出來
他說問題出在離開那里咧
我發現是少begin
但begin不是用在2行以上的程式碼嗎
語法里面的第二行是?
編輯文章 by 12331 2012-03-09 11:28:14
inputs: pMode(1), pPriceMode(1);
if pPriceMode=1 then begin
value1 = L[1];
condition1 = O<L[1];
end else begin
value1 = H[1];
condition1 = O>H[1];
end;
if pMode = 1 then begin
if condition1 then buy next bar value1 stop;
end else begin
if condition1 then buy next bar value1 stop;
end;
setexitonclose;
1,請問您的意思,邏輯變數是用else區分h[1]和l[1]的?
2.可以請教參數中的1,1代表昨天這樣嗎?
1. 你可能要先弄懂 邏輯變數的義意,這是程式的基礎
2. [1] 表示的是前一跟K棒,不一定是昨天,在日線而言你是對的,在分線或其他線來說,你是錯的
謝謝 我好好研究基礎
令請教這跳空訊號: input:aa(0); vars:value1(0); value1=h[1]+aa; if open>value1 then buy next bar at value stop; end; setexitonclose; 這問題在哪里?謝謝! 另外 if date[0] <> date[1] then begin
thx
編輯不出來
他說問題出在離開那里咧
我發現是少begin
但begin不是用在2行以上的程式碼嗎
語法里面的第二行是?
編輯文章 by 12331 2012-03-09 11:28:14
1. 你可能要先弄懂 邏輯變數的義意,這是程式的基礎
2. [1] 表示的是前一跟K棒,不一定是昨天,在日線而言你是對的,在分線或其他線來說,你是錯的
謝謝 我好好研究基礎
令請教這跳空訊號: input:aa(0); vars:value1(0); value1=h[1]+aa; if open>value1 then buy next bar at value stop; end; setexitonclose; 這問題在哪里?謝謝! 另外 if date[0] <> date[1] then begin
thx
編輯不出來
他說問題出在離開那里咧
我發現是少begin
但begin不是用在2行以上的程式碼嗎
語法里面的第二行是?
編輯文章 by 12331 2012-03-09 11:28:14