Hi,
I encountered a weird problem with GlobalVariables.
It is fine on my existing PC (Win7 64bit) but then on my Win8 laptop (Win8 64bit), the PLEditor does not recognize the functions. GVSetNamedInt etc all are not recognized.
It was fine on my Win8 laptop previously, but I did a clean up of the laptop as I was sending it for repair, after it came back, I reinstalled MC 9.010360.400 and the PLEditor suddenly does not recognize the functions.
Are there any libraries which needs to be present for GlobalVariables to work? I could have deleted them away when wiping the laptop.
Thanks alot!
Problem with Global Variables
- arnie
- Posts: 1594
- Joined: 11 Feb 2009
- Location: Portugal
- Has thanked: 481 times
- Been thanked: 514 times
Re: Problem with Global Variables
Do you have the dlls installed?
ELCollections.dll
GlobalVariable.dll
That is always happening to me.
Attached are both dll (64bit version).
Copy/Paste both into C:\Program Files\TS Support\MultiCharts64 (Windows 7 folder).
Have no idea where TS Support folder is in Windows 8
ELCollections.dll
GlobalVariable.dll
That is always happening to me.
Attached are both dll (64bit version).
Copy/Paste both into C:\Program Files\TS Support\MultiCharts64 (Windows 7 folder).
Have no idea where TS Support folder is in Windows 8
- Attachments
-
- EL_GV_dlls.zip
- (372.41 KiB) Downloaded 294 times
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Problem with Global Variables
If you have the DLL's installed (see Arnie's reply) but if they still are not recognised in the PowerLanguage Editor, you might have the functions missing. To check, press Ctrl - O to bring up the 'Open' window and look for functions with names as:It is fine on my existing PC (Win7 64bit) but then on my Win8 laptop (Win8 64bit), the PLEditor does not recognize the functions. GVSetNamedInt etc all are not recognized.
* GVGetNamedDouble
* GVGetNamedInt
* GVSetNamedDouble
* GVSetNamedInt
If you have these missing, they will need to reimported again. How to do that? I don't know :], they are locked in my MultiCharts install so can't export them for you to import.
(You could remove and re-install MultiCharts to get those functions, but then other scripts would also be lost).
Re: Problem with Global Variables
Hi arnie and JoshM, thanks for the suggestions. Could be a build problem in the latest version.
The packages were around but couldn't be detected. I uninstalled and reinstalled the new version but it still failed. Only worked after I installed an older version of MC and upgrade to newer version..
At least its working now Thought MC deprecated the functions at first haha.
Do you guys use the Global variables for trading spreads? Pretty troublesome for backtesting as I cannot do it straight from the MC platform. Got to use portfolio tester for it.
The packages were around but couldn't be detected. I uninstalled and reinstalled the new version but it still failed. Only worked after I installed an older version of MC and upgrade to newer version..
At least its working now Thought MC deprecated the functions at first haha.
Do you guys use the Global variables for trading spreads? Pretty troublesome for backtesting as I cannot do it straight from the MC platform. Got to use portfolio tester for it.
Re: Problem with Global Variables
Hi. I'm trying to access the price of a second security when coding a signal for the Scanner.
It seems possible that "Global Variables" might solve this problems.
Reading this thread, I looked in my Windows 8.1 for the libraries mentioned.
I found the "GlobalVariable.dll" in "C:\Program\TS Support\MultiCharts64".
I couldn't find the other library mentioned above.
I can also see the functions in the PowerLanguage Editor functions list, but unfortunately they are readonly, so I cannot see how to access them or how to get the Price-value from them.
I have seen in other posts that it can be used like this:
Value2=GVGetNamedDouble("SPY",Value1);
But that doesn't compile for me.
If those functions are supposed to give access to other symbols in the Powelanguage code, why not just include them as normal functions in the MC Powerlanguage?
//Per-Olof
It seems possible that "Global Variables" might solve this problems.
Reading this thread, I looked in my Windows 8.1 for the libraries mentioned.
I found the "GlobalVariable.dll" in "C:\Program\TS Support\MultiCharts64".
I couldn't find the other library mentioned above.
I can also see the functions in the PowerLanguage Editor functions list, but unfortunately they are readonly, so I cannot see how to access them or how to get the Price-value from them.
I have seen in other posts that it can be used like this:
Value2=GVGetNamedDouble("SPY",Value1);
But that doesn't compile for me.
If those functions are supposed to give access to other symbols in the Powelanguage code, why not just include them as normal functions in the MC Powerlanguage?
//Per-Olof
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Problem with Global Variables
Do you mean an indicator in the Market Scanner that you trade discretionary off, or a signal study that automates trading for you?I'm trying to access the price of a second security when coding a signal for the Scanner.
I'm asking because, for the latter case, automated trading in the Market Scanner is not possible. So if that's the goal, you can save yourself a lot of GV trouble.
Re: Problem with Global Variables
Thanks JoshM for the quick reply.
In the scanner I want to calculate a "Relative Strength Rank". To do that I need to to compare each stocks historic prices with an index (SPY for example). and then rank the stocks to get the once that have the best performance (or worst as candidates for shorting).
The %age developement over 6 month, 3 month, 1 months and last week will be compared and weighted to a rank number.
So all I need is to access the SPY index in the same signal that makes those calculations.
When I have the rank number, I can just sort the scanner page on the rank column.
Relative Strength ranking builds on the fact that good performers usually continue to outperform the market.
I hope I gave a clear answer to my need.
BR Per-Olof
In the scanner I want to calculate a "Relative Strength Rank". To do that I need to to compare each stocks historic prices with an index (SPY for example). and then rank the stocks to get the once that have the best performance (or worst as candidates for shorting).
The %age developement over 6 month, 3 month, 1 months and last week will be compared and weighted to a rank number.
So all I need is to access the SPY index in the same signal that makes those calculations.
When I have the rank number, I can just sort the scanner page on the rank column.
Relative Strength ranking builds on the fact that good performers usually continue to outperform the market.
I hope I gave a clear answer to my need.
BR Per-Olof
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: Problem with Global Variables
There is only a couple of GlobalVariable functions prebuilt (those that that are utilized by the prebuilt addons). You can find all Global Variables functions + documentation in the zip file attached to this post.
Re: Problem with Global Variables
Hi. Thanks Henry and JoshM for pushing me in the right direction.
JoshM, I ment an indicator, sorry for confusion (I'm still a newbee).
Anyway, so far I have managed to get the SPY Price in an indicator used in the scanner .
A small problem is that I have to have a graph with the SPY open in order to get a new value into the global variable. I guess there is no workaround that!
So now I'm happy and will soon be up and running with my "Relative Strength Ranking".
Thanks again. /Per-Olof
JoshM, I ment an indicator, sorry for confusion (I'm still a newbee).
Anyway, so far I have managed to get the SPY Price in an indicator used in the scanner .
A small problem is that I have to have a graph with the SPY open in order to get a new value into the global variable. I guess there is no workaround that!
So now I'm happy and will soon be up and running with my "Relative Strength Ranking".
Thanks again. /Per-Olof
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Problem with Global Variables
I think you can also put the SPY in the Market Scanner; then it can still send/update the global variable and you don't need an extra chart. If you put SPY in a separate group, then you can also collapse that group and don't even need to look at it.A small problem is that I have to have a graph with the SPY open in order to get a new value into the global variable. I guess there is no workaround that!
I'm glad you have it working btw.
- Attachments
-
- scr.05-01-2015 20.17.35.png
- (8.8 KiB) Downloaded 1193 times