I wanted to know if its possible to set up a strategy where the order is triggered as soon as market opens at 6pm est along with Limit Order, take profit, trailing stop order as well as a time limit on if it Limit Order doesn't hit to cancel the order..
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
Order Entry Triggered at Market Open
Collapse
X
-
Order Entry Triggered at Market Open
Sorry I am a complete newbie at ATM or any kind of NT8 programming
I wanted to know if its possible to set up a strategy where the order is triggered as soon as market opens at 6pm est along with Limit Order, take profit, trailing stop order as well as a time limit on if it Limit Order doesn't hit to cancel the order..Tags: None
-
Hello TorontoGuy,
Thank you for writing in.
The Strategy Builder could be used to create a strategy that checks if the Time is 6:00 PM and sets a bool variable named MyBool to true. Then we check if Position.MarketPosition == MarketPosition.Flat and if MyBool == true and if the Time is <= a user-defined Time variable followed by calling EnterLongLimit. Then we create a third set that checks if the Time is > our user-defined Time variable and sets the bool back to false for the next day. When the order is filled, a Profit Target and Trailing Stop is placed. If the order is not filled by a user-defined Time, the order will be canceled.
The best way to begin learning NinjaScript is to use the Strategy Builder. With the Strategy Builder, you can set up conditions and variables and then see the generated code in the NinjaScript Editor by clicking the View Code button.
Here is a link to our publicly available training videos, 'Strategy Builder 301' for you to view at your own convenience.
Strategy Builder 301 — https://www.youtube.com/watch?v=_KQF2Sv27oE&t=13s
Also, here is a link to our help guide on the Strategy Builder - https://ninjatrader.com/support/help...gy_builder.htm
I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript:
https://ninjatrader.com/support/help..._resources.htm
If you are new to C#, to get a basic foundation for the concepts and syntax used in NinjaScript I would recommend this section of articles in our help guide first:
https://ninjatrader.com/support/help...g_concepts.htm
And the MSDN (Microsft Developers Network) C# Language Reference.
https://ninjatrader.com/support/help...erence_wip.htm
Please see the attached example strategy which demonstrating how this could be accomplished.
Let us know if we may assist further.Attached FilesBrandon H.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Spiderbird, Today, 12:15 PM
|
0 responses
3 views
0 likes
|
Last Post
by Spiderbird
Today, 12:15 PM
|
||
Started by lorem, Yesterday, 09:18 AM
|
3 responses
13 views
0 likes
|
Last Post
by lorem
Today, 12:11 PM
|
||
Started by cmtjoancolmenero, Yesterday, 03:58 PM
|
12 responses
42 views
0 likes
|
Last Post Today, 12:09 PM | ||
Started by FrazMann, Today, 11:21 AM
|
0 responses
6 views
0 likes
|
Last Post
by FrazMann
Today, 11:21 AM
|
||
Started by geddyisodin, Yesterday, 05:20 AM
|
8 responses
52 views
0 likes
|
Last Post Today, 10:45 AM |
Comment