Entrare a mercato calcolando RR

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #249694 quote
    LevraLevra
    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álezIván González
    Moderator
    Legend

    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.
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

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álezIván González
1 year, 1 month ago.

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