PRT PositionPerf

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #101636 quote
    solar
    Participant
    Senior

    Hi everyone, I refer to the instruction “PositionPerf(n)” in PRT.

    Here is what I found in PRT documentation:

    “The instruction POSITIONPERF(n) returns: The performance (ratio gain/cost of the position) of the n-th last position closed if n>0 (not including brokerage fees) The performance (ratio gains/cost of the position) of the currently open position if n=0 (not including brokerage fees)”

    The problem lies in the description “not including brokerage fees”. Let’s say I open a position and close it immediately at the exactly same median price level, the trade is actually a loss due to presence of spread. (I am trading on IG CFD FYI) As brokerage fees/ spread is not taken into account, am I correct that PositionPerf (1) would return 0? (idk if spread is counted as brokerage fees, please correct me if i am wrong).

    The reason why i am asking this question is I want to increase my bet size only after a loss resulting from net negative difference of the median price level i opened and closed my position. (i.e. spreads/brokerage not taken into account).

    Cheers

    #101646 quote
    GraHal
    Participant
    Master

    positionperf does not take spreads/brokerage fees into account.

    #101650 quote
    solar
    Participant
    Senior

    Then it confuses me.

    so it only considers the price on chart(median price) but not my actual trade price right?

    #101651 quote
    Vonasi
    Moderator
    Master

    POSITIONPERF will be calculated using the POSITIONPRICE so based on the opening price of your trade that you received from the broker. What it cannot put in the calculation is the price that you could close the trade at as you cannot know what the closing price is with spread and slippage at any moment in time until you have actually closed the trade and found out what price the broker gave you. So it is POSITIONPRICE compared to current mid spread price.

    The above is an assumption rather than a proven theory!

    GraHal thanked this post
    #101661 quote
    solar
    Participant
    Senior

    Thanks Vonasio

    • Logically thinking, after a position is closed, PRT is able to obtain the close and open price of a position from the broker. (With spread taken into account ) theoretically, POSITIONPRRF(1) will return a negative value if I open and close the contract at 10000 mid spread price .
    #101693 quote
    Nicolas
    Keymaster
    Master

    I know I have coded the positionperf manually, and the code must be somewhere in the forums.. I’ll try to find it.

    solar thanked this post
    #101694 quote
    Nicolas
    Keymaster
    Master

    But if I remember correctly, POSITIONPERF is just the price variation between the opened candle price and the most recent one. It doesn’t include spread and/or commissions.

    #101697 quote
    solar
    Participant
    Senior

    I think I have to make sure it’s meaning as it affects my position after losses.

    It is not desirable to increase bet on false “loss”

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.

PRT PositionPerf


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
solar @fatlung Participant
Summary

This topic contains 7 replies,
has 4 voices, and was last updated by solar
6 years, 8 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 06/29/2019
Status: Active
Attachments: No files
Logo Logo
Loading...