Trailing profit attivo dopo 300 punti di guadagno e stop profit 50 punti

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #158410 quote
    domenicoprorealcodedomenicoprorealcode
    Participant
    Junior

    Buona sera, vorrei dire al sistema di inserire un  trailing profit che si attiverà dopo 300 punti di guadagno e spostare lo stop profit ogni 50 punti. allego al sistema che vorrei utilizzarlo.

    DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate
    // Il sistema cancellerà tutti gli ordini in attesa e chiuderà tutte le posizioni a 0:00. Dopo l’orario “Flat Before” non saranno piazzati nuovi ordini o posizioni.
    DEFPARAM FLATBEFORE = 010000
    // Cancellare tutti gli ordini in attesa e chiudere tutte le posizioni all’orario “Flat After”
    DEFPARAM FLATAFTER = 235500
    Otd = (Barindex – TradeIndex(1) > IntradayBarIndex)
    // giorni tradabili specifici della settimana DAL LUNEDI AL VENERDI
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
    
    indicator1 = SuperTrend[4,10]
    c1 = (close[1] CROSSES OVER indicator1)
    indicator2 = ExponentialAverage[21](close)
    c2 = (close[1] > indicator2)
    c3 = (high[1] > open [2])
    
    IF c1 AND c2 AND c3 AND not daysForbiddenEntry AND Otd THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    // Stop e target
    SET STOP pLOSS 200
    SET TARGET pPROFIT 300

    Grazie mille a chi mi vorrà aiutare

    #158417 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Puoi aggiungere questo codice (dalla linea 17 alla linea 56) alla fine del tuo e cambiare i soli due valori numerici, alla riga 19 scrivi 300 ed alla riga 20 scrivi 50:

    https://www.prorealcode.com/blog/trading/complete-trailing-stop-code-function/

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

Trailing profit attivo dopo 300 punti di guadagno e stop profit 50 punti


ProOrder: Trading Automatico & Backtesting

New Reply
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzirobertogozzi
5 years, 8 months ago.

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