errore strategia multi timeframe

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #183367 quote
    KAMJKAZE
    Participant
    Junior

    salve a tutti,
    stavo provando questa strategia multi timeframe ma non gira…
    lo scopo è filtrare i trade sul daily con MACD
    sul 4h attraverso le medie mobile a 7 ,12 e 26 periodi
    e sul 5 minuti ci dovrebbe essere l’ingresso se le condizioni precedenti sono verificate, in favore del trend, quando il close supera a rialzo il supertrend o a ribasso a seconda del caso.
    ma non gira e non capisco dove è l’errore.
    grazie in anticipo
    stefano

    defparam CUMULATEORDERS= false
    
    TIMEFRAME (DAILY,UPDATEONCLOSE)
    indicatore= MACD[12,26,9](close)
    Long = (indicatore > 0)
    Short =(indicatore < 0)
    
    TIMEFRAME(4H,UPDATEONCLOSE)
    SMA7= Average[7](close)
    SMA12= Average[12](close)
    SMA26= Average[26](close)
    //CONDIZIONI 4hSHORT
    TOPSHORT= SMA26>SMA7
    STARTSHORT = SMA12>SMA7 and close<SMA7
    if Short then
    if TOPSHORT or STARTSHORT then
    trade=2
    endif
    endif
    
    //CONDIZIONI OTTIMALI DI TRADING LONG
    STARTLONG= SMA7> SMA12 and close> SMA7
    TOPLONG = SMA26<SMA7
    
    if Long then
    if STARTLONG or TOPLONG then
    trade=1
    endif
    endif
    
    
    //TIMEFRAME 5 MIN
    TIMEFRAME (DEFAULT)
    
    ST = Supertrend[3.5,10]
    c1= close crosses over ST
    c2= close crosses under ST
    
    if trade=1 and c1 then
    buy 1 contract  at market 
    endif
    
    if trade=2 and C2 then
    sell 1 contract at market 
    endif
    
    #183369 quote
    robertogozzi
    Moderator
    Master

    Non apre nessuna posizione?

    #183370 quote
    KAMJKAZE
    Participant
    Junior

    no, non apre posizioni

    #183371 quote
    robertogozzi
    Moderator
    Master

    A me sul DAX le ha aperte, prova ad aumentare le unità (io uso 200K, di solito).

    x-3.jpg x-3.jpg
    #183373 quote
    KAMJKAZE
    Participant
    Junior

    avevi ragione, funziona… non è bellissima ma almeno gira. grazie mille roberto

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

errore strategia multi timeframe


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
KAMJKAZE @kamjkaze Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by KAMJKAZE
4 years, 1 month ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 12/15/2021
Status: Active
Attachments: 1 files
Logo Logo
Loading...