Hello
I got problem with my studies that use Global variables in MC7. I got a message like "Cant find "GV_SetnamedBool in dll"
All the code compile and functions did appeared in my function list
Any hints?
Martin
MC 7 and Global variables?
Re: MC 7 and Global variables?
arjfca,
do you have the latest GV (version 2.2) installed ? (viewtopic.php?t=2483 ).
The problem is that with every update or new install MC overrides the GV dll with an older one (version 2).
@ Stan,
could that be fixed in one of the next versions.
do you have the latest GV (version 2.2) installed ? (viewtopic.php?t=2483 ).
The problem is that with every update or new install MC overrides the GV dll with an older one (version 2).
@ Stan,
could that be fixed in one of the next versions.
Re: MC 7 and Global variables?
This code does not work in MC 7
I did install GV version 2.2GVGetString(3)) does not returned any value
Martin
I did install GV version 2.2
Code: Select all
variables:
MyBigString( "" ) ;
If barnumber = 100 then
begin
Print ("My GV string is: ");
MyBigString = "Four score and seven years ago our fathers brought forth on this " + "continent, a new nation, conceived in Liberty, and dedicated to the " + "proposition that all men are created equal." ;
value1 = GVSetString( 3, MyBigString ) ;
Print( GVGetString( 3 ) ) ;
end;
Martin
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: MC 7 and Global variables?
This will happen only if barnumber = 100 in real time.This code does not work in MC 7
I did install GV version 2.2GVGetString(3)) does not returned any valueCode: Select all
variables:
MyBigString( "" ) ;
If barnumber = 100 then
begin
Print ("My GV string is: ");
MyBigString = "Four score and seven years ago our fathers brought forth on this " + "continent, a new nation, conceived in Liberty, and dedicated to the " + "proposition that all men are created equal." ;
value1 = GVSetString( 3, MyBigString ) ;
Print( GVGetString( 3 ) ) ;
end;
Martin
Is that your intention?
- Dave Masalov
- Posts: 1712
- Joined: 16 Apr 2010
- Has thanked: 51 times
- Been thanked: 489 times
Re: MC 7 and Global variables?
Correct. GVSetString returns -1. The condition inside is: if LastBarOnChart then.This will happen only if barnumber = 100 in real time.
Is that your intention?
Thank you for your suggestion. It will be done in the next release.@ Stan,
could that be fixed in one of the next versions.
Re: MC 7 and Global variables?
Thanks TJThis will happen only if barnumber = 100 in real time.This code does not work in MC 7
I did install GV version 2.2GVGetString(3)) does not returned any valueCode: Select all
variables:
MyBigString( "" ) ;
If barnumber = 100 then
begin
Print ("My GV string is: ");
MyBigString = "Four score and seven years ago our fathers brought forth on this " + "continent, a new nation, conceived in Liberty, and dedicated to the " + "proposition that all men are created equal." ;
value1 = GVSetString( 3, MyBigString ) ;
Print( GVGetString( 3 ) ) ;
end;
Martin
Is that your intention?
I'm just testing Global Variables with MC 7. This code as no other purpose
Martin
Re: MC 7 and Global variables?
Hello DaveCorrect. GVSetString returns -1. The condition inside is: if LastBarOnChart then.This will happen only if barnumber = 100 in real time.
Is that your intention?
Thank you for your suggestion. It will be done in the next release.@ Stan,
could that be fixed in one of the next versions.
Should I understand that this is a confirmed error and problem will be resolved by the next release?
Martin
- Dave Masalov
- Posts: 1712
- Joined: 16 Apr 2010
- Has thanked: 51 times
- Been thanked: 489 times
Re: MC 7 and Global variables?
Martin,Should I understand that this is a confirmed error and problem will be resolved by the next release?
We will add version 2.2 of Global Variables dll to the next version. Regarding the issue that you are facing, GVSetString returns -1. The condition inside is: 'if LastBarOnChart then' which means that it will work only in real-time (it will happen only if barnumber = 100 in real time). If you want your code to work in real-time, you should change the code of GVSetString function, i.e. remove 'if LastBarOnChart then' condition.
Re: MC 7 and Global variables?
Hi,
Can I get a confirmation that GV 2.2 does in fact work in Win7. At least the Named GVs. I sure hope so!
Thanks
John
Regarding Martin's
Regarding Boolean and numbered GVs, I personally have never used anything but the named (integers, floats and strings). For a switch I just use the Integer 0 or 1 so that if I decide to add more variants I can just go to 2,3,4 etc (you know, the maybe switch . The documentation says there are 3000 named (as opposed to numbered) variable locations of each data type. I am up to 982 Integers, 858 floats and 266 strings. So it appears I have only used 1/3 of the integer capacity. So what I am saying is you can create a very large number of integer flags and probably never run out. Right at the start when I read 3,000 I figured there is no point in using numbered because I probably will never need that many. However maybe someone is using GVs differently than I am so each to his own. I think some are storing actual bar data so there I can see the numbered GVs being useful. Maybe ADE uses the numbered GVs (not sure). So maybe it makes sense to reserve the numbered GVs only for storing actual bar data or something along that line like internal tables or whatever. Even with tables I have used the named string GVs and then just stuck a number on the end. Names are just so much easier to remember and 2 years after your programming is done if you have to make a change you will be cursing if you use numbers for every GV use (changes will take a lot longer).
Can I get a confirmation that GV 2.2 does in fact work in Win7. At least the Named GVs. I sure hope so!
Thanks
John
Regarding Martin's
The documentation says "Named string global variables may contain strings of up to 250 characters." So this is probably what is creating the -1 error. That string is probably way larger than 250. The actual name of the GV variable for all named types is 100 long.Correct. GVSetString returns -1.
Regarding Boolean and numbered GVs, I personally have never used anything but the named (integers, floats and strings). For a switch I just use the Integer 0 or 1 so that if I decide to add more variants I can just go to 2,3,4 etc (you know, the maybe switch . The documentation says there are 3000 named (as opposed to numbered) variable locations of each data type. I am up to 982 Integers, 858 floats and 266 strings. So it appears I have only used 1/3 of the integer capacity. So what I am saying is you can create a very large number of integer flags and probably never run out. Right at the start when I read 3,000 I figured there is no point in using numbered because I probably will never need that many. However maybe someone is using GVs differently than I am so each to his own. I think some are storing actual bar data so there I can see the numbered GVs being useful. Maybe ADE uses the numbered GVs (not sure). So maybe it makes sense to reserve the numbered GVs only for storing actual bar data or something along that line like internal tables or whatever. Even with tables I have used the named string GVs and then just stuck a number on the end. Names are just so much easier to remember and 2 years after your programming is done if you have to make a change you will be cursing if you use numbers for every GV use (changes will take a lot longer).
Re: MC 7 and Global variables?
Hello John
This morning I had an error message about low memory. Not sure if it is not related. Any technical process I could use to determine a memory leakage?
Martin
Yes GV 2.2 did work in my system with Win7 64 & MultiCharts 7. I use the named GV to for the same reason. Same approach for the BooleanHi,
Can I get a confirmation that GV 2.2 does in fact work in Win7. At least the Named GVs. I sure hope so!
This morning I had an error message about low memory. Not sure if it is not related. Any technical process I could use to determine a memory leakage?
Martin