previous position pips gained or lost

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #39380 quote
    verygrubby
    Participant
    Master

    Hello all,

    I know about POSITIONPERF, which gives the % performance of the Nth last position, but is there a way of telling how many pips the previous position gained/lost?

    There is TRADEPRICE, which I think is the opening of the previous order, but I want to know the realised result in pips too…

    Thanks,

    Geoff

    #39389 quote
    GraHal
    Participant
    Master

    Below or something similar? 🙂

    Abs(Tradeprice[0]-Tradeprice[1])*pipsize
    #39427 quote
    verygrubby
    Participant
    Master

    …ah, I thought TRADEPRICE was just the opening level of a position… so TRADEPRICE can be opening or closing?

     

    so your suggestion would be the last closing – the last opening?

    #39439 quote
    GraHal
    Participant
    Master

    No you are correct … I wasn’t thinking straight! 🙂

    Abs(Open[1]-Close[1])*pipsize
    #39448 quote
    verygrubby
    Participant
    Master

    …and that will give the open & close of the previous bars… not the previous executed position…?

     

    tricky isn’t it!

    #39460 quote
    GraHal
    Participant
    Master

    I think you know the answer really! 🙂

    ‘Reverse engineer’ Positionperf to get points change of the last trade and then multiply by pipsize for that instrument.

    I was getting the formula for Positionperf and my PRT has frozen on that screen. 🙁   But anyway it is here … gain/cost.

    https://www.prorealcode.com/documentation/positionperf/

    Does this work?

    PipsLastPos = (Positionperf[1]*TradePrice[1]/Gain)*pipsize
    #39464 quote
    GraHal
    Participant
    Master

    Nearly … you’d need to multiply TradePrice by Contract value to get Cost.

    Example for a price at 1.2400

    1
    PipsLastPos = (0.1*(1.2400*10000)/20)*1

    More later maybe, brain is hurting 🙂 and my granddaughter wants to watch Peppa Pig! 🙂 🙂

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

previous position pips gained or lost


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
verygrubby @verygrubby Participant
Summary

This topic contains 6 replies,
has 2 voices, and was last updated by GraHal
8 years, 8 months ago.

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