Entrare a mercato calcolando RR

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #249694 quote
    Levra
    Participant
    New

    Buongiorno, vorrei sapere se è possibile effettuare ingressi a mercato calcolando il rapporto R/R in base a un numero di pips.
    Ad esempio: desidero entrare con una posizione che rischi l’1% del mio capitale su uno stop di 5 pips, ed uscire quando il prezzo raggiunge il X%.

    #249847 quote
    Iván González
    Moderator
    Master

    ecco!

    DEFPARAM CumulateOrders = False
    capital = 10000
    riskpercent = 1
    stoppoints = 5
    targetR = 2
    targetpoints = targetR * stoppoints
    
    equity=capital+strategyprofit
    
    moneyrisk = equity * riskpercent / 100
    riskpercontract = stoppoints * POINTVALUE
    qty = FLOOR(moneyrisk / riskpercontract)
    qty = MAX(1, qty)
    
    // --- Entry conditions (replace with your real signals)
    conditionlong  = close > open
    conditionshort = close < open
    
    IF NOT OnMarket THEN
       IF conditionlong THEN
          BUY qty CONTRACTS AT MARKET
       ENDIF
       IF conditionshort THEN
          SELLSHORT qty CONTRACTS AT MARKET
       ENDIF
    ENDIF
    
    set stop ploss stoppoints
    set target pprofit targetpoints
    
    robertogozzi and effegi thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Entrare a mercato calcolando RR


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Levra @kekkos Participant
Summary

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

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 08/13/2025
Status: Active
Attachments: No files
Logo Logo
Loading...