use GVSetNamedXXX/GVGetNamedXXX to broadcast symbolroot

Questions about MultiCharts and user contributed studies.
kernel
Posts: 91
Joined: 19 Feb 2013
Has thanked: 21 times
Been thanked: 4 times

use GVSetNamedXXX/GVGetNamedXXX to broadcast symbolroot

Postby kernel » 12 Jan 2016

Hi,

I tried to use GVSetNamedXXX/GVGetNamedXXX pair to broadcast symbol names but failed.
My guess is probably due to the type conversion, any good ideas on how to broadcast instrument
names? if each instrument has an unique ID, it'd be lot easier.

Code: Select all

GVSetNamedDouble(symbolroot, StrToNum(symbolroot));

.......


if GVGetNamedDouble("XXXXXXX",-999)=StrToNum("XXXXXXX") then

//do something

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: use GVSetNamedXXX/GVGetNamedXXX to broadcast symbolroot

Postby TJ » 12 Jan 2016

Hi,

I tried to use GVSetNamedXXX/GVGetNamedXXX pair to broadcast symbol names but failed.
My guess is probably due to the type conversion, any good ideas on how to broadcast instrument
names? if each instrument has an unique ID, it'd be lot easier.

Code: Select all

GVSetNamedDouble(symbolroot, StrToNum(symbolroot));
.......
if GVGetNamedDouble("XXXXXXX",-999)=StrToNum("XXXXXXX") then

//do something

GVSetNamedDouble

"Double", as in a double precison number.

ie. not a string.

The GlobalVariable documentation has all the explanations and usage examples.



Please look up the definition and usage examples of the keyword

StrToNum


Return to “MultiCharts”