NexusFi: Find Your Edge


Home Menu

 





ChartTrader & Order Button size - width


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one monpere with 15 posts (28 thanks)
    2. looks_two ThatManFromTexas with 9 posts (18 thanks)
    3. looks_3 futuretrader with 8 posts (0 thanks)
    4. looks_4 lolu with 6 posts (0 thanks)
      Best Posters
    1. looks_one bukkan with 4.3 thanks per post
    2. looks_two ThatManFromTexas with 2 thanks per post
    3. looks_3 aligator with 2 thanks per post
    4. looks_4 monpere with 1.9 thanks per post
    1. trending_up 23,980 views
    2. thumb_up 65 thanks given
    3. group 23 followers
    1. forum 66 posts
    2. attach_file 6 attachments




 
Search this Thread

ChartTrader & Order Button size - width

  #11 (permalink)
 bukkan 
Calcutta, India
 
Experience: Intermediate
Platform: ArthaChitra
Posts: 278 since Jun 2009
Thanks Given: 161
Thanks Received: 271

yes u can, hopefully, do anything.

edit: the dom might be a bit difficult, may be with win32apis cant say for sure.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Futures True Range Report
The Elite Circle
ZombieSqueeze
Platforms and Indicators
Ninja Mobile Trader VPS (ninjamobiletrader.com)
Trading Reviews and Vendors
Exit Strategy
NinjaTrader
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
44 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #12 (permalink)
 
josh's Avatar
 josh 
Georgia, US
Legendary Market Wizard
 
Experience: None
Platform: SC
Broker: Denali+Rithmic
Trading: ES, NQ, YM
Posts: 6,216 since Jan 2011
Thanks Given: 6,752
Thanks Received: 18,136


DavidHP View Post
I've asked NT many times for a way to reduce the size of the DOM but each time they say it is not possible.

That's their standard answer for everything.

Reply With Quote
  #13 (permalink)
TradingGuy
Connecticut
 
Posts: 15 since Jan 2011
Thanks Given: 1
Thanks Received: 8


Another approach is to add the buttons to the tool bar, this way chart trader is gone and you have the basic controls you want.

Regards,
Guy

Reply With Quote
  #14 (permalink)
 jsengxx 
POrtugal
 
Posts: 52 since Nov 2009

I´am not so good at programming. Do I have to put the code to an indicator? Please explane.

Can you program a buy and sel button at the close of the current bar or open next bar?

Reply With Quote
  #15 (permalink)
TradingGuy
Connecticut
 
Posts: 15 since Jan 2011
Thanks Given: 1
Thanks Received: 8


jsengxx View Post
I´am not so good at programming. Do I have to put the code to an indicator? Please explane.

Can you program a buy and sel button at the close of the current bar or open next bar?


Yes, almost anything can be done, it's a matter of C# coding. Check out this thread for some examples. I'm sure you will find others if you search.




Regards,
Guy

Reply With Quote
Thanked by:
  #16 (permalink)
 fosch 
Bethesda, Maryland
 
Experience: Intermediate
Platform: NinjaTrader
Trading: stocks
Posts: 5 since May 2011
Thanks Given: 36
Thanks Received: 2


bukkan View Post
one can easily resize the buttons etc. they are just buttons, and standard windows control isnt it.

 
Code
for (int i = 0;i <= ChartControl.Controls.Count - 1;i++)
            {
               if (ChartControl.Controls[i] == ChartControl.Controls["pnlChartTrader"])
                {
                    Panel p = (Panel)ChartControl.Controls["pnlChartTrader"];
 
                    for (int j = 0;j <= p.Controls.Count - 1;j++)
                    {
                        if (p.Controls[j] == ChartControl.Controls["pnlChartTrader"].Controls["ctrChartTraderControl"])
                        {
                            Control ctrader = ChartControl.Controls["pnlChartTrader"].Controls["ctrChartTraderControl"];
 
                            for (int k = 0;k <= ctrader.Controls.Count - 1;k++)
                            {
                                if (ctrader.Controls[k].Name == "btnBuyMarket")
                                {
                                    Button btnMkt = (Button)ctrader.Controls[k];
                                    btnMkt.Width = (int)(btnMkt.Width / 2);
                                }
                             }
                        }
 
                    }
                }
 
            }
the above code resizes the Buy Market button to half

run the code once. so put it in OnStartUp()

Hello Bukkan,

Great example. Is it possible to hide some of the buttons on a charts toolbar? Basically, I've added a few buttons, but they take up too much room to the right of the Ninja buttons. So, I would like to hide their buttons from view. Seeing your code above leads me to believe that some sort of similar technique could be used to hide the buttons? How do you even know what the reference names for the buttons are? I see you referenced
"pnlChartTrader" above, how did you get a hold of that name? Many thanks in advance.

fosch

Reply With Quote
Thanked by:
  #17 (permalink)
 
monpere's Avatar
 monpere 
Bala, PA, USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus, IB
Trading: SPY, Oil, Euro
Posts: 1,854 since Jul 2010
Thanks Given: 300
Thanks Received: 3,371


fosch View Post
Hello Bukkan,

Great example. Is it possible to hide some of the buttons on a charts toolbar? Basically, I've added a few buttons, but they take up too much room to the right of the Ninja buttons. So, I would like to hide their buttons from view. Seeing your code above leads me to believe that some sort of similar technique could be used to hide the buttons? How do you even know what the reference names for the buttons are? I see you referenced
"pnlChartTrader" above, how did you get a hold of that name? Many thanks in advance.

fosch

Check out the ChartButtons indicator in the download section as an alternative. I use it exclusively, and can use it with or without chart trader visible or enabled, and no need to alter NinjaTrader internal code.

Attached Thumbnails
Click image for larger version

Name:	chartbuttons.jpg
Views:	420
Size:	59.2 KB
ID:	56055  
Reply With Quote
Thanked by:
  #18 (permalink)
 
lolu's Avatar
 lolu 
Lagos, Nigeria
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader, SierraChart
Trading: Euro Currency & Oil
Frequency: Daily
Duration: Hours
Posts: 2,552 since Jun 2009
Thanks Given: 1,049
Thanks Received: 1,678


monpere View Post
Check out the ChartButtons indicator in the download section as an alternative. I use it exclusively, and can use it with or without chart trader visible or enabled, and no need to alter NinjaTrader internal code.

What's your code(s) for BE (BreakEven) ? The ChartButtons indicator in the download section does not contain the codes for the buttons press/trigger actions.

Lolu

Visit my NexusFi Trade Journal Reply With Quote
  #19 (permalink)
 
monpere's Avatar
 monpere 
Bala, PA, USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus, IB
Trading: SPY, Oil, Euro
Posts: 1,854 since Jul 2010
Thanks Given: 300
Thanks Received: 3,371


lolu View Post
What's your code(s) for BE (BreakEven) ? The ChartButtons indicator in the download section does not contain the codes for the buttons press/trigger actions.

Lolu

You have to write your own code for the button actions. Most of my order buttons control a separately running strategy. The break even button tells the strategy to do something like "SetStopLoss(CalculationMode.Price, entryPrice +(2*TickSize)"

Reply With Quote
Thanked by:
  #20 (permalink)
 
lolu's Avatar
 lolu 
Lagos, Nigeria
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader, SierraChart
Trading: Euro Currency & Oil
Frequency: Daily
Duration: Hours
Posts: 2,552 since Jun 2009
Thanks Given: 1,049
Thanks Received: 1,678



monpere View Post
You have to write your own code for the button actions. Most of my order buttons control a separately running strategy. The break even button tells the strategy to do something like "SetStopLoss(CalculationMode.Price, entryPrice +(2*TickSize)"

Is SetStopLoss(CalculationMode.Price, entryPrice +(2*TickSize) not a strategy code ?

Pls, could you give a typical example of a strategy call for BE ... the code(s) that call the strategy from within the ChartButtons indicator "to do something like SetStopLoss(CalculationMode.Price, entryPrice +(2*TickSize)".

What I want to do is code a BE action (just like the CLOSE action) into terratec's bTPA indicator.

Lolu

Visit my NexusFi Trade Journal Reply With Quote




Last Updated on February 25, 2014


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts