I just wanted to gather a little more information regarding your question. If you have more than one security on a chart window, the chart window will automatically plot both. I'm not sure I understand if you are looking to toggle between two charted securities or something else. Please let me know. Thanks.
The best way to describe what I'm trying to is with the attached efs. This efs I was compiled by Alex, and I would like by indicator to be able to do that as well. I will send my efs after I have posted Alex's, as I don't think you can post two attachments at the same time.
The solution to your issue is probably too complex to fully explain by me, but I looked at the two efs and here is my suggestion.
Use the var fp1 section as shown in the original efs in the second efs
Change all occurances of hi/lo/c/o/volujme/etc (these are shown in blue) in the second efs to the format shown in line 40 of the original efs.
I might suggest you write a simple efs to show the specific symbol h/l/c/o/v values in the cursor window first to be sure you have the right values, then add similar code to the second efs.
To be honest, I'm not sure how to do this mate. However, I think I understand what you mean when you say I have to figure out how to somehow reference the h/l/c/o of an alternate symbol - just not sure how to do it.
You don't have to use getValue, as open(), close(), etc allow the use of an alternate symbol as well.
I assume the main goal is to plot the Demand Index of an alternate symbol on the chart (say the DI of the Nasdaq on some tech stock).
You have Alex's code as a template on how to access alternative symbols, you can also look at the EFS help file that Chris has put into the public domain.
Both show that the last parameter for getValue or its derivatives (open(), close(), etc) is for an alternative symbol.
example:
close([nRelative Offset], [nNumBars],[Symbol])
The fact that all the possible parameters to close are in [brakets] means that they are optional.
so:
close("IBM");
will get you the close value of IBM for whatever interval chart you are running the EFS on.
high(0, -5, "MSFT");
Will get you the last five values from MSFT.
So, what I would do is take whatever symbol you want (doesn't matter for step 1, as long as it is a valid symbol) and use the literal name in all cases of open(),close(),high(), low() and volume().
For example there is a line in the code in question:
I have just read your comments, and I was wondering you would be kind enough just to check out whether I've included enough code to check for errors. As you can imagine, I would hate to use this script to trade if its unreliable, and I can't think of anything worse for a trader to trade with indicators he doesn't have full confidence in.
Comment