Mean reverting strategy

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #216887 quote
    MarcfarmMarcfarm
    Participant
    New

    Buongiorno sto implementando una strategia mean reverting solo long con le seguenti condizioni:

    Se indicatore IBS<25 e RSI 5 periodi <30 si acquista con ordine limit nella seduta successiva (compra se il mercate batte una quotazione sotto il prezzo minimo di oggi)

    Se il prezzo di chiusura è superiore al prezzo massimo della seduta precedente si vende in chiusura di seduta o all’apertura della seduta successiva

    Stopp loss 10%

    Capitale fisso 20000$ ad operazione

    Ho iniziato il codice (così com’è non funziona) ma non riesco a finirlo.

    Grazie

    DEFPARAM CumulateOrders = false
    timeframe(Daily,UpdateOnClose)
    // Entry strategy
    IBS     =  ((Close - Low) / (High - Low))*100
    MYRSI= RSI(5)
    c1      = MYRSI < 30
    c2      = IBS < 25
    IF Not OnMarket AND c1 AND c2 THEN
    BUY 1 Contract AT Market
    ENDIF
    // EXIT
    IF OnMarket AND close > high[1] THEN
    SELL AT Market
    ENDIF
    #216948 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    La riga 5 deve essere scritta con le parentesi quadre (con quelle tonde si indica su quale dati va applicato l’indicatore, se omesse viene assunto CLOSE):

    MYRSI   = RSI[5](close)
Viewing 2 posts - 1 through 2 (of 2 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

Mean reverting strategy


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Marcfarm @marcfarm Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzirobertogozzi
3 years, 2 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 06/27/2023
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...