REVERSAL SU TREND PRIMARIO

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

    Buonasera,

    Prima di tutto vorrei ringraziare in anticipo chi vorrà aiutarmi.

    Vorrei testare una strategia di questo tipo:

    Premessa: il set up va solo long

    Se ci sono 3 candele consecutive  che registrano una escursione ribassista del 1,02% e la quarta candela è positiva, si entra long a recupero del 50% del movimento di ampiezza ribassista delle 3 candele che hanno generato il ribasso.

    Quindi target 1 50% dell’ampiezza del ribasso

    Target 2 80% dell’ampiezza del ribasso

    Target 3 100% di ampiezza del ribasso

    Stop sarà il minimo registrato durante il movimento ribassista

     

    se possibile, vorrei anche inserire un trailing stop che, una volta raggiunto target 1, segua il trend di recupero ogni 0,2%

     

    Spero di essermi spiegato bene

    Grazie ancora

     

    Hary

    #203839 quote
    Hary Trading
    Participant
    New

    Buonasera,

     

    c’è qualche buon anima che possa aiutarmi?

    Grazie

    #203855 quote
    robertogozzi
    Moderator
    Master

    Si, se puoi pazientare ancora un pò. Grazie 🙂

    #203951 quote
    Hary Trading
    Participant
    New

    Ma certo Roberto, ci mancherebbe altro…mi scuso per l’impazienza…

    grazie

    #203960 quote
    robertogozzi
    Moderator
    Master

    Eccolo:

    DEFPARAM CumulateOrders = False
    ONCE Entra = 0
    IF OnMarket THEN
       Entra = 0
    ELSE
       IF (close <= StopLoss) OR (close >= Entrata) THEN
          Entra = 0
       ENDIF
    ENDIF
    IF Entra = 0 AND Not OnMarket THEN
       HH          = highest[3](high[1])
       LL          = lowest[3](low[1])
       Escursione  = HH - LL
       Entrata     = LL + (Escursione / 2)
       Uscita50    = Entrata + (Escursione * 0.50)
       Uscita80    = Entrata + (Escursione * 0.80)
       StopLoss    = LL
       PerCentuale = Escursione * 100 / HH
       c1          = PerCentuale >= 1.02
       c2          = close > open
       IF c1 AND c2 THEN
          Entra = 1
       ENDIF
    ENDIF
    IF Entra AND Not OnMarket THEN
       BUY 3 CONTRACTS AT Entrata STOP
       Set Stop   Price LL
       Set Target Price Entrata + Escursione
    ENDIF
    IF OnMarket THEN
       IF close >= Uscita50 AND CountOfPosition = 3 THEN
          SELL 1 CONTRACT AT MARKET
       ELSIF close >= Uscita80 AND CountOfPosition = 2 THEN
          SELL 1 CONTRACT AT MARKET
       ENDIF
    ENDIF
    IF OnMarket AND CountOfPosition < 3 THEN
       IF close >= StopLoss * 1.002 THEN
          StopLoss = StopLoss * 1.002
       ENDIF
    ENDIF
    //graphonprice Entrata
    //graphonprice LL       coloured("Red")
    //graphonprice StopLoss coloured("Blue")
    //graphonprice Uscita50 coloured("Green")
    //graphonprice Uscita80 coloured("Green")
    //graph PerCentuale
    #203968 quote
    Hary Trading
    Participant
    New

    grazie infinite Roberto

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

REVERSAL SU TREND PRIMARIO


ProOrder: Trading Automatico & Backtesting

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

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

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