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!
See more
See less

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.
    Emily C.NinjaTrader Customer Service

    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.
        Emily C.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by traderqz, Yesterday, 12:06 AM
        11 responses
        27 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by PaulMohn, Today, 03:49 AM
        0 responses
        7 views
        0 likes
        Last Post PaulMohn  
        Started by inanazsocial, Today, 01:15 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by rocketman7, Today, 02:12 AM
        0 responses
        10 views
        0 likes
        Last Post rocketman7  
        Started by dustydbayer, Today, 01:59 AM
        0 responses
        4 views
        0 likes
        Last Post dustydbayer  
        Working...
        X