Enable multiple instances of a study to run in same chart

gringojoey

Member
Joined
Dec 21, 2020
Posts
7
Likes
2
Hello guys,

I am trying to load multiple instances of my study (like it is possible for example for EMAs and some other overlays), but my study (even though studyoverlay and overlay is enabled) can only be initialized once.
I compared my code to the code of other studies and I was not able to find any differences in settings.

If anybody knows how I can enable this feature for my study, it would be great.

Thanks in advance,
Joe
 

igor.s

Well-known member
Joined
May 22, 2019
Posts
277
Likes
150
The trick is to use setLabel (parm1, parm2, ....). In this case the study instance is dependent on the parameters. You will be able to load multiple instances of your study on the same chart with different parameters.

cheers.
 

mwUserGreg

Member
Joined
Sep 17, 2022
Posts
13
Likes
2
hey guys, I happened upon this thread and it looks like it may be what I need to do. Can either of you show some sample code of what this looks like? Thanks!
 
Top