The Pinnacle Of Moving Average
- Experts
- Daniele Fughelli
- Versione: 1.2
- Aggiornato: 25 giugno 2024
- Attivazioni: 5
Non sei stanco di algoritmi che promettono guadagni impossibili ma che nel trading reale non sono in grado di funzionare?
Se è così, allora questo algoritmo è probabilmente ciò che stavi cercando. Chiunque preferisca l'illusione di guadagni senza senso in brevi periodi di tempo è meglio che ignori questa pagina e prosegua oltre. Una volta chiarito questo, parliamo dell'algoritmo.
Questo algoritmo è totalmente diverso da quanto ho visto nel mercato finora. Questo è un algoritmo a lungo termine, pensato per resistere a cambiamenti di breve periodo nei mercati finanziari e avere comunque profittevolezza nel lungo periodo. Quindi, non aspettatevi di fare milioni in un anno o in un giorno (nessuno venderebbe un algoritmo veramente capace di fare ciò, non avrebbe senso). E quasi impossibile per un algoritmo che mostra 10000% di guadagno in un anno continuare a funzionare anche nel medio/lungo termine.
Questo algoritmo mostra un valido guadagno medio annuale, in funzione del rischio che siete disposti a correre. Il backtest di cui sotto è stato fatto con una size di 2 lotti per ordine in un account da 100k dollari. Il risultato è 221.483$ (+221%) di profitto netto in 12 anni (dal 2012 al 2024) per un guadagno medio annuale di più del 18% con un massimo drawdown di 27.526$ (27.5%).
Out of sample di 2 anni: i parametri sono stati calcolati in un backtest che va dal 2012 al 2021. Dal 2022 al 2024, ho effettuato una simulazione per verificare quanto affidabile fosse l'algoritmo anche al di fuori del periodo di backtest puro. Questa è la simulazione più vicina al trading reale che potessi fare.
La size (cioè il lottaggio) per ogni ordine puù essere cambiata manualmente. Voglio che ognuno possa scegliere la size con cui si sentono più a loro agio.
Ma il meglio deve ancora venire.
Expected payoff di 142$ per lotto usato in un lasso temporale di 12 anni. Questo significa che l'algoritmo è stabile e può resistere le tasse notturne e gli sbalzi dello spread.
Ho fatto andare l'algoritmo anche nella fascia temporale fra il 2003 e il 2012 per curiosità e si è dimostrato profittevole anche in quel periodo. E' inusuale che un algoritmo funzioni bene anche prima del periodo di backtest usato per l'ottimizzazione dei parametri. Questo significa che ha una buona versatilità nell'adattarsi ai cambiamenti di mercato. La curva dell'equity era più sporca ma comunque in un significativo profitto. Dunque, l'algoritmo è stato profittevole in un periodo complessivo di 21 anni di backtest. Non ho incluso la foto del test fra il 2003 e il 2012 ma, se la chiederete, la metterò.
Si può usare anche il Martingala ma a tuo rischio e pericolo. L'equity postata qui sotto (quella a forma di retta) è stata ottenuta usando il martingala con lottaggio di 0.3. Puoi usarlo ma per favore fai attenzione e usalo solo se sai cosa il martingala sia. Se non lo sai, chiedimelo e ti spiegherò nel dettaglio come funziona e quali sono i suoi vantaggi e i rischi dovuti all'utilizzo di questa strategia probabilistica. L'algoritmo funziona bene anche senza il martingala.
Ovviamente nessuno può prevedere l'andamento futuro del mercato. Il trading è sempre pericoloso e può portare alla liquidazione del conto se fatto impropriamente. Quindi, per favore, usa l'algoritmo in modo logico e ponderato. Non incrementare la size fino a valori assurdi rispetto alla dimensione del conto usato, visto che l'algoritmo potrebbe avere drawdown (periodi di perdita) più profondi in futuro rispetto a quanto risulti nel backtest e, di conseguenza, compromettere il tuo capitale totale.
In funzione del backtest e dell'out of sample, questo algoritmo può aiutarti a raggiungere l'obiettivo di diventare profitevvole con il trading. Essere profittevoli per 1 anno è inutile. Quello che conta è esserlo nel lungo periodo.
Aspettati di avere qualche anno negativo qua e là. Fa parte della strategia (per mantenerla più flessibile e duratura). Non scrivermi dicendo che l'algoritmo non funziona se non sono neanche passati 3 anni dall'acquisto. Non risponderò a tali messaggi.
Per ogni domanda o problemi, potete sempre contattarmi. Risponderò il prima possibile.
L'algoritmo funziona con una media mobile semplice più altri parametri. L'ho tenuto il più semplice possibile per renderlo più resistente a futuri cambiamenti nel mercato. C'è una restrizione sulle fasce orarie in cui il trading è consentito ma stop loss e take profit possono comunque essere colpiti fuori da suddette fasce orarie, quindi una VPS è fortemente suggerita (è pericoloso non usarla).
Timezone: GMT+2 Per favore, modifica "GMT" in funzione della timezone del tuo broker. Questo è fondamentale. Se non lo farai, l'algoritmo collasserà quasi sicuramente!
Fai sempre un backtest di verifica prima di tradare con un account reale per verificare se la timezone è settata correttamente.
Strumento di mercato: GBPUSD SOLO!!!
Time frame: 30min solo!
Inputs:
-GMT --- devi inserire il GMT del tuo broker. Non toccare questo valore se non per modificarne la timezone come detto sopra!
-multiplier --- parametro del martingala: 1 è il valore di default (martingala è disattivato). Cambialo a 2 se vuoi attivare il martingala. Stai attento a verificare che il numero corretto sia stato inserito. Non inserire altri numeri (non ci sarà nessun errore dato dall'algoritmo, in quanto penserà che la vostra sia una scelta fatta con cognizione di causa e non un errore). Per favore, cambia "Trailing_Stop" e "Balance_Average" in "false" in caso si voglia usare il martingala (per farlo basta fare doppio click su "true" e selezionare "false".
-Size --- lottaggio degli ordini: 1 è il valore di default (basso rischio). Mi sento di scoraggiare fortemente l'uso di 4 o più lotti. Questi lotti sono quelli usati per un account da 100k. Dividili per 10 se hai un account da 10k.
Esempio: Size=0.1 per 10k di account e 0.01 per 1k di account.
Usa Size=2 ; 0.2 ; 0.02 (basati su account di 100k, 10k, 1k, rispettivamente) se vuoi ottenere performance simili alle foto qui sotto.
Trailing_Stop --- usa una sorta di trailing stop (aggiunto con la versione 1.1). "true" è il valore di default (attivo). Migliora le performance.
Balance_Average --- raddoppia i lotti usati quando certe condizioni sono verificate (aggiunto con la versione 1.2). "true" è il valore di default (attivo). Migliora le performance. Mi raccomando, disattivalo (doppio click su "true" e poi selezioni "false") in caso sullo stesso account venga effettuato trading manuale o vengano usati altri algoritmi insieme a questo.
Il prezzo incrementerà sicuramente. Non ho ancora deciso una data. Potrebbe essere la prossima settimana o il prossimo mese ma sicuramente succederà in funzione di motivi esterni. Il prezzo completo sarà intorno ai 2000$. Non è necessario che acquistiate l'algoritmo adesso, a meno che non vogliate beneficiare delle sue performance fin da subito mentre risparmiate soldi da poter investire nell'uso dell'algoritmo stesso.
Inoltre, l'algoritmo è stato in drawdown nelle ultime 2 settimane, come si evince dal backtest di cui sotto, quindi è probabile che sia profittevole nei prossimi giorni. Non è una certezza ma il backtest suggerirebbe ciò.
Può essere usato con le prop-firms. Ho visto un algoritmo nel mercato che consente di passare le challenge di alcune prop-firms. Non sono sicuro che funzioni, ma di sicuro il mio algoritmo è meglio usarlo dopo averle superate (potrebbe volerci un pò di tempo prima di passarle o un'incremento di rischio importante per riuscirci in tempi brevi mentre si cerca di rispettare i limiti imposti sui drawdown). Puoi comunque usarlo anche per le challenge ovviamente però. Di fatto, ho aggiunto il martingala con l'idea di superare le challenge. Stai giusto attento nell'usarlo e sappi che potresti fallire un paio di challenge prima di riuscire a passarne 2 consecutive e ottenere un account.
Detto questo, vi auguro il successo.