• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Toolbar Buttons

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • alfa123
    started a topic Toolbar Buttons

    Toolbar Buttons

    I got this code from e mini-fools site and compile in NT7.there were some errors in it but fixed.What i was looking ,,,have some buttons on top of chart to turn on/off strategy,,instead of opening and using enable/disable function.Specially when news are comming OR FOMC rate annoucment is due and b4 market hit u,,,just turn on or off by one click.Plz use it on your own risk.NO responsibility on my side.Its my first
    contribution in file sharing with a file.THANKS
    Attached Files

  • snaphook
    replied
    How does one drag a button w/o clicking it?

    I suspect if you put a button in a dialog form, set it to be on top, you could then move it around anywhere you'd like. Take a look at my Notes Panel or WorkspaceChanger in NT7 Indies for examples of opening a form.
    Last edited by snaphook; 09-27-2011, 07:23 AM.

    Leave a comment:


  • cassb
    replied
    Thanks for all this work, guys!

    Does anyone know if a button on the chart panel could be made click-draggable around the panel? Or can it only be in one fixed position?

    Bryan

    Leave a comment:


  • snaphook
    replied
    It needs something added to trigger a trade such as a MA crossover. Right now it places trades if Close = High or Low of Bar. I put these in as dummy requirements for illustration only. Check lines 163 and 165.

    Edit: I just noticed an oversight.

    Lines 177 should be:
    if(trade.Contains("L") && btnLongEntry.Text == "Enter Long")

    and 184 should be:
    if(trade.Contains("S") && btnShortEntry.Text == "Sell Short")
    Last edited by snaphook; 09-13-2011, 05:50 AM.

    Leave a comment:


  • woodies
    replied
    @snaphook

    Thanks for sharing toolbar code for buttons.

    Can it be used as is or it needs addition of actions for trade managment after OnClick event?

    When I place it on a chart, it spontaneously opens orders.

    Leave a comment:


  • fosch
    replied
    All I did was add,

    private System.Windows.Forms.ToolStrip ts2 = new ToolStrip();

    to #region Variables

    and then,

    ChartControl.Controls.Add(ts2);

    to OnStartUp()

    Leave a comment:


  • snaphook
    replied
    What do you add to create a new toolbar. I'd be interested.

    Leave a comment:


  • fosch
    replied
    Thanks Snaphook,

    Yeah. I've tried many permutations. I actually am able to add a toolbar, but it is always above the Ninja Toolbar, and I cannot add buttons to it. Also, once added. I cannot get rid of it like I can the buttons. Real bummer.

    Thanks for your reply.

    fosch

    Leave a comment:


  • snaphook
    replied
    I've never tried to add a new toolbar.

    I am not really a programmer, but a follower of examples and a copy cat and sometimes it is tough to follow some of the examples on the net and translate them to NT.

    I'm not sure how, or if, you can do it. I think I read a post by one of the NT guys, wonder why there are no gals, that NT was written in such a manner that you can not add new toolbars.

    good luck.

    Leave a comment:


  • fosch
    replied
    Hi snaphook,

    I've been trying to move your buttons and separtors to a 2nd toolbar (just below the Ninja toolbar). But unfortunately, I cannot get it to work.

    I've been told that I need to add:

    Toolstrip ts = new ToolStrip();
    ChartControl.Controls.Add(ts);

    I just can't figure out where to place this code? Do you know how to do it in your code? Any assistance you could provide would be most greatly appreciated.

    fosch

    Leave a comment:


  • Baseheadz
    replied
    Hi I was wondering if anybody was having issues with this strategy in NT 7.01000.6?

    I started the strategy, immediately turned off the auto-trading so that the "Manual" was in red and then I turned off long entries as well. Then the strategy started to taking long trades on it's own.

    Is this an issue that only I'm seeing?

    Leave a comment:


  • alfa123
    replied
    Thanks for your comments.Buttons always work with tool bar.this is a strategy not an indicator.But may be possible to modify in future.

    Leave a comment:


  • tonynt
    replied
    Snaphook,

    great work. Thanks for sharing this. Did you ever think about changing it this way so that you can add the buttons vertically in the chart? (Because the toolbar is getting so extended and the chart too)

    Just an idea.

    Thanks again and best regards
    Tony

    Leave a comment:


  • alfa123
    replied
    nice work.carry on

    Leave a comment:


  • snaphook
    replied
    Another update

    This adds:
    1) A Flatten button that immediately closes open positions,
    2) separators between the buttons,
    3) a confirmation Message Box when entering Auto Trading from Manual trading.
    Attached Files

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by samir, Yesterday, 11:35 PM
0 responses
4 views
0 likes
Last Post samir
by samir
 
Started by iceman2018, Yesterday, 09:56 PM
2 responses
10 views
0 likes
Last Post samir
by samir
 
Started by [email protected], Yesterday, 10:13 PM
0 responses
4 views
0 likes
Last Post garzon.javier.e@gmail.com  
Started by iceman2018, Yesterday, 09:51 PM
0 responses
6 views
0 likes
Last Post iceman2018  
Started by n8dogg59, Yesterday, 06:55 AM
2 responses
18 views
0 likes
Last Post n8dogg59  
Working...
X