Instrument Set to 6 Decimals, Only 4 Decimals in Signal / Function

Questions about MultiCharts and user contributed studies.
Metzenovich
Posts: 15
Joined: 07 Sep 2021

Instrument Set to 6 Decimals, Only 4 Decimals in Signal / Function

Postby Metzenovich » 26 Oct 2021

Hi,

I have an IQFeed EURUSD instrument added to a 5 minute chart. The instrument was set to 4 decimal places (I think the default).

When I try to print out the high with :7:7 I was still getting 4 decimal places.

Code: Select all

if DateToString(DateTime) = "10/18/2021" then begin Print(DateToString(DateTime), " ", high:7:7); end;
Then I noticed there were only 4 decimals on the chart. So I went to Format Instrument --> Scaling and set it to 6 decimal places. After pressing Ctrl+R on the chart and reloading the data it then showed 6 decimal places on the chart.

However, even after recompiling the code above still only outputs 4 decimal places:

Code: Select all

10/18/2021 1.1655000 10/18/2021 1.1654000 10/18/2021 1.1654000 10/18/2021 1.1653000 10/18/2021 1.1652000
How can I get access to 6 decimal places from within the Signal / Indicator / Function? I thought this was working in the past, but even after rebooting, recompiling, Ctrl+R I can't get it to work now.

Any suggestions?
Attachments
Chart.png
(84.97 KiB) Not downloaded yet
Settings.png
(37.65 KiB) Not downloaded yet

Metzenovich
Posts: 15
Joined: 07 Sep 2021

Re: Instrument Set to 6 Decimals, Only 4 Decimals in Signal / Function

Postby Metzenovich » 27 Oct 2021

As a follow-up, is there a way to globally set 6 decimal places as the default? As you can see in the attached image 6 decimal places is available, it's just not reaching the Indicator / Signal level.

4 decimal / 1 pip resolution isn't enough for any kind of calculations. I want 6 decimal places (or at a minimum 5) everywhere, even it if means a performance hit.

It would be nice to be able to specify 6 decimal places as the default globally somewhere. Preferences --> Data seems to be the natural place for it.

Thanks
Attachments
Chart2.png
(86.8 KiB) Not downloaded yet

Metzenovich
Posts: 15
Joined: 07 Sep 2021

Re: Instrument Set to 6 Decimals, Only 4 Decimals in Signal / Function

Postby Metzenovich » 27 Oct 2021

OK, I think I've figured this out sufficiently.

5 digits of resolution are coming from IQFeed for forex data (the 6 digits I was seeing on the chart was coming from the position of the mouse cursor on the chart or calculated values like EMA, not the underlying data).

In Quote Manager I found I could go under "Exchanges & ECNs" and set the Price Scale higher for that entire instrument class.

I was then able to see 5 digits of resolution when printing out the high.

Metzenovich
Posts: 15
Joined: 07 Sep 2021

Re: Instrument Set to 6 Decimals, Only 4 Decimals in Signal / Function

Postby Metzenovich » 27 Oct 2021

Well, this approach (changing the Price Scale to increase the digits available in Functions and Signals) has the unfortunate side affect of changing the definition of what a pip is for the whole instrument class.

So now now instead of this being a 1 pip change (4th digit):
1.1619
1.1620

This is now a 1 pip change (6th digit):
1.161950
1.161953

So it essentially breaks functions like SetTrailingStop_pt.

Who knows what the other ramifications might be.

So this isn't solved after all.

User avatar
Svetlana MultiCharts
Posts: 645
Joined: 19 Oct 2017
Has thanked: 3 times
Been thanked: 163 times

Re: Instrument Set to 6 Decimals, Only 4 Decimals in Signal / Function

Postby Svetlana MultiCharts » 28 Oct 2021

Hello Metzenovich,

IQfeed does not provide symbol settings through API. So, you need to configure the Price Scale and Min Movement after adding a symbol to the database.
For example,
EURUSD.FXCM
PriceScale = 1/100000
Minmove =1
As for the Big Point Value – the users need to contact their broker for the correct value, as different brokers have different lot size.
If you changed the Price Scale from 1/10000 to 1/100000 (i.e. divided by 10), you need to multiply the Big Point Value by 10, to maintain the value of the smallest change in price on the chart.


Return to “MultiCharts”