TS STRATEGIA DI HULL

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #210702 quote
    GaspareGaspare
    Participant
    Veteran

    Ciao Roberto e buongiorno a tutti

    DEFPARAM CumulateOrders = false
    Defparam Flatbefore= 080000
    Defparam Flatafter = 220000
    
    MHull  = average[ A ,7](close)
    Bullish = MHull > MHull[1] and MHULL[1]  < MHULL[2]
    Bearish = MHull < MHull[1] and MHULL[1]  > MHULL[2]
    
    IF Bullish  AND Not LongOnMarket THEN
    BUY 1 CONTRACT AT CLOSE - B *pipsize limit//  B = 35% del range candela precedente
    
    ELSIF Bearish  AND Not ShortOnMarket THEN
    SELLSHORT 1 CONTRACT AT CLOSE + C *pipsize limit//  C = 35% del range candela precedente
    ENDIF
    
    SET STOP pLOSS          S + 5  // massimo relativo precedente + 5 pip
    SET TARGET pPROFIT      P     // 2 volte lo stop
    

    in riferimento a questa strategia

    puoi inserire il codice delle variabili    B  C   S   P

    Grazie

    #210703 quote
    GaspareGaspare
    Participant
    Veteran

    in caso di LONG lo stop :   5 pip meno del minimo relativo precedente massimo

    in caso di SHORT lo stop 5 pip piu’ del massimo relativo precedente

    #210825 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Ecco fatto:

    DEFPARAM CumulateOrders = false
    Defparam Flatbefore= 080000
    Defparam Flatafter = 220000
    A       = 36
    MHull   = average[A ,7](close)
    Bullish = MHull > MHull[1] and MHULL[1]  < MHULL[2]
    Bearish = MHull < MHull[1] and MHULL[1]  > MHULL[2]
     
    IF Bullish  AND Not LongOnMarket THEN
       B = range[1] * 0.35
       BUY 1 CONTRACT AT CLOSE - B *pipsize limit//  B = 35% del range candela precedente
       S = (abs(close - low[1]) / PipSize) + 5
    ELSIF Bearish  AND Not ShortOnMarket THEN
       C = range[1] * 0.35
       SELLSHORT 1 CONTRACT AT CLOSE + C *pipsize limit//  C = 35% del range candela precedente
       S = (abs(close - high[1]) / PipSize) + 5
    ENDIF
    P = S * 2
    SET STOP pLOSS     S     // massimo relativo precedente + 5 pip
    SET TARGET pPROFIT P     // 2 volte lo stop
    Gaspare thanked this post
    #210862 quote
    GaspareGaspare
    Participant
    Veteran

    alla riga 12 non dovrebbe essere -5?

    #210869 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    No, calcola lo stop loss in punti e ce ne aggiunge 5.

    Come dici tu andrebbe bene se usassi direttamente il prezzo di uscita, allora usciresti al livello calcolato – 5 punti (o + 5 punti per lo Short).

    Gaspare 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

TS STRATEGIA DI HULL


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Gaspare @gaspare Participant
Summary

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

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