Trading system Punti Pivot

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #9994 quote
    MaxMax
    Participant
    Average

    Qui di seguito una domanda inviata a ProRealTime :

    INGRESSO LONG:
    se la chiusura > apertura e
    minimo dell’ultima barra > minimo precedente e
    massimo dell’ultima barra > massimo precedente e
    chiusura > chiusura precedente e
    chiusura > media mobile semplice a 20 periodi
    chiusura ultima barra > pivot point + atr(5)
    fine condizione long

    INGRESSO SHORT:
    se la chiusura < apertura e
    minimo < minimo precedente e
    massimo < massimo precedente e
    chiusura < media mobile a 20 periodi e
    chiusura dell’ultima barra < pivot point – atr(5) periodi
    fine condizione short

    Uscita da posizione long: vendiamo in trailing stop sul massimo più alto delle ultime 2 candele,
    Uscita da posizione short: compriamo in trailing stop sul minimo più basso delle ultime 2 candele,

    E un esempio di risposta :

    DEFPARAM CumulateOrders = False
    
    MM20 = Average[20](close)
    ATR5 = AverageTrueRange[5](close)
    P = (DHIGH(1) + DLOW(1) + DCLOSE(1)) / 3
    
    c1 = close > open
    c2 = low > low[1]
    c3 = high > high[1]
    c4 = close > close[1]
    c5 = close > MM20
    c6 = close > P + ATR5
    
    cLong=c1 AND c2 AND c3 AND c4 AND c5 AND c6
    
    IF cLong THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    c7 = close < open
    c8 = low < low[1]
    c9 = high < high[1]
    c10 = close < close[1]
    c11 = close < MM20
    c12 = close < P - ATR5
    
    cShort=c7 AND c8 AND c9 AND c10 AND c11 AND c12
    
    IF cShort THEN
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
    
    IF LongOnMarket THEN
    SELL AT highest[2](high) LIMIT
    ENDIF
    
    IF ShortOnMarket THEN
    EXITSHORT AT lowest[2](low) LIMIT
    ENDIF
Viewing 1 post (of 1 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

Trading system Punti Pivot


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Max @max Participant
Summary

This topic contains 1 voice and has 0 replies.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 06/29/2016
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...