SUperTrend e SMA

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #188960 quote
    Hary Trading
    Participant
    New

    Buonasera,

    Se sono sono troppo indiscreto vorrei sapere se qualcuno può aiutarmi in merito alla codifica della seguente strategia:

    Partiamo da due indicatori

    Supertrend dettato 10-1,5

    SMA 50

    Long Scenario:

    Quando una candela chiude sopra la SMA50 e contestualmente Suprtrend gira positivo, si entra long con target 40 punti e stop 40 punti

    Short Scenario

    Quando una candela chiude sotto la SMA50 e contestualmente Supertrend gira in negativo, si entra short con target 40 punti e stop 40 punti

     

    Mi piacerebbe anche eseguire dei test sulla strategia sopra descritta, filtrandola per fasce orarie:

    Le ore in cui il set up sarebbe valido sono :

    dalle 08:00 alle 11:00

    dalle 15:00 alle 18:00

    dalle 20:00 alle 22:00

     

    Ringrazio anticipatamente chi vorrà rispondermi

    Hard

    #188962 quote
    robertogozzi
    Moderator
    Master

    Ecco:

    TradeON = time >= 080000 and time <= 110000
    //TradeON = time >= 150000 and time <= 180000
    //TradeON = time >= 200000 and time <= 220000
    myST   = Supertrend[1.5,10]
    Sma50  = average[50,0](close)
    L1     = close > Sma50
    S1     = close < Sma50
    L2     = close CROSSES OVER  myST
    S2     = close CROSSES UNDER myST
    IF L1 and L2 and Not OnMarket and TradeON THEN
       BUY 1 Contract at Market
    ENDIF
    IF S1 and S2 and Not OnMarket and TradeON THEN
       SELLSHORT 1 Contract at Market
    ENDIF
    Set Target pProfit 40
    Set Stop   pLoss   40

    È impostato per il primo orario, per provare gli altri basta che metti le doppie barre dei commenti alla riga 1 e le togli alla 2, ecc…

    #189137 quote
    Hary Trading
    Participant
    New

    Grazie Roberto per la tua gentilezza e disponibilità

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

SUperTrend e SMA


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Hary Trading @adtrader Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Hary Trading
3 years, 11 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 02/27/2022
Status: Active
Attachments: No files
Logo Logo
Loading...