READ-ONLY

The forum is now a read-only archive.

For bug reports & platform questions → [email protected]

Our community lives on Discord and YouTube — come join us!

SQ_KSTest

1 replies

Jason

Subscriber, bbp_participant, customer, community, sq-ultimate, 26 replies.

Visit profile

1 year ago #289416

I have had a heck of a time working with this function. Some backtests in SQ match the backtest in TS, some do not. It was difficult to track down the problem but I believe I have finally found it. I want to run SQ_KSTest on a higher timeframe but SQx doesn’t not code SQ_KSTest to data2 for reasons I don’t understand. If for instance I choose to run an SMA on data2 it codes that just fine. When I change my template to data2 I get the following EL code:
“Value1= SQ_KSTest(Close,KolmogorovSmrTstPrd11, KolmogorovSmrTstPrd21,0.05)[1];”

When I manually edit the code to look like this:
“Value1= SQ_KSTest(Close,KolmogorovSmrTstPrd11, KolmogorovSmrTstPrd21,0.05) of data2 [1];”

I get the following error:
“Class elsystem.eldouble has no default property or you are attempting to refer to a historical value of a local variable that has no history”.

When I manually edit the code to look like this:
“Value1= SQ_KSTest(Close of data2,KolmogorovSmrTstPrd11, KolmogorovSmrTstPrd21,0.05)[1];”

I get an equally different backtest.

Is there way to get the SQ_KSTest function to reference data2? Otherwise none of these strategies are going to work.

0

Jason

Subscriber, bbp_participant, customer, community, sq-ultimate, 26 replies.

Visit profile

1 year ago #289417

nevermind, I developed a work around.
change this:
“Value1= SQ_KSTest(Close of data2,KolmogorovSmrTstPrd11, KolmogorovSmrTstPrd21,0.05)[1];
LongEntrySignal = (Value1 = 1);”

to this:
“DataStream2Time = T of data2;

if DataStream2Time <> DataStream2Time[1] Then
Begin
Value1= SQ_KSTest(Close of data2,KolmogorovSmrTstPrd11, KolmogorovSmrTstPrd21,0.05)[1];
LongEntrySignal = (Value1 = 1);
end;”

0

Viewing 1 replies (of 1 total)