tick resolution causing Floating point error [SOLVED]
Re: tick resolution causing Floating point error
if I use tick resolution of 500 then i get a floating point. If I use tick resolution of 501 then it works?
I am not even sure how I start to debug this? what am I missing?
I am not even sure how I start to debug this? what am I missing?
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: tick resolution causing Floating point error
Is that floating point error triggered by MultiCharts itself, or by one of the scripts you have on the chart?
Re: tick resolution causing Floating point error
The scripts error and status switches off. MC scripts still work though. I threw on some to make sureIs that floating point error triggered by MultiCharts itself, or by one of the scripts you have on the chart?
- TJ
- Posts: 7746
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2225 times
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: tick resolution causing Floating point error
I don't know the 'VWAP Array 11' indicator, but the floating point error is caused by this indicator. And not by the chart's resolution.
Since it looks to be a custom indicator, did you perhaps code it to require a minimum resolution of 500 in its calculations?
Since it looks to be a custom indicator, did you perhaps code it to require a minimum resolution of 500 in its calculations?
Re: tick resolution causing Floating point error
Yes, the indicator is custom. what could cause a floating point while using volume on very small ticks?I don't know the 'VWAP Array 11' indicator, but the floating point error is caused by this indicator. And not by the chart's resolution.
Since it looks to be a custom indicator, did you perhaps code it to require a minimum resolution of 500 in its calculations?
is there such a thing as a tick with 0 volume?
I am not aware of any resolution requirements in my indicator.
- TJ
- Posts: 7746
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2225 times
Re: tick resolution causing Floating point error
First step:
go through the code and find all the division operations.
go through the code and find all the division operations.
Re: tick resolution causing Floating point error
This was my first thought but I was pretty confused as to why a >500 tick resolution doesn't give me a floating point error and <=500 does?First step:
go through the code and find all the division operations.
is there something different about <=500 resolution?
Re: tick resolution causing Floating point error [SOLVED]
I found the 0, haven't figured out what mistake I made that was just getting covered up by larger resolutions but there is nothing special about the problem.First step:
go through the code and find all the division operations.
solved. thanks
Re: tick resolution causing Floating point error
quick question though?First step:
go through the code and find all the division operations.
Rec_V = Rec_V + V;
sometimes I get a zero on this..
Rec_V - Rec_V[1]
how could a += of volume ever be equal to its previous count? Is there something rounding off?
- TJ
- Posts: 7746
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2225 times
Re: tick resolution causing Floating point error
For anyone that finds this in the future with a similar problem....
My mistake was not noticing that MC uses only UpVolume when you [ "Build Volume on" - Trade Volume ] in the instrument settings.
This leaves off down volume and leaves some bars with 0 volume.
If someone knows why that is the case then that would be illuminating to me. I am sure there is a good reason, I just don't know it.
Use the code
This returns the total volume instead of the UpVolume
My mistake was not noticing that MC uses only UpVolume when you [ "Build Volume on" - Trade Volume ] in the instrument settings.
This leaves off down volume and leaves some bars with 0 volume.
If someone knows why that is the case then that would be illuminating to me. I am sure there is a good reason, I just don't know it.
Use the code
Code: Select all
ticks
Last edited by joebone on 25 Jun 2020, edited 1 time in total.
- TJ
- Posts: 7746
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2225 times
Re: tick resolution causing Floating point error
This is an EasyLanguage legacy problem . . .
You see, in EasyLanguage, VOLUME returns ticks,
and TICKS returns volume.
If you had used the keyword TICKS, you would not have encountered the problem.
You see, in EasyLanguage, VOLUME returns ticks,
and TICKS returns volume.
If you had used the keyword TICKS, you would not have encountered the problem.
Code: Select all
Rec_V = Rec_V + TICKS;
- Vlada MultiCharts
- Posts: 294
- Joined: 22 Apr 2020
- Has thanked: 8 times
- Been thanked: 76 times
Re: tick resolution causing Floating point error
Hello joebone,
We can recommend you to make sure that you have the correct settings for the symbol's Min. Movement and Price Scale in QuoteManager ->Tools -> Symol Dictionary -> Select symbol ->Edit.
If the issue persists, please send us:
1) Your workspace file (File -> Save Workspace).
2) Exported data for the symbol in qmd
3) Export of your signal/indicator
Also, please describe the steps performed that lead to the issue so that we could reproduce the issue on our end.
We can recommend you to make sure that you have the correct settings for the symbol's Min. Movement and Price Scale in QuoteManager ->Tools -> Symol Dictionary -> Select symbol ->Edit.
If the issue persists, please send us:
1) Your workspace file (File -> Save Workspace).
2) Exported data for the symbol in qmd
3) Export of your signal/indicator
Also, please describe the steps performed that lead to the issue so that we could reproduce the issue on our end.