+1 888 340 6572 GET STARTED
MultiCharts Project Management
previous_open_issue.png
Go to the previous open issue
previous_issue.png
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
feature_request_small.png
Open Feature request MC-211

Allow plotting in signals

action_vote_minus_faded.png
32
Votes
action_vote_plus_faded.png
next_issue.png
Go to the next issue (open or closed)
next_open_issue.png
Go to the next open issue
Description

Currently, plotting is only allowed in indicators, not signals. You will receive a syntax error if you attempt to add a "plot" statement within a signal.
When I'm developing and backtesting a new system, I'll often want to plot data, such as trend lines. Under the current system, I need to have an indicator to do the plotting, and a separate signal for the simulated trade execution. This has two downsides:
First, I might need to have redundant code. For example, if I write a custom algorithm to plot certain information, I will either need to copy/paste that code into both the indicator and the signal, or move that code into a function that's called by both the indicator and the signal. Under the first scenario, I have to manually keep the two sets of code in sync. Under the second scenario, I have to have three separate files just to plot.
Second, I have to keep the parameters for both the indicator and the signal "in sync." For example, if I change the length of a trendline in a signal, either manually or through optimization, then I'll have to enter those same parameters manually into the indicator.
This could be avoided if I insert code for plotting within the signal itself. Then I wouldn't necessarily need to have a sparate indicator.
I assume that this behavior is an artifact from compatibility with TradeStation and EasyLanguage. However, adding the ability to plot within a signal wouldn't be a "breaking" change, because it would only be adding an optional feature. People who want to plot within a signal could do so, but existing EL/PL code would work just fine, including existing signals and indicators.
If this ability is added, it would also be nice to create a toggle box in the "properties" for the signal to the effect of: "Plotting: On/Off." If "Off" is selected, then the plotting code would be ignored. This would allow people to enable plotting easily during development and testing of a strategy, but disable it during real-time execution, without changing the code.

Steps to reproduce this issue

Add code for plotting in a signal.

Comments (11)
#0
user-offline.png  janus (janus)
Mar 06, 2011 - 23:04

Agree 100%.  I have the same issue of repeating lots and lots of code.
I'm using a system where I insert commented lines in an indicator that are
meant for a signal study.  I then save it as a text file and run a program
that uncomments these lines and removes other lines to form a file for import
as a signal.  I think it's time to remove the distinction between an
indicator and a study anyway to avoid such annoying steps.

Another approach is to allow a signal to call an indicator study as if it
were a function.  All variables in the indicator must be visible and
accessible by the signal study.  However, I prefer the other approach and merge indicators and signals.

#0
user-offline.png  mechtrader (mechtrader)
May 09, 2012 - 14:50

Plotting from signals would be very useful for signal development. It is very annoying having to set settings in multiple locations, and annoying to have to wait on the calculation of redundant code.
It would also be good to be able to plot these indicators on multiple subgraphs, in case there are quite a few of them.

#0
user-offline.png  swz168 (swz168)
May 16, 2012 - 19:33

100% agree

#0
user-offline.png  GB (Id2)
Aug 10, 2012 - 00:14

100% agree too.
Very strong request. ORDER BY 1-- wool

#0
user-offline.png  JoshM (Jura)
Aug 15, 2012 - 12:11

Good idea; this will make backtesting much more convenient and productive instead of having to fiddle constantly with settings.

#0
user-offline.png  jimpe (jimpe606)
Oct 20, 2012 - 21:55

I fully agree!
A lot of time is wasted due to the need of parallel coding and configuration of both indicator and signal.

#0
user-offline.png  PatrickSocal (PatrickSocal)
Jun 04, 2013 - 22:56

I've been using Deltix/QuantOffice and MATLAB for a long time now... evaluating MC.NET as an alternative. An important part of the idea generation/development/debug process is charting the computed values. 
IMHO, this feature is more than a nice-to-have...  It's a major need.

#0
user-offline.png  PatrickSocal (PatrickSocal)
Jun 05, 2013 - 07:48

If this is implemented, I would hope it to have the following enhancement beyond what indicators have today:
A strategy will likely use heterogeneus data, each with a different value scale. It would be useful to plot different time series on different subwindows, even if they all come from the same strategy class. For a simple example, plot an SMA on subwindow1, plot ATR on subwindow2, and plot #daysSinceLastMax on subwindow3. 
Each one requires a different y axis scale to represent it properly. And all these indicators really belong to the strategy, so the strategy should be able to control how and where they are plotted.
This can be done in the AddPlot() method. 
Thanks for your interest :)

#0
user-offline.png  MultiCharts Support (MultiCharts)
Oct 01, 2013 - 20:42

Unfortunately addition of "plot" keywrod support in signal is an intesive task and it also may lead to mupltile complications due to current realization of chart structure, so another solution is suggested:
1. In the signal instead of plot the new keyword will be used: i_setplotvalue****(int seria_number, double value).
2. Additional indicator will required for plotting, but instead of transferring and adopting the whole logic of the signal to an indicator, the other keyword is used: i_getplotvalue****(int seria_number).
So the script of the indicator to realize the plot calculated in signal would be: plot1(i_getplotvalue(1), 'BuyEntryLevel ' ); 

#0
user-offline.png  MultiCharts Support (MultiCharts)
Oct 02, 2013 - 14:30

Unfortunately as i said previously, the implementation of "plot" in signals requires significant changes in the software and possibly leads to further difficulties. So far the described scheme will be implemented.

#0
user-offline.png  MultiCharts Support (MultiCharts)
Jan 02, 2014 - 14:39

Well, nothing is wrong if you are using MC 8.8, because the feature is scheduled for MC 9.0 that is not yet released.

History
Issue basics
  • Type of issue
    Feature request
  • Category
    Performance
  • Targeted for
    MultiCharts 9.0 (RELEASED)
  • Status
    Released
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (3)
People involved
  • Posted by
    user-offline.png  Xyzzy (Xyzzy)
  • Owned by
    Not owned by anyone
  • Assigned to
    Not assigned to anyone
  • Subscribers
    5 subscriber(s)
    Click here to show the list of subscribers
Times and dates
  • Posted at
  • Last updated
Issue details
  • Resolution
    Not determined
  • Severity
    Normal
Attachments (0)
There is nothing attached to this issue
Commits (0)
There are no code checkins for this issue
Duplicate issues (0)
This issue does not have any duplicates