Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to code signal bar entry

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

    How to code signal bar entry

    Hi,

    i would like to to know, does anyone have coded a script that can enter a trade based on the development of a good signal bar, as shown in the picutre?

    That is, if the bar opens, ticks at least one tick below the previouis bar (ideally more), and finishes near its high (within 1-2 ticks) above EMA, enter long.
    Attached Files

    #2
    Hello konganda,

    Thank you for your post.

    I am not aware of a strategy that is already developed for this, however, it should certainly be possible with a custom NinjaScript strategy. If you have a programming background we would be glad to provide you links to samples that could help you develop the strategy yourself, otherwise, we could provide you with resources to find a programmer to create the strategy for you.

    Please let me know if either of these options interests you and I will gladly follow up accordingly. I will also leave this thread open in case any members of the forum community would like to chime in.

    Thank you for using NinjaTrader.

    Comment


      #3
      Hi Emily, thanks for your info. I do have programming background, just not in the same language as ninjascript. I would appreciate it if you could send me some sample code to dive in. If i struggle to get it right myself, or together with someone here, who might be interested, i would not mind to get assistance from a programmer.

      Comment


        #4
        Hello konganda,

        Thank you for your reply.

        For anyone looking to get started with NinjaScript, which is a C# based language, I like to provide the following link which contains many tips and resources:


        A good place to start would be the Strategy Builder, which can be opened at Control Center > New > Strategy Builder. You can create conditions and actions and then click the "View Code" button to see the NinjaScript logic used for the conditions and actions. We have some example conditions and actions in the help guide at the following links:



        This was your description of what you are looking for: "if the bar opens, ticks at least one tick below the previouis bar (ideally more), and finishes near its high (within 1-2 ticks) above EMA, enter long"
        The condition could look something like this:
        if (Open[0] < Close[1] && Close[0] > EMA(14)[0])
        EnterLong();

        What this says is if the Open of the current bar is less than the Close from one bar ago AND if the Close price of the current bar is greater than the 14-period EMA of the current bar, Enter Long.

        Please check out the resources and let us know if we may be of further assistance.

        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