How to auto restart running indicator? - futures io
futures io futures trading



How to auto restart running indicator?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Erez with 6 posts (1 thanks)
    2. looks_two Big Mike with 3 posts (4 thanks)
    3. looks_3 Laserdan with 2 posts (3 thanks)
    4. looks_4 Zondor with 2 posts (3 thanks)
      Best Posters
    1. looks_one Zondor with 1.5 thanks per post
    2. looks_two Laserdan with 1.5 thanks per post
    3. looks_3 Big Mike with 1.3 thanks per post
    4. looks_4 trs3042 with 1 thanks per post
    1. trending_up 3,141 views
    2. thumb_up 12 thanks given
    3. group 3 followers
    1. forum 13 posts
    2. attach_file 1 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

(If you already have an account, login at the top of the page)

 
Search this Thread
 

How to auto restart running indicator?

(login for full post details)
  #1 (permalink)
Haifa,,,
 
Experience: Intermediate
Platform: NinjaTrader
Broker: CQG
Trading: Futures
 
Posts: 186 since Mar 2011
Thanks: 181 given, 869 received

I'm looking for a way in code, to cause an indicator to restart (similar to pressing F5) when specific condition occurs, any ideas?

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
NT8 indicator to simulate a Funding Evaluation where to …
NinjaTrader
COTbase for quant trading?
Elite Algorithmic NinjaTrader Trading
Indicators for pair trading MES and M2K
Platforms and Indicators
ZigZag with Depth and Backstep
EasyLanguage Programming
Where can I find Cost to Trade and Book Depth info?
Emini and Emicro Index
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Battlestations: Show us your trading desks!
137 thanks
Big Mike in Ecuador
34 thanks
Want your NinjaTrader indicator created, free?
32 thanks
Saturday Morning Market Replay!
20 thanks
Selling Options on Futures?
19 thanks
 
(login for full post details)
  #3 (permalink)
North Carolina
 
Experience: Beginner
Platform: Ninja Trader
Broker: Ninja Trader Broker / Continuum
Trading: ES
 
Posts: 57 since Jun 2009
Thanks: 4 given, 57 received


have you tried

SendKeys.Send("{F5}");

Laserdan
Follow me on Twitter Reply With Quote
The following 3 users say Thank You to Laserdan for this post:
 
(login for full post details)
  #4 (permalink)
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,790 since Jun 2009
Thanks: 32,314 given, 97,610 received

Bring focus to window, then use SendKeys.

Mike

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
The following 2 users say Thank You to Big Mike for this post:
 
(login for full post details)
  #5 (permalink)
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,790 since Jun 2009
Thanks: 32,314 given, 97,610 received

LOL nice timing.

Mike

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #6 (permalink)
North Carolina
 
Experience: Beginner
Platform: Ninja Trader
Broker: Ninja Trader Broker / Continuum
Trading: ES
 
Posts: 57 since Jun 2009
Thanks: 4 given, 57 received


Laserdan
Follow me on Twitter Reply With Quote
 
(login for full post details)
  #7 (permalink)
Haifa,,,
 
Experience: Intermediate
Platform: NinjaTrader
Broker: CQG
Trading: Futures
 
Posts: 186 since Mar 2011
Thanks: 181 given, 869 received

Thanks, this is good option, but I want to reload only specified indicator and not all the indicator in chart, any additional ideas?


Laserdan View Post
have you tried

SendKeys.Send("{F5}");


Started this thread Reply With Quote
 
(login for full post details)
  #8 (permalink)
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,790 since Jun 2009
Thanks: 32,314 given, 97,610 received

There might be a way to call Initialize()...

Mike

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
The following 2 users say Thank You to Big Mike for this post:
 
(login for full post details)
  #9 (permalink)
Haifa,,,
 
Experience: Intermediate
Platform: NinjaTrader
Broker: CQG
Trading: Futures
 
Posts: 186 since Mar 2011
Thanks: 181 given, 869 received

Thanks @Big Mike I'll test it.



Big Mike View Post
There might be a way to call Initialize()...

Mike


Started this thread Reply With Quote
 
(login for full post details)
  #10 (permalink)
Haifa,,,
 
Experience: Intermediate
Platform: NinjaTrader
Broker: CQG
Trading: Futures
 
Posts: 186 since Mar 2011
Thanks: 181 given, 869 received



trs3042 View Post
To anyone:

Just purchased a new laptop with Windows 7 64 bit operating system. Loaded the newest version of NT7 and here's my problem. When I press F5 to compile an indicator nothing happens, it doesn't compile the way my Windows XP 32 bit operating system did. It doesn't compile at all. Do I need to do something different with Windows 7??? Suggestions please.

Thank you,

Rick

@ Big Mike.....Hope this is the right thread for this post.

This is not the right thread for your post, I'll try to help.

Open any indicator and right click on your mouse and select compile, also look if you have F5 text in right side of compile text, if not go to NT7 menu Tools > Hot Key Manager > Ninja Script Editor. And select F5 for compile.

Attached Thumbnails
Click image for larger version

Name:	F5.png
Views:	34
Size:	11.5 KB
ID:	63747  
Started this thread Reply With Quote
The following user says Thank You to Erez for this post:
 
(login for full post details)
  #11 (permalink)
Portland Oregon, United States
 
Experience: Beginner
Platform: NinjatraderŽ
Broker: CQG, Kinetick
Trading: Gameplay KlownbineŽ Trading of Globex
 
Zondor's Avatar
 
Posts: 1,347 since Jul 2009
Thanks: 1,245 given, 2,721 received

Try this. Not guaranteed!

Call a procedure that gets rid of all the existing DataSeries and Plot objects by using the Dispose() method, then calls the Initialize() and OnStartUp() (if used) procedures.

 
Code
private void ResetIndicator()
{
     if(DataSeries1   != null) DataSeries1.Dispose();  // Dispose of all DataSeries objects other than Plots
     if(Values[0]     != null) Values[0].Dispose();       //  Dispose of all Plots

     Initialize();
     OnStartUp()   // only if indicator has an OnStartUp procedure
}

Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
The following 2 users say Thank You to Zondor for this post:
 
(login for full post details)
  #12 (permalink)
Haifa,,,
 
Experience: Intermediate
Platform: NinjaTrader
Broker: CQG
Trading: Futures
 
Posts: 186 since Mar 2011
Thanks: 181 given, 869 received

Thanks @Zondor, assuming this method works, do you know if the indicator will run again through (what I actually need) all the history bars like in "reload ninja script? Or it goes directly to the current bar?



Zondor View Post
Try this. Not guaranteed!

Call a procedure that gets rid of all the existing DataSeries and Plot objects by using the Dispose() method, then calls the Initialize() and OnStartUp() (if used) procedures.

 
Code
private void ResetIndicator()
{
     if(DataSeries1   != null) DataSeries1.Dispose();  // Dispose of all DataSeries objects other than Plots
     if(Values[0]     != null) Values[0].Dispose();       //  Dispose of all Plots
 
     Initialize();
     OnStartUp()   // only if indicator has an OnStartUp procedure
}


Started this thread Reply With Quote
 
(login for full post details)
  #13 (permalink)
Portland Oregon, United States
 
Experience: Beginner
Platform: NinjatraderŽ
Broker: CQG, Kinetick
Trading: Gameplay KlownbineŽ Trading of Globex
 
Zondor's Avatar
 
Posts: 1,347 since Jul 2009
Thanks: 1,245 given, 2,721 received


Quoting 
Thanks @Zondor, assuming this method works, do you know if the indicator will run again through (what I actually need) all the history bars like in "reload ninja script? Or it goes directly to the current bar?

My guess is that if the method I suggested does work, the historical bars will reload. Need to try it and see what happens.

Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to Zondor for this post:
 
(login for full post details)
  #14 (permalink)
Haifa,,,
 
Experience: Intermediate
Platform: NinjaTrader
Broker: CQG
Trading: Futures
 
Posts: 186 since Mar 2011
Thanks: 181 given, 869 received


Zondor View Post
My guess is that if the method I suggested does work, the historical bars will reload. Need to try it and see what happens.

Thanks, I'll test it.

Started this thread Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > How to auto restart running indicator?


Last Updated on February 25, 2012


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 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