Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Broker: NT Brokerage, Kinetick, IQFeed, Interactive Brokers
Trading: ES
Posts: 159 since Dec 2014
Thanks Given: 40
Thanks Received: 166
I have recently switched to MultiCharts and so far like the platform except for the drawing tools. One of my systems is based on patterns but there's no elegant way to draw a triangle or XABCD pattern in MultiCharts.
I started looking at the implementation of MC drawings located in the PLTypes.dll file and found the Arrow, TrendLine, and Text objects. I called MC support and asked if extending the built in drawing tools by modifying this file was in any way against their EULA. I also specifically asked about decompiling and they said it is not against the EULA as long as I have a license and the file in question is not obfuscated.
I pulled apart the dll and first looked in EPlotShapes.cs and added Triangle to the enum list.
Then I copied all of the related TrendLine files and modified the following files so as to support a triangle shape:
ITriangleObject.cs (added 3 ChartPoint properties: pointOne, pointTwo, pointThree)
ITriangleContainer.cs (Added 3 Create functions to support 3 ChartPoint objects)
Triangle.cs (added 3 ChartPoint properties, added a Height property)
TriangleCreator.cs (same as ITriangleContainer.cs)
TriangleObjectException.cs (basic renaming from intial file copying)
I backed up ActiveObject.dll, ATCenterProxy.interop.dll, PLTypes.xml, and PLTypes.dll then copied the new files into the installation folder. Here's the kicker, it worked. However, comma, the enum Triangle does not show up in MC's built in editor intellisense but DOES in visual studio. Booyah, or so I thought.
Here's where I could use some help:
The biggest rub is Triangle doesn't show up when right clicking on a chart on the Insert Drawing submenu. That effectively makes it only usable via code which is ok but being able to use it via the Insert Drawing submenu would be great.
Jason
Can you help answer these questions from other members on NexusFi?
Broker: NT Brokerage, Kinetick, IQFeed, Interactive Brokers
Trading: ES
Posts: 159 since Dec 2014
Thanks Given: 40
Thanks Received: 166
Everything compiles but I ran into a bit of a problem with PLStudiesProxy.dll where the actual drawing logic needs to be. I am working with MultiCharts and hopefully they will allow me to implement this for them so everyone can have a triangle tool.
Broker: NT Brokerage, Kinetick, IQFeed, Interactive Brokers
Trading: ES
Posts: 159 since Dec 2014
Thanks Given: 40
Thanks Received: 166
So MC basically came back and said that implementing this idea would require "profound" changes in MC. I ended up using tool bar buttons with custom functionality underneath. It's not optimized or uber efficient but it works. I uploaded while I was still tinkering but it should give anyone interested a decent place to start. Code attached...
StartCalc function
I wanted to draw shapes interactively so I am handling mouse clicks. Don't foget to add [MouseEvents(true), SameAsSymbol(true), RecoverDrawings(false)]
Broker: NT Brokerage, Kinetick, IQFeed, Interactive Brokers
Trading: ES
Posts: 159 since Dec 2014
Thanks Given: 40
Thanks Received: 166
You create a new indicator and modify the shell with the code in this post. The indicator will initiate a tool bar which is where the custom drawing tools are located. This is very beta and is more of a proof of concept. It can (and should) be significantly improved with try/catch and other error checking. The mouse events are also not very efficient but do work. It is a little quirky in that you have to do things like click in the chart, then click your points. If you can step through with a debugger (attach to process), it will help you understand how things are working.
You create a new indicator and modify the shell with the code in this post. The indicator will initiate a tool bar which is where the custom drawing tools are located. This is very beta and is more of a proof of concept. It can (and should) be significantly improved with try/catch and other error checking. The mouse events are also not very efficient but do work. It is a little quirky in that you have to do things like click in the chart, then click your points. If you can step through with a debugger (attach to process), it will help you understand how things are working.
MC.NET 9.1 -- Has anyone found a way to draw a shaded geometric shape (polygon... whatever) anchored at X,Y that will scroll with prices and not disappear when scrolling? I can draw a trendline or group of them to form the outline of a box and it will scroll with prices and not disappear, but holy cow batman I'm stumped on getting a shaded rectangle to have the same behavior.
MC.NET 9.1 -- Has anyone found a way to draw a shaded geometric shape (polygon... whatever) anchored at X,Y that will scroll with prices and not disappear when scrolling? I can draw a trendline or group of them to form the outline of a box and it will scroll with prices and not disappear, but holy cow batman I'm stumped on getting a shaded rectangle to have the same behavior.
-steve
I made a request in 2010 so if you are lucky and you make the request now it might be ready for MC.net in 2020 :-)
All you MC or MC net users please get onto the project management forum and add your name to the list of people who want the ability to draw triangles.