All'inizio di ogni giorno il sistema piazza un buy limit sotto la chiusura del primo bar e un sell limit sopra di essa, ciascuno a una distanza di 0.5 volte il range a 12 bar. Qualsiasi posizione aperta viene chiusa sul primo bar del giorno successivo. Non è ancora stata testata in backtest.
| positionSize Azioni per operazione | 1 |
| entryRatio Distanza del limit come frazione del range recente; più alto significa meno operazioni | 0.5 |
| stopLossPct Stop protettivo, percentuale del prezzo di ingresso | 1 |
| takeProfitPct Target di profitto, percentuale del prezzo di ingresso | 0.8 |
| rangePeriod Barre usate per il range recente | 12 |
| fridayNumber Nessun nuovo ordine in questo giorno della settimana | 5 |
Il codice
// ============================================================ // Yen End-of-Day Straddle // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long & short // Timeframe tested: Not yet tested // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false DEFPARAM PreloadBars = 1000 // --- Parameters --- // Defaults are the USD/JPY set. Other pairs from the published table: // AUD/JPY ratio 0.5, stop 0.8, target 1.2, period 12 // EUR/JPY ratio 0.6, stop 1, target 0.8, period 8 // GBP/JPY ratio 0.5, stop 0.6, target 1, period 8 positionSize = 1 // shares per trade entryRatio = 0.5 // limit distance as a fraction of the recent range; higher means fewer trades stopLossPct = 1 // protective stop, percent of entry price takeProfitPct = 0.8 // profit target, percent of entry price rangePeriod = 12 // bars used for the recent range fridayNumber = 5 // no new orders on this day of the week // --- Indicators --- newDay = Day <> Day[1]
Altre 19 righe: le regole di ingresso e di uscita.
Configurazione
Domande
È scritta per ProOrder con ordini limit, uno stop dell'1% e un target dello 0.8%. Non è ancora stata verificata in compilazione né testata in backtest.
Ancora nessuno. I valori predefiniti sono impostati per una coppia in yen, ma non esistono risultati per nessun mercato.
Usa una size di 1 azione per operazione. Non c'è ancora un dato di drawdown, quindi fai paper trading prima di impegnare denaro.
Correlati
La community ProRealAlgos ottiene le regole complete, il codice completo e il portafoglio automatizzato.