Get the value Gains & losses curve ?
Forums › ProRealTime English forum › ProOrder support › Get the value Gains & losses curve ?
- This topic has 12 replies, 6 voices, and was last updated 1 year ago by Nicolas.
-
-
04/02/2023 at 10:18 AM #212653
hi,
how to get the value of Gains & losses curve c when the trade is still open ?
04/02/2023 at 11:32 AM #21265604/02/2023 at 12:08 PM #212659tks you @GraHal,
So I tried it and it’s like working nice, so this means :
– PositionPerf = 0 ==> the position is still flat ?
– PositionPerf = 0,2 ==> mean the position are +20% grain ?
– PositionPerf = 1,4 ==> mean the position are +140% grain ?1234// Achète si le trade précédent a fait au moins 20% de gainsIF NOT ONMARKET AND PositionPerf(1) > 0.2 THENBUY 1000 CASH AT MARKETENDIF04/02/2023 at 12:30 PM #212661PositionPerf = 0,2 ==> mean the position are +20% grain ?
20% gain of what? 🙂
PositionPerf = 0.01 means PositionPerf is 1% as defined here …
04/02/2023 at 2:53 PM #212665“PositionPerf = 0,2 ==> mean the position are +20% grain ?” Yes.
If you want the percentage of the trade still open you have to multiply *100 positionPerf:
graph positionPerf*100
1 user thanked author for this post.
04/02/2023 at 3:19 PM #21266620% gain of what? 🙂
0,2 it’s mean +20% from the price entry of the last position, and I do some math and the PRT software use the Close price to calculate this value, let give an other exemple and tell me if I’m wrong,
for exemple I have an entry price at 118 and if my PositionPerf[0] now it’s at 0,053 so it’s mean the close prie now is normaly at 124,
Entry Price = 118
PositionPerf = 0,053
Entry Price x PositionPerf x 100 = 118 x 0,053 x 100 = 124,25 = Close[0]correct me pls if I’m wrong,
the idea is to get price of equity even we are in position, not just after close the trade ?
04/02/2023 at 6:12 PM #212667If you need to know the PositionPerf while a candle is forming, then you have to resort to MTF and use a a smaller TF.
1 user thanked author for this post.
04/02/2023 at 7:44 PM #212673correct me pls if I’m wrong,
The link below defines PositionPerf (which isn’t how think it works! 🙂 )
04/02/2023 at 10:28 PM #21268704/04/2023 at 11:01 AM #212780If you need to know the PositionPerf while a candle is forming, then you have to resort to MTF and use a a smaller TF.
Thank you for your answer, I understand the idea of going down to smaller units of time, however what is the smallest unit of time that can be used, is it possible for example units in Tick or does it depend on the Stocks processed,
If you have a link you can share from the forum it would be appreciated
04/04/2023 at 12:47 PM #212791what is the smallest unit of time that can be used
I’ve never used < 1 second … never found the need?
I’ve never got a strategy to work consistently at < 5 sec TF.
1 user thanked author for this post.
04/04/2023 at 10:59 PM #212811Ticks cannot be used, use 1-second TF.
1 user thanked author for this post.
04/05/2023 at 4:07 PM #212875Calculation of POSITIONPERF, topic with explanation: https://www.prorealcode.com/topic/i-dont-understand-exactly-the-value-of-positionperf/
Also in order to get the current floating profit of orders, you can use this code snippet:
12//floating profitfloatingprofit = (((close-positionprice)*pointvalue)*countofposition)/pipsize //actual trade gainsA new instruction with the current STRATEGYPROFIT (strategyprofit + floating) will also be added with a lot of other new ones.
1 user thanked author for this post.
-
AuthorPosts