SuperTrend + DMI

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #190529 quote
    andreabarbusciaandreabarbuscia
    Participant
    New

    Buonasera a tutti,

    sto cercando di scrivere su PRT una idea di trading basata sull’utilizzo del SuperTrend in maniera un po diversa. Al posto di entrare al cambio colore, sarebbe interessante sfruttare il Pullback. Per far questo avevo pensato di associare al ST il DMI ed aspettare che questo incroci nella stessa direzione del trend segnalato dal ST dopo il ritracciamento. Secondo voi è possibile far questo? Ho fatto diversi tentativi ma probabilmente sbaglio qualcosa. Riepilogando:

    1. ST cambia colore da rosso a verde;
    2. ADX > 20
    3. -DI incrocia al rialzo il +DI (questo deve avvenire DOPO il cambio colore, il ST deve già essere verde)
    4. Entro a mercato.

    Ovviamente per il lato short le condizioni sono speculari.

    Ringrazio anticipatamente chi mi darà supporto.

    Buona serata.

    #190653 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Mi sembra che funzioni (esce in Stop & Reverse):

    DEFPARAM CumulateOrders = false
    ONCE CambioST = 0
    MyST    = Supertrend[3,10]
    MyADX   = ADX[14]
    PlusDI  = DIplus[14](close)
    MinusDI = DIminus[14](close)
    L1      = close > MyST
    S1      = close < MyST
    L2      = MyADX > 20
    S2      = L2
    L3      = MinusDI CROSSES OVER  PlusDI
    S3      = MinusDI CROSSES UNDER PlusDI
    IF L1 <> L1[1] THEN
       CambioST = 1
    ENDIF
    Lcond   = L1 AND L2 AND L3 AND CambioST
    Scond   = S1 AND S2 AND S3 AND CambioST
    IF L3 OR S3 THEN
       CambioST = 0
    ENDIF
    IF Lcond AND Not LongOnMarket THEN
       BUY 1 CONTRACT AT MARKET
    ELSIF Scond AND Not ShortOnMarket THEN
       SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
    andreabarbuscia thanked this post
    #190673 quote
    andreabarbusciaandreabarbuscia
    Participant
    New

    Buon pomeriggio Roberto,

    ti ringrazio.

    Provo a fare un test!

    A presto.

    Andrea

Viewing 3 posts - 1 through 3 (of 3 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

SuperTrend + DMI


ProOrder: Trading Automatico & Backtesting

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by andreabarbusciaandreabarbuscia
4 years, 6 months ago.

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