uscita da trade

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #174068 quote
    max1775max1775
    Participant
    Average

    buonasera ho questo trading sistem vorrei aggiungere la condizione di uscita dal trade quando il prezzo chiude sotto il supertrend settato a 3.5 al moltiplicatore e 20 periodi

    DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate
    
    indicator1 = CALL "VolPri"[20,1,1](close)
    indicator2 = CALL "VolPri"[200,10,1](close)
    
    c1 = (indicator1 CROSSES OVER 10)
    c3 = (indicator2 >10)
    IF c1 AND c3 THEN
    BUY 1000 CASH AT MARKET
    ENDIF
    
    c2 = (indicator1 CROSSES UNDER -15)
    IF c2 THEN
    SELL AT MARKET
    ENDIF
    
    // Stop e target
    //SET STOP %TRAILING 20
    #174069 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Alla linea 11 metti questa riga:

    st = close < Supertrend[3.5,20]

    e aggiungi OR st alle condizioni della linea 13.

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

uscita da trade


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
max1775 @max1775 Participant
Summary

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

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