get symbol name from indicator

Questions about MultiCharts and user contributed studies.
turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

get symbol name from indicator

Postby turbofib » 18 Nov 2018

hi
i 've a chart with signal and indicator

i want to know signal's name from the indicator

i try to use GetStrategyName but i get indicator's name and not signal's name

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

Re: get symbol name from indicator

Postby Svetlana MultiCharts » 19 Nov 2018

Hello, turbofib,

There is no direct way to get the signal's name from the indicator.
You can try using Global Variables to achieve it:
https://www.multicharts.com/trading-sof ... _Variables
For example, assign the name through the Global Variable in the indicator and then get it in the signal.
Indicator:

Code: Select all

var: b(0);
GVSetString(b, "12345");
Signal:

Code: Select all

var: b(0);
var: s1("");
s1 = GVGetString(b);

print(s1);

TW
Posts: 31
Joined: 14 Dec 2009
Has thanked: 5 times
Been thanked: 1 time

Re: get symbol name from indicator

Postby TW » 01 Dec 2018

Can you please make MC a reserve word to let user get strategy name directly?
I have hundreds of strategies, it would be a very hard work to assign the name one by one.


Return to “MultiCharts”