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:
        https://ninjatrader.com/support/foru...pts#post786040

        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:
        https://ninjatrader.com/support/help...on_builder.htm
        https://ninjatrader.com/support/help...t8/actions.htm

        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 Tradewave, Today, 08:38 PM
        0 responses
        7 views
        0 likes
        Last Post Tradewave  
        Started by Jes070466, Today, 11:20 AM
        1 response
        21 views
        0 likes
        Last Post bltdavid  
        Started by iantg, 05-14-2018, 09:47 AM
        28 responses
        2,480 views
        0 likes
        Last Post SamSamIAM  
        Started by llanqui, 11-29-2022, 07:05 PM
        11 responses
        58 views
        0 likes
        Last Post llanqui
        by llanqui
         
        Started by aprilfool, Today, 03:01 PM
        0 responses
        15 views
        0 likes
        Last Post aprilfool  
        Working...
        X