SMA Period Test for crossover not possible?
9 replies
patrick Müller
8 months ago #281473
Moin
I want to make a simple test on daily under builder which finds the best crossover(close,sma) for long and crossunder(close,sma) for short.
Test from 8 – 250 MA
Is this actually not possible?

tomas262
8 months ago #281488
Hello,
simply setup such system in AlgoWizard.
You can later load into Optimizer to find the best parameters for the cross
patrick Müller
8 months ago #281505
Hey thanks, I tried in AlgoWizard to create this, there seems to be an error, can you help me? Thanks
patrick Müller
8 months ago #281508
Para:

tomas262
8 months ago #281639
Hi,
the strategy is fine seems. The problem is a missing exit. It opens an initial trade which is never exited. Do you plan to reverse an open existing position on the opposite signal?
patrick Müller
8 months ago #281684
Hi @thommas262
Thank you for your answer.
I think I wrote it wrong.
Better would be: Only long and that with:
LONG = ta.crossover(close, SMA) and close (exit) = ta.crossunder(close, SMA)
How could you implement this? can you help me make a sqx file?

tomas262
8 months ago #281732
Hi,
check the example attached. Simply put the file into Optimized to get the best values for SMAperiodEntry and SMAperiodExit
patrick Müller
8 months ago #281733
Good morning tomas262,
Thank you for the file. I have now spent 3 hours trying to optimize it, but I keep getting the same values for SMAperiodEntry=14 and SMAperiodExit=36.
I happen to know from my backtesting that the most profitable SMA period for AAPL is SMA 30 for entry and SMA 211 for exit. Now I’m wondering if the optimizer is faulty or if I’m doing something wrong. In any case, something doesn’t seem right.
patrick Müller
8 months ago #281741

tomas262
8 months ago #281763
Hi,
you can switch the optimizer to manual mode and adjust parameter ranges to what need. In your screenshot you use the “automatic” mode which prevents from finding the setup you need
See the clip attached
Viewing 9 replies - 1 through 9 (of 9 total)