Money management coding help please

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #9462 quote
    K12ANK12AN
    Participant
    Junior

    Hello all

    I have an idea for a money management plan, but am not able to code it.

    Would appreciate some assistance :). ATR=AverageTrueRange[14]

    1. I take a position on a daily bar – 2 lots Long (or Short)
    2. I place a TP for 1 lot at ATR*0.25  and and the other at ATR *0.8
    3. I put a SL for 2 lots at AT4*0.25
    4. Close all open positions/cease all trading at 18:00

    The beauty of this is that your loss is limited, and if first TP is triggered we can allow the other 1 lot to run for the rest of the session (unless it is also triggered) and the worse case scenario would be a breakeven in PL if the SL is triggered.

    QUESTION – If I trigger the first TP, would the SL automatically go to down to 1?

    Hope I’ve explained it clearing enough – happy to clarify if needed.

    #9468 quote
    AdolfoAdolfo
    Participant
    Senior

    Hi K12AN,

    ProOrder doesn’t let you exit parcial positions, I suggest you to start 2 systems with 1 contract and different profits.

    ANSWER – In 2nd case, if price reach to ATR*0.25 and should run to ATR*0.8, you can move stoploss to breakeven after first target is reached, and let the trade run.

    Best Regards!

    Nicolas thanked this post
    #9978 quote
    absent1980absent1980
    Participant
    Average

    HI there,

    I need some help with coding money management, mainly position size. How to code position size for spreadbetting at ceratain % of available equity/ATR

    Thanks.

    #9985 quote
    NicolasNicolas
    Keymaster
    Legend

    Adolfo has wrote a nice code snippet for money management position size calculation, here in the blog :

    http://www.prorealcode.com/blog/learning/money-management-prorealtime-code/

    #9988 quote
    absent1980absent1980
    Participant
    Average

    Thank you, Nicholas. Nice code, already backtesting.

Viewing 5 posts - 1 through 5 (of 5 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 coding help please


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
K12AN @k12an Participant
Summary

This topic contains 4 replies,
has 4 voices, and was last updated by absent1980absent1980
10 years, 3 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 06/16/2016
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...