Money management with ATR based stop

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #51664 quote
    victormorkvictormork
    Participant
    Veteran

    What can I do to make a percentage based mgmt work with an ATR based stop distance? The code is not working when I change the StopLoss value from a fixed value to an ATR based distance.

    Capital = 100000
    Risk = 0.01
    StopLoss = (atr * slATRmultiple)*pointsize
     
    equity = Capital + StrategyProfit
    maxrisk = round(equity*Risk)
    PositionSize = abs(round((maxrisk/StopLoss)/PointValue)*pointsize)
    #51669 quote
    victormorkvictormork
    Participant
    Veteran

    Nevermind. I got it now.

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

Money management with ATR based stop


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
victormork @victormork Participant
Summary

This topic contains 1 reply,
has 1 voice, and was last updated by victormorkvictormork
8 years, 10 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 11/06/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...