additional references dll - NinjaTrader Programming | futures io social day trading
futures io futures trading


additional references dll
Updated: Views / Replies:7,965 / 34
Created: by timmyb Attachments:10

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
 10  
 
Thread Tools Search this Thread
 

additional references dll

  #21 (permalink)
Elite Member
Calcutta, India
 
Futures Experience: Intermediate
Platform: ArthaChitra
 
Posts: 278 since Jun 2009
Thanks: 161 given, 259 received


timmyb View Post
Ok so this one is probably for bukken.

So i managed to figure out how to build a form in visual basic then have ninja load it. Now here is my loading code.

TestForm.Show();

which loads the form

now that form has a button. But i cannot seem to gain access to the button I am curious how.

to make it simple i was trying to jsut have when i click the button a message box opens. But i am unsure how to get the ninja .cs to know if the button was clicked in the form in the dll

Hope this makes sense

you have to create an eventhandler for that in the dll. when you create an object in ninjascript (from the dll), just raise the event. that will do the trick.

Reply With Quote
 
  #22 (permalink)
Elite Member
duluth,mn
 
Futures Experience: Advanced
Platform: ninja,thinkorswim
Broker/Data: Amp-Zenfire
Favorite Futures: ES,Options
 
Posts: 648 since Feb 2010
Thanks: 81 given, 1,349 received

well bukkan its been a while and here i am trying this again;

So i build a form and it loads in ninja, in the code in visual studio i have this.

circularPointer1.Value = 40;


ithe whole thing is exported as a dll

now in ninja i get the form to open by doing

TimmybForm1.show();

the guage is there and everything, but for the life of me i cant get the guage to display a number with anything i try in ninja

its like it doesnt know its there, i have tried a ton of things and i am now frustereated and lost after 4 hours of struggling. any advice would be great.

Reply With Quote
 
  #23 (permalink)
Elite Member
duluth,mn
 
Futures Experience: Advanced
Platform: ninja,thinkorswim
Broker/Data: Amp-Zenfire
Favorite Futures: ES,Options
 
Posts: 648 since Feb 2010
Thanks: 81 given, 1,349 received


here is the code in the dll, I open the form in ninja with

TimmybForm1 NewForm = new TimmybForm1(); // under variables
then onstartup i put

NewForm.show();

this makes the form open fine, and if i add toher things like text boxes ect i can populate them fine

I cant seem to set the line here

numericIndicator1.Value = 367.12;

i have tried everything and am so frusterated


 
Code
namespace Ninja_form_test_dll
{
    partial class TimmybForm1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            Dundas.Gauges.WinControl.NumericIndicator numericIndicator1 = new Dundas.Gauges.WinControl.NumericIndicator();
            Dundas.Gauges.WinControl.InputValue inputValue1 = new Dundas.Gauges.WinControl.InputValue();
            this.gaugeContainer1 = new Dundas.Gauges.WinControl.GaugeContainer();
            ((System.ComponentModel.ISupportInitialize)(this.gaugeContainer1)).BeginInit();
            this.SuspendLayout();
            // 
            // gaugeContainer1
            // 
            this.gaugeContainer1.BackFrame.BackColor = System.Drawing.Color.DimGray;
            this.gaugeContainer1.BackFrame.BackGradientEndColor = System.Drawing.Color.White;
            this.gaugeContainer1.BackFrame.BackGradientType = Dundas.Gauges.WinControl.GradientType.HorizontalCenter;
            this.gaugeContainer1.BackFrame.BorderColor = System.Drawing.Color.DimGray;
            this.gaugeContainer1.BackFrame.BorderWidth = 2;
            this.gaugeContainer1.BackFrame.FrameShape = Dundas.Gauges.WinControl.BackFrameShape.Rectangular;
            this.gaugeContainer1.BackFrame.FrameStyle = Dundas.Gauges.WinControl.BackFrameStyle.Simple;
            this.gaugeContainer1.BackFrame.FrameWidth = 0F;
            this.gaugeContainer1.InternalBackgroundPaint = false;
            this.gaugeContainer1.Location = new System.Drawing.Point(29, 219);
            this.gaugeContainer1.Name = "gaugeContainer1";
            numericIndicator1.BackColor = System.Drawing.Color.Transparent;
            numericIndicator1.BackGradientType = Dundas.Gauges.WinControl.GradientType.None;
            numericIndicator1.BorderWidth = 0;
            numericIndicator1.IndicatorStyle = Dundas.Gauges.WinControl.NumericIndicatorStyle.Digital14Segment;
            numericIndicator1.LedDimColor = System.Drawing.Color.Empty;
            numericIndicator1.Location.X = 0F;
            numericIndicator1.Location.Y = 0F;
            numericIndicator1.Name = "Indicator1";
            numericIndicator1.Parent = "";
            numericIndicator1.ShowDecimalPoint = true;
            numericIndicator1.Size.Height = 99F;
            numericIndicator1.Size.Width = 99F;
            numericIndicator1.Value = 367.12;
            this.gaugeContainer1.NumericIndicators.Add(numericIndicator1);
            this.gaugeContainer1.Size = new System.Drawing.Size(327, 55);
            this.gaugeContainer1.TabIndex = 0;
            inputValue1.Name = "Default";
            this.gaugeContainer1.Values.Add(inputValue1);
            // 
            // TimmybForm1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(379, 477);
            this.Controls.Add(this.gaugeContainer1);
            this.Name = "TimmybForm1";
            this.Text = "TimmybForm1";
            ((System.ComponentModel.ISupportInitialize)(this.gaugeContainer1)).EndInit();
            this.ResumeLayout(false);

        }

        #endregion

        private Dundas.Gauges.WinControl.GaugeContainer gaugeContainer1;


    }
}

Reply With Quote
 
  #24 (permalink)
Elite Member
Calcutta, India
 
Futures Experience: Intermediate
Platform: ArthaChitra
 
Posts: 278 since Jun 2009
Thanks: 161 given, 259 received

I dont have the dundas stuff so cant test. But do numericIndicator1.Value returns a double or a decimal. If it is a decimal please modify your code like:
 
Code
numericIndicator1.Value = 367.12M;
cheers..

Reply With Quote
 
  #25 (permalink)
Elite Member
Houston,Tx
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: TF
 
ThatManFromTexas's Avatar
 
Posts: 2,302 since Feb 2010
Thanks: 1,208 given, 4,293 received


bukkan View Post
I dont have the dundas stuff so cant test. But do numericIndicator1.Value returns a double or a decimal. If it is a decimal please modify your code like:
 
Code
numericIndicator1.Value = 367.12M;
cheers..

@bukkan

Haven't seen you in a while, hope all is well with you!

Regards,
TMFT

I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"
Reply With Quote
 
  #26 (permalink)
Elite Member
Milan Italy
 
Futures Experience: Intermediate
Platform: Ninjatrader, Sierra Chart
Favorite Futures: ES
 
Posts: 523 since Feb 2010
Thanks: 470 given, 629 received

@timmyb, couldn't you create the form itself within NT (i.e., copying and pasting the Visual Studio code into the indicator), and reference the needed Dundas dll's from the Form/Indicator?

Reply With Quote
 
  #27 (permalink)
Elite Member
duluth,mn
 
Futures Experience: Advanced
Platform: ninja,thinkorswim
Broker/Data: Amp-Zenfire
Favorite Futures: ES,Options
 
Posts: 648 since Feb 2010
Thanks: 81 given, 1,349 received


futuretrader View Post
@timmyb, couldn't you create the form itself within NT (i.e., copying and pasting the Visual Studio code into the indicator), and reference the needed Dundas dll's from the Form/Indicator?

Yes that is what I do now. But my forms are becoming more advanced. So if I can get a dll to work then my life would be easier


Thanks bukken will try that tonight and post issues. I know I can get things to compile but no movement. Thanks tim

Reply With Quote
 
  #28 (permalink)
 Vendor: www.tools4trading.de 
Erfurt Germany
 
Futures Experience: Master
Platform: rtMagic, NinjaTrader
Broker/Data: AMP/CQG, IAB
Favorite Futures: ES, 6E, FDAX, FGBL
 
Posts: 338 since Aug 2011
Thanks: 54 given, 460 received


timmyb View Post
Yes that is what I do now. But my forms are becoming more advanced. So if I can get a dll to work then my life would be easier


Thanks bukken will try that tonight and post issues. I know I can get things to compile but no movement. Thanks tim

ATTENTION:
please realize a secure load & call logic (dynamic add/load) for different assembly's between 32bit and 64bit Ninja Systems !!!
...Currently you make/use only a "undocumented" single plattform version

Reply With Quote
 
  #29 (permalink)
Elite Member
duluth,mn
 
Futures Experience: Advanced
Platform: ninja,thinkorswim
Broker/Data: Amp-Zenfire
Favorite Futures: ES,Options
 
Posts: 648 since Feb 2010
Thanks: 81 given, 1,349 received

I am so lost right now. So my form is in the dll. It opens and everything is fine. How do i acces the numeric indicator that is in the form. I can add a new one to the form but i cant seem to access the one thats in the form. What am i doing wrong here


So When I creat a new form NewForm timmybformm1 this is creating a new copy of that form, do i have to add all the code in the visual studio file? I am confused as to why i can add normal visual studio controls and they work fine.


Last edited by timmyb; May 1st, 2012 at 10:06 PM.
Reply With Quote
 
  #30 (permalink)
Elite Member
duluth,mn
 
Futures Experience: Advanced
Platform: ninja,thinkorswim
Broker/Data: Amp-Zenfire
Favorite Futures: ES,Options
 
Posts: 648 since Feb 2010
Thanks: 81 given, 1,349 received


so with this code i get this

 
Code
// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
    /// <summary>
    /// Enter the description of your new custom indicator here
    /// </summary>
    [Description("Enter the description of your new custom indicator here")]
    public class Testingdll : Indicator
    {
        #region Variables
        // Wizard generated variables
      
        // User defined variables (add any user defined variables below)
        #endregion
		TimmybForm1 NewForm = new TimmybForm1();
		
		
		private Dundas.Gauges.WinControl.GaugeContainer gaugeContainer1;
		
		
		
		protected override void OnStartUp() 
		{
		Dundas.Gauges.WinControl.NumericIndicator numericIndicator1 = new Dundas.Gauges.WinControl.NumericIndicator();
        Dundas.Gauges.WinControl.InputValue inputValue1 = new Dundas.Gauges.WinControl.InputValue();
        this.gaugeContainer1 = new Dundas.Gauges.WinControl.GaugeContainer();
        ((System.ComponentModel.ISupportInitialize)(this.gaugeContainer1)).BeginInit();
        //this.SuspendLayout();
			
		NewForm.Controls.Add(this.gaugeContainer1);
		this.gaugeContainer1.NumericIndicators.Add(numericIndicator1);
		numericIndicator1.Value = 3456;
		
		
		NewForm.Show();
		}
		
		
		
		protected override void Initialize()
        {
 		
        }
		
		protected override void OnTermination()
		{
		NewForm.Dispose();	
	
		}

        /// <summary>
        /// Called on each bar update event (incoming tick)
        /// </summary>
        protected override void OnBarUpdate()
        {
    
        }

        #region Properties
      
        #endregion
    }
}

#region NinjaScript generated code. Neither change nor remove.
// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
    public partial class Indicator : IndicatorBase
    {
        private Testingdll[] cacheTestingdll = null;

        private static Testingdll checkTestingdll = new Testingdll();

        /// <summary>
        /// Enter the description of your new custom indicator here
        /// </summary>
        /// <returns></returns>
        public Testingdll Testingdll()
        {
            return Testingdll(Input);
        }

        /// <summary>
        /// Enter the description of your new custom indicator here
        /// </summary>
        /// <returns></returns>
        public Testingdll Testingdll(Data.IDataSeries input)
        {
            if (cacheTestingdll != null)
                for (int idx = 0; idx < cacheTestingdll.Length; idx++)
                    if (cacheTestingdll[idx].EqualsInput(input))
                        return cacheTestingdll[idx];

            lock (checkTestingdll)
            {
                if (cacheTestingdll != null)
                    for (int idx = 0; idx < cacheTestingdll.Length; idx++)
                        if (cacheTestingdll[idx].EqualsInput(input))
                            return cacheTestingdll[idx];

                Testingdll indicator = new Testingdll();
                indicator.BarsRequired = BarsRequired;
                indicator.CalculateOnBarClose = CalculateOnBarClose;
#if NT7
                indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256;
                indicator.MaximumBarsLookBack = MaximumBarsLookBack;
#endif
                indicator.Input = input;
                Indicators.Add(indicator);
                indicator.SetUp();

                Testingdll[] tmp = new Testingdll[cacheTestingdll == null ? 1 : cacheTestingdll.Length + 1];
                if (cacheTestingdll != null)
                    cacheTestingdll.CopyTo(tmp, 0);
                tmp[tmp.Length - 1] = indicator;
                cacheTestingdll = tmp;
                return indicator;
            }
        }
    }
}

// This namespace holds all market analyzer column definitions and is required. Do not change it.
namespace NinjaTrader.MarketAnalyzer
{
    public partial class Column : ColumnBase
    {
        /// <summary>
        /// Enter the description of your new custom indicator here
        /// </summary>
        /// <returns></returns>
        [Gui.Design.WizardCondition("Indicator")]
        public Indicator.Testingdll Testingdll()
        {
            return _indicator.Testingdll(Input);
        }

        /// <summary>
        /// Enter the description of your new custom indicator here
        /// </summary>
        /// <returns></returns>
        public Indicator.Testingdll Testingdll(Data.IDataSeries input)
        {
            return _indicator.Testingdll(input);
        }
    }
}

// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
    public partial class Strategy : StrategyBase
    {
        /// <summary>
        /// Enter the description of your new custom indicator here
        /// </summary>
        /// <returns></returns>
        [Gui.Design.WizardCondition("Indicator")]
        public Indicator.Testingdll Testingdll()
        {
            return _indicator.Testingdll(Input);
        }

        /// <summary>
        /// Enter the description of your new custom indicator here
        /// </summary>
        /// <returns></returns>
        public Indicator.Testingdll Testingdll(Data.IDataSeries input)
        {
            if (InInitialize && input == null)
                throw new ArgumentException("You only can access an indicator with the default input/bar series from within the 'Initialize()' method");

            return _indicator.Testingdll(input);
        }
    }
}
#endregion
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).




and this window. But it adds a new Digital display instead of just changing the number of the one thats there, I am really confused i know it iwll be obvious when i get it, i dont get why in visual studio or when i jsut copy and paste the entire code i just set the indicator1.value

Reply With Quote

Reply



futures io > > > > > additional references dll

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
ELEXCEL.dll: Where to download arjfca EasyLanguage Programming 4 July 1st, 2015 08:13 AM
Bernanke Indicates Fed Dissenters Wonít Impede Additional Asset Purchases kbit News and Current Events 3 August 11th, 2011 03:32 AM
Not sure where these script files belong / references - .dll - trouble grego NinjaTrader Programming 9 September 8th, 2010 09:44 AM
US Finds Most Oil From Spill Poses Little Additional Risk Quick Summary News and Current Events 0 August 4th, 2010 03:21 AM


All times are GMT -4. The time now is 04:00 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-11 in 0.13 seconds with 20 queries on phoenix via your IP 54.226.113.250