is there an easy way to obtain by code the price variation percentual  [SOLVED]

Questions about MultiCharts and user contributed studies.
dvdkite
Posts: 65
Joined: 16 May 2018
Has thanked: 10 times
Been thanked: 1 time

is there an easy way to obtain by code the price variation percentual

Postby dvdkite » 05 Aug 2020

Hello everyone,

is there an easy way to obtain by code the price variation percentual ( typically displayed a the top of the chart automatically) ? (I didn't find any keyword for that)
It's not so easy to manually calculate it as sometimes it doesn't take the close of the previous day session.. but it use the close of the cash session.... for example with the vstoxx futures quoted at eurex

I need the value in the circle ..
percent.png
(142.48 KiB) Not downloaded yet

User avatar
Vlada MultiCharts
Posts: 293
Joined: 22 Apr 2020
Has thanked: 8 times
Been thanked: 76 times

Re: is there an easy way to obtain by code the price variation percentual

Postby Vlada MultiCharts » 06 Aug 2020

Hello dvdkite,

You can use this code:
100 - ((prevclose * 100)/close)

Please check the attached screenshot.
Attachments
Price Variation Percentual_MultiCharts Support.png
(121.88 KiB) Not downloaded yet

dvdkite
Posts: 65
Joined: 16 May 2018
Has thanked: 10 times
Been thanked: 1 time

Re: is there an easy way to obtain by code the price variation percentual  [SOLVED]

Postby dvdkite » 11 Aug 2020

Hello dvdkite,

You can use this code:
100 - ((prevclose * 100)/close)

Please check the attached screenshot.
Thank you. It seems to work perfectly!


Return to “MultiCharts”