Dear XQ小幫手,
我寫一支15分K線警示小程式
只要15分k出現往上的2支小紅K後 我就去做空它
4/22日我以商品4551智伸科 去回測它時發現
最後一天(4/21)的15分K線有3處符合我的條件(附圖畫黃圈處)
卻都沒在回測時被找出來, 拜託幫忙我看一下
原因到底是甚麼, 感恩.
程式as following:
condition1=false;
condition2=false;
condition7=false;
value1=0;
value2=0;
if barfreq <>"Min" or barinterval <>15
then raiseruntimeerror("本腳本只限15分鐘線");
value1=(close-open)*100/open;
value2=(close[1]-open[1])*100/open[1];
if value1<=0.6 and close>open
then condition1=true; //小紅1
if value2<=0.6 and close[1]>open[1]
then condition2=true;//小紅2
if close>close[1]
then condition7=true;
if condition1 and condition2 and condition7
then ret=1;



3 評論