a question about my first Indicator programmed in MultiCharts.Net - MultiCharts | futures io social day trading
futures io futures trading


a question about my first Indicator programmed in MultiCharts.Net
Updated: Views / Replies:695 / 5
Created: by gztanwei Attachments:4

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
 

a question about my first Indicator programmed in MultiCharts.Net

  #1 (permalink)
Elite Member
toronto
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 33 since Sep 2009
Thanks: 3 given, 10 received

a question about my first Indicator programmed in MultiCharts.Net

I am trying out MC.Net from AMP, but it turned out that I have to be paid user to post on MC.Net's official discussion forum. So I hope that I can get help in futures.io (formerly BMT) instead.

I programmed my first really simple indicator CurrectionBar modeling off C_Hammer_HangingMan.Function and .Indicator

But when I ran it, I got this error message. I checked 10+ times on what is different between my indicator and the C_Hammer_HangingMan but got no luck. Could you please help to check it out what I did wrong?

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Attached Files
Register to download File Type: zip CurrectionBar.zip (1.8 KB, 4 views)
Reply With Quote
 
  #2 (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


gztanwei View Post
But when I ran it, I got this error message. I checked 10+ times on what is different between my indicator and the C_Hammer_HangingMan but got no luck. Could you please help to check it out what I did wrong?

That's normally not a very hard error message to solve. Can you post your code in a .txt file? I'm not a big fan of importing .pln files with unseen code.

Reply With Quote
 
  #3 (permalink)
Elite Member
toronto
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 33 since Sep 2009
Thanks: 3 given, 10 received



Jura View Post
That's normally not a very hard error message to solve. Can you post your code in a .txt file? I'm not a big fan of importing .pln files with unseen code.

Thanks for the reply.

I found the reason now. It is because in C_Hammer_HangingMan.Function.CS, for some unknown and strange reason, it declares the two output objects, but do not initialize them.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


and it depends on the C_Hammer_HangingMan.Indicator.CS to pass in an empty object.

Do you happen to know what is the good on handling this way? to me it is much simpler to declare this way:

 
Code
        private VariableSeries<double> m_ohammer;
        public ISeries<double> ohammer{
        get { return m_ohammer; }
	    }



and below is my whole function of correction bar:

 
Code
using System;

namespace PowerLanguage.Function
{
    public class C_CorrectionBar_Up_Down : FunctionSeries<Double>
    {
//Declare variables
        private VariableSeries<double> m_oCB_Up;
        public ISeries<double> CB_Up{
        get { return m_oCB_Up; }
	    }	
        private VariableSeries<double> m_oCB_Down;
        public ISeries<double> CB_Down{
        get { return m_oCB_Down; }
	    }	
//Declare structurer
		public C_CorrectionBar_Up_Down(CStudyControl ctx) :
            base(ctx) {}

        public C_CorrectionBar_Up_Down(CStudyControl ctx, int data_stream) :
            base(ctx, data_stream) {}

//create function, which initiatializes classes needed for the class
        protected override void Create(){
			m_oCB_Up = new VariableSeries<Double>(this);
			m_oCB_Down = new VariableSeries<Double>(this);
        }

        protected override void StartCalc(){
            
        }


        protected override double CalcBar(){
            m_oCB_Up.Value = 0;
            m_oCB_Down.Value = 0;
            if (Bars.CurrentBar > 2){
                if (Bars.High[1]>Bars.High[0])
                {
                    m_oCB_Up.Value = 1;
                }
            else{
                if (Bars.Low[1]<Bars.Low[0])
                {
                    m_oCB_Down.Value = 1;
                }
                }
            }
            return 1;
        }
    }
}

Reply With Quote
 
  #4 (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


gztanwei View Post
Do you happen to know what is the good on handling this way? to me it is much simpler to declare this way:

I always use an automatic property in Visual Studio since that's easier to code (with the `prop` code snippet) and is the same as MultiCharts uses in their programming manual.

I don't know if this is the 'good' or 'best' way, I don't think it matters that much as long as both compile and are recognised by MultiCharts .NET as an input.

Reply With Quote
 
  #5 (permalink)
Elite Member
toronto
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 33 since Sep 2009
Thanks: 3 given, 10 received


Jura View Post
I always use an automatic property in Visual Studio since that's easier to code (with the `prop` code snippet) and is the same as MultiCharts uses in their programming manual.

I don't know if this is the 'good' or 'best' way, I don't think it matters that much as long as both compile and are recognised by MultiCharts .NET as an input.

Thanks for the reply.

Speaking of Visual Studio, I do like VS better, but I found that the solution only includes indicators and signals; it does not include functions classes. Such as ADX, ADX.Function.cs is not in the solution.

Do you have "hacks" around it?

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
 
  #6 (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


gztanwei View Post
Speaking of Visual Studio, I do like VS better, but I found that the solution only includes indicators and signals; it does not include functions classes. Such as ADX, ADX.Function.cs is not in the solution.

Do you have "hacks" around it?

It would be nice if there were 'hacks' around, but I don't know of any. What I do know is that functions are built-in the PowerLanguage .NET Editor (see MultiCharts: Trading Software for Automated Trading and Backtesting ? View topic - MultiCharts .NET FAQ), so I don't expect them to be available in the VS anytime.

Reply With Quote

Reply



futures io > > > > a question about my first Indicator programmed 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
Convert code from multicharts(ELD) to Multicharts.NET rmiller863 MultiCharts 4 May 21st, 2016 10:16 AM
Multicharts and MultiCharts.NET 9.1 Beta 2 Aufidius MultiCharts 0 August 24th, 2015 01:05 AM
Multicharts or MC.NET indicator to save bar data into a MySQL/MS SQL Server database? andby MultiCharts 3 October 13th, 2014 03:37 PM
MultiCharts and MultiCharts .NET: where are indicators more performant? GoSlow MultiCharts 3 February 3rd, 2014 02:33 AM
Can MultiCharts Easy Language be programmed to do this? bjschwenzer EasyLanguage Programming 3 August 12th, 2011 01:41 AM


All times are GMT -4. The time now is 04:48 PM.

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-18 in 0.13 seconds with 20 queries on phoenix via your IP 54.221.136.62