Money management and position accumulation

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #65273 quote
    riverview
    Participant
    New

    Hello,

    I have been writing a strategy to back-test today and am getting a little stuck around the money management side with the incorrect number of shares opening for example using a 10,000 balance, 2% risk and an ATR of .912 I am expecting (RISK/ATR STOP LOSS)    100/1.824 = 548 shares. When backtesting though the position size taken is much larger.

    Money Management

    From a money management view I am trying to size positions based on a percentage of my account:

    Example Code:

    //Parameters
    
    RISK = 2
    EQUITY = CAPITAL + STRATEGYPROFIT
    RISKCALC = (EQUITY/100)*RISK
    ATR = AverageTrueRange[14](close)
    ATRSL = (ATR*2)
    
    // Oreder Management - Shares to Purchase
    //POSITIONSIZE= RISKCALC/ATRSL
    
    // Open Long Position
    
    IF NOT LongOnMarket AND c1 THEN
    BUY POSITIONSIZE SHARES AT MARKET
    ENDIF

    Position Accumulation 

    I am looking to add to a position where a condition has been met, marking a Flag to signify if the original position has already been added to. It currently does not look to add to an existing position.

    // Parameters
    
    FLAG1 = 0
    
    IF LONGONMARKET AND c1 AND OMFLAG1 <> 1 THEN
    BUY POSITIONSIZE SHARES AT MARKET
    OMFLAG1 = 1
    ENDIF

    Any help would be greatly appreciated.

    Thank you

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.

Money management and position accumulation


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
riverview @riverview Participant
Summary

This topic contains 1 voice and has 0 replies.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/14/2018
Status: Active
Attachments: No files
Logo Logo
Loading...