|
好寫作架構,容易比較能找出邏輯上的失誤
所有的 else 混亂重疊在一起...
A段
if X1<=100 then
SellShort 1 contracts next bar at Y2 limit
else // 100 < X1
buy 1 contracts next bar at Y2 limit;
B段
if 100 < X1 and X1< 500 then
SellShort 1 contracts next bar at Y2 limit
else // X1 <= 100 or 500 <= X1
buy 1 contracts next bar at Y2 limit;
C段
if 500 <= X1 and X1<1000 then
SellShort 1 contracts next bar at Y2 limit
else // X1 < 500 or 1000 <= X1
buy 1 contracts next bar at Y2 limit;
if x1>=1000 then
SellShort 1 contracts next bar at Y2 limit
else // X1 < 1000
buy 1 contracts next bar at Y2 limit;
|
|