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 Mupulen, 04-16-2024, 11:26 AM
|
1 response
54 views
0 likes
|
Last Post
by techbech
Today, 03:03 PM
|
||
Started by Quanto, Today, 02:17 PM
|
1 response
7 views
0 likes
|
Last Post Today, 02:43 PM | ||
Started by cmtjoancolmenero, 04-25-2024, 03:58 PM
|
24 responses
125 views
0 likes
|
Last Post Today, 02:36 PM | ||
Started by Skifree, Today, 11:21 AM
|
3 responses
11 views
0 likes
|
Last Post Today, 02:14 PM | ||
Started by manueldecastro, Today, 01:16 PM
|
3 responses
14 views
0 likes
|
Last Post Today, 01:50 PM |
Comment