Trading Articles
Article Categories
Article Tools
How to auto restart running indicator?
Updated February 25, 2012
Top Posters
looks_one
Erez
with 6 posts (1 thanks)
looks_two
Big Mike
with 3 posts (4 thanks)
looks_3
Laserdan
with 2 posts (3 thanks)
looks_4
Zondor
with 2 posts (3 thanks)
Best Posters
looks_one
Zondor
with 1.5 thanks per post
looks_two
Laserdan
with 1.5 thanks per post
looks_3
Big Mike
with 1.3 thanks per post
looks_4
trs3042
with 1 thanks per post
trending_up
3,141 views
thumb_up
12 thanks given
group
3 followers
forum
13 posts
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)
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?
Can you help answer these questions from other members on futures io?
Best Threads (Most Thanked) in the last 7 days on futures io
(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}");
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
Posts: 49,790 since Jun 2009
Thanks: 32,314 given,
97,610
received
Bring focus to window, then use SendKeys.
Mike
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
Posts: 49,790 since Jun 2009
Thanks: 32,314 given,
97,610
received
LOL nice timing.
Mike
(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
(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
have you tried
SendKeys.Send("{F5}");
(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
Posts: 49,790 since Jun 2009
Thanks: 32,314 given,
97,610
received
There might be a way to call Initialize()...
Mike
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
There might be a way to call Initialize()...
Mike
(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
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.
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
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
}
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
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
}
(login for full post details)
#13 (permalink )
Portland Oregon, United States
Experience: Beginner
Platform: NinjatraderŽ
Broker: CQG, Kinetick
Trading: Gameplay KlownbineŽ Trading of Globex
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.
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
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.
Last Updated on February 25, 2012
Right now
Ongoing
Right now
March
Register to Attend
Elite only
Coming soon
April