New Drop Down in Toolbar - NinjaTrader Programming | futures io social day trading
futures io futures trading


New Drop Down in Toolbar
Updated: Views / Replies:5,041 / 27
Created: by timmyb Attachments:2

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

New Drop Down in Toolbar

  #1 (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

New Drop Down in Toolbar

Ok this is driving me insane I have a drop down i got added to the toolbar but I cant seem to get a event arg to work right.

public void Picked(object sender, EventArgs e)
{





if (mycomboBox1.MouseDown == true)



{
MessageBox.Show("holy cow it works");
}

}


this was my last attemmpt. what i wanted was for it to do "something" when I click the drop down and choose a setting. I tried .dropdown .droppeddown. I got it to finally work but it was only working onbarupdate and then firing everytime there was a update.

and yes i do have it in the form setup elsewhere. i just cant seem to get it to acknowledge it being clicked etc



Heeellllllppp



thanks

tim

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

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


what event you triggered. try the selectedindexchanged event

Reply With Quote
The following user says Thank You to bukkan for this post:
 
  #4 (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 firing part


 
Code
#region Toolbar Combo Box Code, remember to add dispose method and add to private ToolStripComboBox mycomboBox1;
            
            mycomboBox1 = new ToolStripComboBox ();
            mycomboBox1.Items.AddRange(new object[] 
            {
            "Min,Max,Delta",
            "Bannanas",
            "Cucumbers"
            });
            mycomboBox1.Name = "B4";
            mycomboBox1.Size = new System.Drawing.Size(116, 21);
            mycomboBox1.SelectedIndexChanged += new EventHandler (Picked);
            
            #endregion
then here is next code

 
Code
public void Picked(object sender, EventArgs e)
        {
        
        
            
            
            
            if (mycomboBox1.Selected)
            {
            MessageBox.Show("holy cow it works");    
            }
        
        }

thanks again bukken, i was hoping you would be the one to reply basically I am trying to add drop downs for the new ladder version I am working on on the toolbar. So basically If "bannanas" is selected do this etc. To replace some of my hotkey functionality.

The above works each time i click the combo box choices. Now i think I have to convert the text to string to add which one is selected. I read something about using a value like 0,1,2. Anyway I am knew to this windows form thing. First thing I ever did was 3 days ago so I am glad you are bearing with.

I tried this but it compiles and doesnt work.

 
Code
public void Picked(object sender, EventArgs e)
        {
        
        
            string SelectedString = mycomboBox1.Text;
            
            
            if (mycomboBox1.Selected && SelectedString == "bannanas")
            {
            MessageBox.Show("holy cow it works");    
            }
        
        }
thanks again for the guidance. I think i am grasping things pretty good for a few days but i know some things you must look at and go

But then I am a car mechanic and when I rebuild and engine and port heads etc you probably would be stadning there going "valve clearance?"

Reply With Quote
The following user says Thank You to timmyb for this post:
 
  #5 (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

Wooohooo I got it

 
Code
public void Picked(object sender, EventArgs e)
        {
        
        
            string SelectedString = mycomboBox1.Text;
            
            
            if (mycomboBox1.SelectedItem == "Bannanas")
            
            {
            
                //if (SelectedString == "bannanas")    
                //{
                MessageBox.Show("holy cow it works");
            //    }
            
            }
        
        }
Figured i would post it here for those who may find this

Reply With Quote
The following 2 users say Thank You to timmyb for this post:
 
  #6 (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

One other question I have is that if I tie this to a bool, when users save a template will it be set correctly on load??

basically I am adding drop downs to top of toolbar to adjust gomladder functions on the fly, I notice when i press F5 the drop down reloads to blank state. I will throw it in my code and see how ti turns out

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

you may also try

if (mycbox.SelectedIndex == 0)
{
//do something
}
else if (mycbox.SelectedIndex == 1)
{
//do something
}

Reply With Quote
The following user says Thank You to bukkan for this post:
 
  #8 (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


bukkan View Post
you may also try

if (mycbox.SelectedIndex == 0)
{
//do something
}
else if (mycbox.SelectedIndex == 1)
{
//do something
}

is 0 always the first text in the drop down?? and so on and so forth?? or do you need to set that.??

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


timmyb View Post
is 0 always the first text in the drop down?? and so on and so forth?? or do you need to set that.??

yes 0 is the first item, and is a zero base index.

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


Still fiddling, waiting for Santa to come. Curious if you guys know how to add a drop down box with checkboxes. I cant seem to find it as a choice in toolbar. I see natively ninja has it. Merry Christmas guys

Reply With Quote

Reply



futures io > > > > > New Drop Down in Toolbar

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
Adding a 2nd Toolbar on a NT chart? fosch NinjaTrader Programming 6 October 6th, 2016 01:38 PM
Custom Toolbar Button for NT7 protrader007 The Elite Circle 38 February 24th, 2013 09:38 AM
Asia Stocks Drop at Open; Some See Opportunities Quick Summary News and Current Events 0 August 4th, 2011 10:00 PM
Toolbar Buttons tm10 Elite Automated Trading 8 March 21st, 2011 02:30 PM
How the Drop in Home Sales May Actually Be a Good Thing Quick Summary News and Current Events 0 June 22nd, 2010 07:40 PM


All times are GMT -4. The time now is 07:13 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-16 in 0.12 seconds with 20 queries on phoenix via your IP 54.226.113.250