Support Board
Date/Time: Wed, 15 Jan 2025 00:05:17 +0000
OpenProfitLoss
View Count: 1050
[2017-05-29 20:37:25] |
Pinger - Posts: 33 |
Hi I've noticed that if I set my Chart Settings "Profit/Loss Format" to Ticks, PositionData.OpenProfitLoss accurately reports the number of ticks of profit/loss for XXXJPY currency pairs (as I would expect). But this is not the case for XXXUSD currency pairs, these are factored by 0.01, e.g. a profit of 21T as displayed on the chart is reported as 0.21 by PositionData.OpenProfitLoss. Is this something to do with the "Currency Value Per Tick" setting of the chart, which is 1 for XXXJPY charts and 0.01 for XXXUSD charts. I want to do some calculations based on the number of ticks profit/loss irrespective of currency pair. So, should I factor PositionData.OpenProfitLoss by an sc.variable to do this consistently, and if so which variable? Kind regards |
[2017-05-29 20:44:21] |
Sierra Chart Engineering - Posts: 104368 |
For what specific Forex symbol do you have a Currency Value Per Tick of .01? That does not make any sense. That is wrong. PositionData.OpenProfitLoss is always a currency value as is documented: Automated Trading From an Advanced Custom Study: s_SCPositionData Structure Members Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2017-05-29 20:44:56
|
[2017-05-29 21:01:02] |
Pinger - Posts: 33 |
AUDUSD, GBPUSD and EURUSD, as displayed in "Chart Settings -> Advanced Setting 2". I have not changed these settings. If it matters, I solely use LMAX Exchange. Kind regards |
[2017-05-29 21:18:14] |
Sierra Chart Engineering - Posts: 104368 |
OK we see. In the case of LMAX, those values are correct.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2017-05-29 21:34:48] |
Pinger - Posts: 33 |
So, I can't access the profit/loss in Ticks, as displayed on a chart with the Profit/Loss Format in Ticks, directly through a variable?
|
[2017-05-29 21:48:36] |
Sierra Chart Engineering - Posts: 104368 |
No. You would have to do the calculation. This is how you would do it: PositionData.OpenProfitLoss/ sc.CurrencyValuePerTick; Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
To post a message in this thread, you need to log in with your Sierra Chart account: