I am trying to do a ticki indicator but for Swedish stocks and futures.
Hope that someone can see where I am doing wrong.
Thanks in advance. BR Stefan
Code: Select all
Input: NumberInstruments(47);
Vars: Datacounter(0);
Vars: Newuptick (0);
Vars: NewupTickAgg (0);
Vars: NewdownTick (0);
Vars: NewdownTickAgg (0);
Vars: Uptickcount (0);
Vars: downtickcount (0);
//Vars: intrabarpersist Uptick (0);
//Vars: intrabarpersist Downtick (0);
//reset variables
NewupTick =0;
NewupTickAgg =0;
NewdownTick =0;
NewdownTickAgg =0;
For datacounter = 2 to Numberinstruments begin
if close > close[ 1 ] of data(datacounter) then UpTickCount = upTickCount[ 1 ] + 1;
if close < close[ 1 ] of data(datacounter) then downtickcount = downtickcount[1] + 1;
end;
//UpTickCount = (NewupTick /(Numberinstruments-1)) * 100;
//Downtickcount = (NewdownTick/(Numberinstruments-1)) * 100;
Value1 = UpTickCount-Downtickcount;
Plot1(value1,"");