Stop loss/Target profit

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #189818 quote
    be fabe fa
    Participant
    New

    Bonjour,

    Je suis tombé sur une vidéo de trendfrance ou il explique différentes choses via des backtests. Il utilise l’ATR pour gérer ses stop et ses profits voici le code :

    Defparam cumulateorders = false
    capital=10000
    risque=0.5
    exitstrategy=0
    profitfactor=6
    stopfactor=1.5
    
    if not longonmarket then
    positionsize=round(((capital+STRATEGYPROFIT)*(risque/100))/(stopfactor*averagetruerange[20]))
    BUY positionsize share AT MARKET
    set stop loss stopfactor*averagetruerange[20]
    if exitstrategy=0 then
    set target profit profitfactor*averagetruerange[20]
    ENDIF
    //flag=0
    ENDIF

    Je ne comprends pas 2 choses :

    positionsize=round(((capital+STRATEGYPROFIT)*(risque/100))/(stopfactor*averagetruerange[20])) , pourquoi diviser par le stop*l’atr ?

    target profit profitfactor*averagetruerange[20] ; Si je regarde les moments ou le code vends, ce n’est jamais 6*l’atr et pareil pour le stop. Voir l’exemple en PJ.

    Si quelqu’un peut m’éclairer car ce serait sympa.

    Merci

    Capture-1.jpg Capture-1.jpg
Viewing 1 post (of 1 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

Stop loss/Target profit


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
be fa @be_fa Participant
Summary

This topic contains 1 voice and has 0 replies.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 03/11/2022
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...