Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order Entry Triggered at Market Open

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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..

    #2
    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 Files
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    62 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    134 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X