STRATEGIA LONG – SUPERTREND ( 3.5 -10 ) + RSI ( 3.50 – 14 )

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #149857 quote
    alberto1963alberto1963
    Participant
    New

    Ciao Roberto,

    visto l’impossibilità di  fare Backtesting con la strategia che ti avevo  precedentemente inviato  ” DONCHIAN + FORZA RELATIVA PARAGONE ” ne ho studiata un’altra,  riesci ad attuarla  in  programmazione semplificata o a codici ( io con la semplificata non riesco  probabilmente sbaglio ragionamento e sequenza  ).

    STRATEGIA LONG :  SUPERTREND  ” Moltiplicatore  3,50 – Periodo 10 ”  +  RSI   ”  Periodo 14 –  Max. 70 – Min. 30   questa strategia dovrebbe diminuire i falsi segnali rispetto ai Canali di DONCHIAN, inoltre il SUPERTREND funziona su tutti gli strumenti Finanziari ( Azioni, Indici, Forex ) ed è applicabile a qualsiasi scala temporale.

    SEGNALE  DI ENTRATA ( con 2 conferme ):  Quando il prezzo si trova a chiusura di barra sopra la Linea Verde del SUPERTREND e contemporaneamente il prezzo a chiusura di barra sull’ RSI è Maggiore o Uguale a 70.0  ( questo segnale di entrata a doppia conferma dovrebbe lasciare correre un po’ di profitto all’entrata, ma però consente di stare meno tempo sul mercato e di cogliere solo il periodo dove ci sono forti trend rialzisti ” confermati in entrata dall’ RSI “, dimmi cosa ne pensi …. ).

    SEGNALE DI USCITA :  Quando il prezzo si trova a chiusura della barra Sotto la Linea Rossa del SUPERTREND.

    STOP LOSS:  Se possibile Progressivo, impostato al gradino inferiore delle Linea Verde del SUPERTREND.

    IN ALLEGATO:   PDF

    NON SO SE HAI ANCHE QUALCHE IDEA PER MIGLIORARLA ….. A PARTE IL FATTO CHE ANDREBBE PRIMA TESTATA

    Ti ringrazio anticipatamente, ti disturberò anche per uno screener….

    Alberto.

    Strategia-SUPERTREND-RSI.pdf
    #149900 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Eccola:

    DEFPARAM CumulateOrders = false
    MyST  = Supertrend[3.5,10]
    MyRSI = Rsi[14](close)
    c1    = close > MyST AND MyRSI >= 70
    MySL  = min(MySL,abs(TradePrice - MyST))
    IF Not OnMarket THEN
       MySL = 0
    ELSE
       SET STOP LOSS MySL
    ENDIF
    IF c1 AND Not OnMarket THEN
       BUY 1 CONTRACT AT Market
       MySL  = close - MyST
       SET STOP LOSS MySL
    ENDIF
    c2    = close < MyST
    IF c2 AND LongOnmarket THEN
       SELL AT Market
    ENDIF

    potresti aggiungere un trailing stop, ma questo potrebbe ridurti i profitti. Dipende dal tuo modo di tradare.

    Comunque mi sembra una buona base di partenza!

    alberto1963 thanked this post
    #149940 quote
    alberto1963alberto1963
    Participant
    New

    GRAZIE MILLE ROBERTO,  SEI UN GRANDE !!!

    #149949 quote
    alberto1963alberto1963
    Participant
    New

    Ciao Roberto,

    grazie ancora per il codice, mi pare di capire però che il Backtest lo fa acquistando n° 01 Azione a prezzo di mercato ( Riga 12 ” BUY 1 CONTRACT  AT Market  ) si può sostituire questa parte invece che con n° Azioni con un IMPORTO ( per esempio:  500 $ 0 Euro ) ?  Mi puoi mandare la riga da sostituire.

    GRAZIE.

    #149950 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Invece di 1 contract scrivi N Shares,

    devi prima calcolare il numero N.

    Sarà dato da quanto vuoi acquistare / close.

    Quindi N=500/close.

    alberto1963 thanked this post
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

STRATEGIA LONG – SUPERTREND ( 3.5 -10 ) + RSI ( 3.50 – 14 )


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
alberto1963 @afiorina Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by robertogozzirobertogozzi
5 years, 11 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 11/08/2020
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...