Trouble using custom drawing in MultiCharts.NET - MultiCharts | futures io social day trading
futures io futures trading


Trouble using custom drawing in MultiCharts.NET
Updated: Views / Replies:800 / 4
Created: by Antny Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Trouble using custom drawing in MultiCharts.NET

  #1 (permalink)
Trading Apprentice
Springfield United States
 
Futures Experience: Intermediate
Platform: MetaTrader, NinjaTrader
Favorite Futures: EURJPY
 
Posts: 2 since Sep 2014
Thanks: 0 given, 0 received

Trouble using custom drawing in MultiCharts.NET

I have not had any luck getting an answer elsewhere, so....I thought I would try here.

All I am trying to do is figure out how to get a simple filled trapezoid to render on a chart. I have referenced all the examples the MultiCharts.NET has in this area, but to no avail. The biggest problem I am having is, the code I have shows no errors, so I don't even have a clue where I might be screwing up.

Here is what I am requesting. Can someone have a look at my code and show me why/what/how so I can make this platform useful? Any help will be greatly appreciated. Here is my source code.

 
Code
using System;
using System.Drawing;
using PowerLanguage.Function;
using System.Drawing.Drawing2D;

namespace PowerLanguage.Indicator
{
  public class NewTest_CustomDraw : IndicatorObject, IChartCustomDrawer
  {
    public NewTest_CustomDraw( object _ctx ) : base(_ctx)
    {
    }

    protected override void Create()
    {
      ChartCustomDraw.Register( this );
    }

    protected override void StartCalc()
    {                                                         
    }

    protected override void CalcBar()
    {
      ChartCustomDraw.ReDraw();
    }

    protected override void Destroy()
    {
      ChartCustomDraw.Unregister( this );
    }
    
    void IChartCustomDrawer.Draw( DrawContext context, EDrawPhases phase )
    {
        if (Bars.LastBarOnChart)
        {
            if (phase == EDrawPhases.BeforeFGShapes && context.DrawRect == context.FullRect)
            {
                Diamond g = new Diamond();

                PointF one = context.Environment.ChartPoint2Point(new ChartPoint { Price = Bars.Low[0], Time = Bars.Time[0] });
                PointF two = context.Environment.ChartPoint2Point(new ChartPoint { Price = Bars.High[10], Time = Bars.Time[10] });
                PointF three = context.Environment.ChartPoint2Point(new ChartPoint { Price = Bars.Low[27], Time = Bars.Time[27] });
                PointF four = context.Environment.ChartPoint2Point(new ChartPoint { Price = Bars.High[49], Time = Bars.Time[49] });

                g.RenderPoly(context.graphics, one, two, three, four);
            }
        }
    }
  }

  public class Diamond
  {
    public Diamond()
    {
    }

    public void RenderPoly(Graphics g, PointF x, PointF a, PointF b, PointF c)
    {
        PointF[] setPoints = new PointF[] {x, a, b, c};
		g.FillPolygon(Brushes.AliceBlue, setPoints);
    }
  }
}

Reply With Quote
 
  #2 (permalink)
Trading Apprentice
Springfield United States
 
Futures Experience: Intermediate
Platform: MetaTrader, NinjaTrader
Favorite Futures: EURJPY
 
Posts: 2 since Sep 2014
Thanks: 0 given, 0 received

12 views and nobody has any ideas. It isn't looking hopeful at this point.

Reply With Quote
 
  #3 (permalink)
 Vendor: tradingcode.net 
The Netherlands
 
Futures Experience: None
Platform: MultiCharts, TradingView
Favorite Futures: ...
 
Jura's Avatar
 
Posts: 774 since Apr 2010
Thanks: 2,347 given, 661 received


For those who come across this topic and are inclined to spend time to answer it, the question of the topic starter has already been answered on the MultiCharts forum.

Reply With Quote
 
  #4 (permalink)
Elite Member
Jacksonville, Florida United States
 
Futures Experience: Intermediate
Platform: NT8, Fully custom
Broker/Data: NT Brokerage, Interactive Brokers
Favorite Futures: ES
 
Jasonnator's Avatar
 
Posts: 69 since Dec 2014
Thanks: 19 given, 44 received

I am working on this as well. One of my systems is trading patterns so it'd be nice to be able to draw them programatically. I called MC support and asked if it would be against the EULA if I extended the drawing interfaces and classes. They said it wouldn't despite the code being in a compiled dll (which is not obfuscated). I specifically asked if it was within the EULA to decompile it, create a project then extend the functionality. Again, they said no problem and that I could share the project. Their only concern was whether I had purchased a license or not, which I have.

If anyone else is interested in contributing to extending multicharts .net drawing capabilities, I be up for getting a github repository going.

Jason

Reply With Quote
 
  #5 (permalink)
Elite Member
Jacksonville, Florida United States
 
Futures Experience: Intermediate
Platform: NT8, Fully custom
Broker/Data: NT Brokerage, Interactive Brokers
Favorite Futures: ES
 
Jasonnator's Avatar
 
Posts: 69 since Dec 2014
Thanks: 19 given, 44 received

Quick down and dirty solution here. Code is attached.

Reply With Quote

Reply



futures io > > > > Trouble using custom drawing in MultiCharts.NET

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multicharts.Net programmieren jojojo German Traders 4 August 28th, 2014 01:05 PM
MultiCharts and MultiCharts .NET: where are indicators more performant? GoSlow MultiCharts 3 February 3rd, 2014 02:33 AM
Using Multicharts 8.5 .NET for testing and trading of custom frameworks ahwii Elite Automated Trading 14 November 23rd, 2013 06:31 AM
Multicharts with .Net ehlaban MultiCharts 141 June 27th, 2013 10:52 AM
Drawing a region in Multicharts Easylanguage buylosellhi MultiCharts 2 October 5th, 2011 04:31 PM


All times are GMT -4. The time now is 03:59 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-17 in 0.11 seconds with 19 queries on phoenix via your IP 54.227.51.103