Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Reload Ninjascript via code

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

  • koganam
    replied
    Originally posted by neoikon View Post
    Right, that's exactly what I have, a toolbar with buttons, one of which performs some actions, then performs an "F5" to reload the chart. I am just looking for a way to NOT use SendKeys() due to the requirement that the hot key remains unchanged.

    Daniel
    Try using ChartControl() and Invalidate() the client rectangle.

    Leave a comment:


  • neoikon
    replied
    Originally posted by sledge View Post
    You can add your own button to the toolbar via ChartControl.

    But, you'd have to map that callback to the SendKeys
    Right, that's exactly what I have, a toolbar with buttons, one of which performs some actions, then performs an "F5" to reload the chart. I am just looking for a way to NOT use SendKeys() due to the requirement that the hot key remains unchanged.

    Daniel

    Leave a comment:


  • sledge
    replied
    Originally posted by neoikon View Post
    I use the SendKeys() method as described, but my concern is that this hot key can be changed by the user.

    I've used other SendKeys() in the past, but I've stopped and instead "clicked" (from within the code) the tools from the chart's toolbar. Unfortunately, there is no "refresh chart" anywhere on the toolbar for me to "click".

    Has anyone come up with a better way to do this from within code?

    Thanks!
    Daniel
    You can add your own button to the toolbar via ChartControl.

    But, you'd have to map that callback to the SendKeys

    Leave a comment:


  • neoikon
    replied
    I use the SendKeys() method as described, but my concern is that this hot key can be changed by the user.

    I've used other SendKeys() in the past, but I've stopped and instead "clicked" (from within the code) the tools from the chart's toolbar. Unfortunately, there is no "refresh chart" anywhere on the toolbar for me to "click".

    Has anyone come up with a better way to do this from within code?

    Thanks!
    Daniel

    Leave a comment:


  • jriverac
    replied
    Thank you all for the help!!!

    You pointed me on the right direction, I tested it on one chart and it worked!!!

    But, now I am worried about the focus if I apply this technique to a few charts... will it work? How can I assure that each chart has the focus when the F5 is sent? Any hints?

    Thanks again!!

    Juan

    Leave a comment:


  • zweistein
    replied
    yes , I am also using SendKeys in several occasions including reload ninjascript.
    It is working, but take care of Focus and such. Sometimes you must run a background thread with SendKeys()

    regards
    andreas www.zweisteintrading.eu

    Leave a comment:


  • mrlogik
    replied
    You can use the SendKeys() function in C#, and "send" and F5.

    Leave a comment:


  • koganam
    replied
    Originally posted by jriverac View Post
    Hallo,

    I wonder if there is a way to do a "reload ninjascript" (F5) on a chart programatically?

    For a number of reasons, I sometimes need to do it on my charts, but to do it manually is virtually impossible, any suggestions on how to achieve this via code?

    Thanks.

    Juan
    Take a look at this thread: http://www.ninjatrader.com/support/f...hlight=refresh

    Leave a comment:


  • jriverac
    replied
    Ok.

    Hopefully this gets implemented soon....

    Meanwhile, someone has any hints on any unsupported technique???

    Thanks

    Juan

    Leave a comment:


  • NinjaTrader_RyanM1
    replied
    Hi Juan,

    Unfortunately there is no supported technique for calling Reload NinjaScript programatically. Thank you for the suggestion. We have added this to our internal feature tracking system with ID # 830.
    Last edited by NinjaTrader_RyanM1; 04-04-2011, 10:03 AM.

    Leave a comment:


  • jriverac
    started a topic Reload Ninjascript via code

    Reload Ninjascript via code

    Hallo,

    I wonder if there is a way to do a "reload ninjascript" (F5) on a chart programatically?

    For a number of reasons, I sometimes need to do it on my charts, but to do it manually is virtually impossible, any suggestions on how to achieve this via code?

    Thanks.

    Juan

Latest Posts

Collapse

Topics Statistics Last Post
Started by GussJ, 03-04-2020, 03:11 PM
11 responses
3,227 views
0 likes
Last Post xiinteractive  
Started by andrewtrades, Today, 04:57 PM
1 response
13 views
0 likes
Last Post NinjaTrader_Manfred  
Started by chbruno, Today, 04:10 PM
0 responses
7 views
0 likes
Last Post chbruno
by chbruno
 
Started by josh18955, 03-25-2023, 11:16 AM
6 responses
440 views
0 likes
Last Post Delerium  
Started by FAQtrader, Today, 03:35 PM
0 responses
12 views
0 likes
Last Post FAQtrader  
Working...
X