how to run ninjascript automatically at specific time - NinjaTrader | futures io social day trading
futures io futures trading


how to run ninjascript automatically at specific time
Updated: Views / Replies:590 / 6
Created: by Clydexi Attachments:1

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 
Thread Tools Search this Thread
 

how to run ninjascript automatically at specific time

  #1 (permalink)
Elite Member
Dallas
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: Emini ES
 
Posts: 9 since Jan 2016
Thanks: 1 given, 1 received

how to run ninjascript automatically at specific time

I wrote a indicator script which pulls data from other resources. It requests data when the indicator loads. I wonder how to let the script run every 1 hour or run at specific time automatically instead of loading the indicator manually.

Reply With Quote
 
  #2 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,489 since Sep 2013
Thanks: 1,704 given, 3,694 received
Forum Reputation: Legendary

You can do the same in the OnBarUpdate() method, add some extra filter code where you sotre the hour and do only the logic if the time since last Bar is more than one hour. It is not exact, because if there is no bar, it code will not trigger, but it might be the easiest way to quickly get to result.

Reply With Quote
The following user says Thank You to rleplae for this post:
 
  #3 (permalink)
Trading Apprentice
Moscow
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: 6E
 
Posts: 10 since Mar 2016
Thanks: 1 given, 16 received


Or you can use the timers.

Reply With Quote
The following user says Thank You to NTDeveloper for this post:
 
  #4 (permalink)
Elite Member
Dallas
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: Emini ES
 
Posts: 9 since Jan 2016
Thanks: 1 given, 1 received


rleplae View Post
You can do the same in the OnBarUpdate() method, add some extra filter code where you sotre the hour and do only the logic if the time since last Bar is more than one hour. It is not exact, because if there is no bar, it code will not trigger, but it might be the easiest way to quickly get to result.

Thanks! Could you refer any indicators in futures.io which use the OnBarUpdate() method?

Reply With Quote
The following user says Thank You to Clydexi for this post:
 
  #5 (permalink)
Elite Member
Dallas
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: Emini ES
 
Posts: 9 since Jan 2016
Thanks: 1 given, 1 received


NTDeveloper View Post
Or you can use the timers.

Could you give any reference to it as I haven't used it before? thanks

Reply With Quote
 
  #6 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,489 since Sep 2013
Thanks: 1,704 given, 3,694 received
Forum Reputation: Legendary


Clydexi View Post
Thanks! Could you refer any indicators in futures.io which use the OnBarUpdate() method?

Most of the indicators do
or just go to documents\ninjatrader 7\bin\custom\indicator

open the first file @ADL.cs

you wil see the OnBarUpdate

 
Code
     protected override void OnBarUpdate()
        {
            AD.Set((CurrentBar == 0 ? 0 : AD[1]) + (High[0] != Low[0] ? (((Close[0] - Low[0]) - (High[0] - Close[0])) / (High[0] - Low[0])) * Volume[0] : 0));
        }
In your own indicator, you can have this function also
it will be called every time the bar gets updated

You then call play with the time, so that your logic only gets triggered when you want

or you can play with the timers as mentioned also

Reply With Quote
 
  #7 (permalink)
Trading Apprentice
Moscow
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: 6E
 
Posts: 10 since Mar 2016
Thanks: 1 given, 16 received


Clydexi View Post
Could you give any reference to it as I haven't used it before? thanks

See attach

Attached Files
Register to download File Type: zip SampleCustomEvents_NT7.zip (3.2 KB, 11 views)
Reply With Quote
The following 2 users say Thank You to NTDeveloper for this post:

Reply



futures io > > > > how to run ninjascript automatically at specific time

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Run code in nt7 at specific time each day pxp333 NinjaTrader 3 May 24th, 2015 04:41 PM
H/L FOR A SPECIFIC PERIOD OF TIME FKtrader NinjaTrader 2 October 20th, 2013 12:30 PM
How to cancel an order at a specific time sburtt NinjaTrader Programming 3 August 15th, 2013 02:58 AM
is it possible to scroll to a specific bar through Ninjascript/Keyboard shortcuts? ejtrader NinjaTrader Programming 2 July 30th, 2012 11:57 AM
Price marker at specific time meyer99 NinjaTrader 5 July 22nd, 2011 08:04 PM


All times are GMT -4. The time now is 10:37 PM.

Copyright © 2017 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
Page generated 2017-12-13 in 0.11 seconds with 34 queries on phoenix via your IP 54.226.113.250