交易程式碼
input: Length(14,"天數");
value1 = Average(TrueRange, Length);
value2=open-low;
value3=high-open;
value4=high-low+0.0001;
value7=open-(value1)/4;
value8=open+(value1)/4;
condition1=high >= value8-0.0001 ;
condition2= low <= value7 ;
if condition1 then setposition(-1,value8);
if condition2 then setposition(1,value7);
指標程式碼
input: Length(14,"天數");
value1 = Average(TrueRange, Length);
value2=open-low;
value3=high-open;
value4=high-low+0.0001;
value7=open-(value1)/4;
value8=open+(value1)/4;
condition1=high >= value8-0.0001 ;
condition2= low <= value7 ;
Plot1(value1, "ATR",checkbox:=0);
if condition1 then plot2(value8,"S");
if condition2 then plot3(value7,"B");
3 評論