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!

How to use STDDEV as a filter?

4 replies

Ricardo Almeida Branco

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

Visit profile

4 years ago #279209

Goodnight.

How can I use STDDEV as a filter?

I only want to buy or sell (depending on the direction of the average for example) when the STDDEV is greater than a number x.

But the SQ understands that the indicator is a signal, and since in the additional build setup I define in the direction of trades that the signals must be symmetrical, it tries to buy if the STDDEV is higher than the number x but it tries to sell if it is lower than x. He is correct from a symmetry point of view.

That’s why I wanted the moving average to be a signal and the STDDEV just a filter, but I don’t know how to configure it.

Any suggestion?

Thanks.

0

Tomas Matejka

Administrator, sq-ultimate, 2 replies.

Visit profile

4 years ago #279296

Hi,

can you share a chart screenshot of long / short trade setups for me to be sure? I can setup an example then

0

Ricardo Almeida Branco

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

Visit profile

4 years ago #279310

Okay, I’ll try to explain with the image below.

I am operating USAVIX, mean crossover. If the price opens below the average and closes above, buy, otherwise sell but…

Only if the standard deviation is greater than 0.280. If the standard deviation is less than this value, it does nothing.

So the signal is the mean crossing but the standard deviation is a filter that doesn’t work if the value is too small. I want to avoid entering the lateralizations.

So, on the whole graph, it wouldn’t have operated where I didn’t put the arrows, because the filter didn’t allow it. It would have operated only where I marked it had the standard deviation greater than 0.280.

Did I explain?

Attachments:
You must be logged in to view attached files.

0

Tomas Matejka

Administrator, sq-ultimate, 2 replies.

Visit profile

4 years ago #279594

Hi,

to achieve this you need to setup a template. I am not sure about the exact StdDev value but you can check the attached example

Check further resources on building using templates here https://strategyquant.com/?s=template&filter=documentation

Attachments:
You must be logged in to view attached files.

0

Ricardo Almeida Branco

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

Visit profile

4 years ago #279733

Thanks for listening!

I managed to use it here with your model and I understood how to do it for new cases.

Thank you very much!

0

Viewing 4 replies - 1 through 4 (of 4 total)