If anyone has an idea how to create this in the strategy builder or has sample code it would really be appreciated. Thank you!!!!!
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Script for entry on Next bar Open
Collapse
X
-
Script for entry on Next bar Open
Hello Ninja Traders. I was curious if anyone has or knows how to create a script where you can enter a position once the current bar closes and the next opens. I will like the order to be executed on the opening price of this next bar.
If anyone has an idea how to create this in the strategy builder or has sample code it would really be appreciated. Thank you!!!!! -
Hello hsnyc,
By default this is how a script will work.
Calculate by default is set to 'On bar close'.
Below is a public link to the help guide on Calculate.
As well as a public link to a video that describes this behavior.
As well as a link to a forum post with helpful information about getting started with NinjaScript.
Chelsea B.NinjaTrader Customer Service
-
Thank you Chelsea. I am new to the platform and my goal is to program a button, that when pressed it will execute a buy order if the following conditions are met.
1. Wait until the current bar closes.
2. Once the current bar closes, check if the close price of that bar is greater than the open.
3. If it is greater than the open, then buy the open price of the next candle.
I am using a Renko chart. Ideally I will like to program that script into a UI button so that it is activated upon a click.
I am a really new trader with NT8. So, if you can provide a link to a resource where this is shown in a step by step manner (if it exist) if not then any extra details on this would be greatly appreciated.
Thank you so much for your help.
Comment
-
Hello hsnyc,
I recommend starting with the training videos linked in the 'getting started with NinjaScript' link.
Adding buttons is advanced and cannot be done with the Strategy Builder.
Below is a public link to an example of adding a button.
Your button could set a bool to true. Then when OnBarUpdate updates if the bool is true the order is placed and the bool is set back to false.
Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by rbeckmann05, Yesterday, 06:48 PM
|
1 response
12 views
0 likes
|
Last Post
by bltdavid
Today, 05:43 AM
|
||
Started by llanqui, Today, 03:53 AM
|
0 responses
6 views
0 likes
|
Last Post
by llanqui
Today, 03:53 AM
|
||
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
10 views
0 likes
|
Last Post Today, 12:38 AM | ||
Started by AaronKoRn, Yesterday, 09:49 PM
|
0 responses
15 views
0 likes
|
Last Post
by AaronKoRn
Yesterday, 09:49 PM
|
||
Started by carnitron, Yesterday, 08:42 PM
|
0 responses
11 views
0 likes
|
Last Post
by carnitron
Yesterday, 08:42 PM
|
Comment