• 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

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, 09: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 martyn73, Today, 05:27 PM
0 responses
5 views
0 likes
Last Post martyn73  
Started by MichaelAlexander, 02-22-2017, 05:06 AM
5 responses
1,402 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by walter739, Today, 11:56 AM
3 responses
10 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by kevinfloresz, Today, 09:46 AM
4 responses
29 views
0 likes
Last Post kevinfloresz  
Started by digibob, 12-13-2019, 10:01 PM
7 responses
20 views
0 likes
Last Post NinjaTrader_ChrisL  
Working...
X