Aiuto per strategia con Supertrend

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

    buongiorno, non ho pratica nello scrivere le strategie, ma se qualcuno fosse gentile da aiutarmi vorrei realizzare la seguente:

    Acquisto: il Supertrend da orizzontale che era nelle candele precendenti diventa con pendenza positiva (ossia maggiore di quella precedente).

    Chiusura operazione: il Supertrend diventa con pendenza negativa (ossia minore della precedente).

    Grazie infinite, questa ovviamente è solo il motore della strategia, a cui poi cercherò di aggiungere condizioni supplementeari.

    Lorenzo

    #243216 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Ecco cosa hai:

    DEFPARAM CumulateOrders=false
    ST = SuperTrend[3,10]
    flat=ST=ST[1]
    up=ST>ST[1]
    dn=ST<ST[1]
    
    IF not onmarket and up and flat[1] THEN
    BUY 1 contract AT MARKET
    ENDIF
    
    IF onmarket and dn THEN
    SELL AT MARKET
    ENDIF
    
    graphonprice ST coloured("blue")
    robertogozzi thanked this post
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

Aiuto per strategia con Supertrend


Supporto Piattaforma: Grafici, Dati e Broker

New Reply
Author
author-avatar
discomusic @discomusic Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Iván GonzálezIván González
1 year, 7 months ago.

Topic Details
Forum: Supporto Piattaforma: Grafici, Dati e Broker
Language: Italian
Started: 01/29/2025
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...