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

Bill Williams Fractal strategy

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

    Bill Williams Fractal strategy

    Newbie here looking for help in creating a simple autotrading fractal strategy using the BWFractal indicator. I want to be buying 1 tick above the upper fractal or selling 1 tick below the lower fractal. A fractal is only confirmed if two bars have printed after the fractal, so I would need the strategy to execute after the print of the second bar. Never worked with creating a strategy in NT so I am flying blind here.

    #2
    Hello Dennis W,

    Thank you for your note.

    If you are using the indicator BWFractal from the publicly available NT User apps section of the NinjaTrader Ecosystem then yes it can be used in the Strategy Builder to create a simple strategy.

    The indicator does not provide the "pivot" until the 3rd bar after the actual pivot. This is because the logic of the indicator requires that the point be higher than the previous 2 bars and higher than the next two bars.

    You can create a condition that checks to see if the BWFractal upper 3 bars ago is greater than 0 which will only be true when 3 bars ago a point was plotted.

    I've attached a screenshot that shows a 1-minute chart with the indicator applied. In the chart, the indicator has marked the upper with the green squares. On the right is the strategy builder condition to check if 3 bars ago the upper plot was greater than 0 and if so to then draw a red diamond 3 bars ago 3 ticks above the bar. As you can see the strategy is confirming where the pivots are which means the condition is correct.

    If you're unfamiliar with creating NinjaScript strategies, we do have some resources to help you get started. All links below are publicly available.

    The best way to begin learning NinjaScript is to use the Strategy Builder. With the Strategy Builder you can setup conditions and variables and then see the generated code in the NinjaScript Editor by clicking the View Code button.

    I'm also providing a link to a pre-recorded set of videos 'Strategy Builder 301' and 'NinjaScript Editor 401' for you to view at your own convenience.

    Strategy Builder 301

    NinjaScript Editor 401

    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 NT7 help guide first:

    Basic Programming Concepts
    For general C# education I have personally found Dot Net Perls to be a great reference site with easy to understand examples.

    Browse examples for many languages, with explanations and code side by side for easy understanding.


    We also have great resources in relation to Strategy Development on our Support Forum. There is a very active developer community in our support forum that supplements the responses provided by NinjaTrader support staff providing all users with an exceptional support experience.

    Take me to your support forum!

    There are a few Sample Automated Strategies which come pre-configured in NinjaTrader that you can use as a starting point. These are found under New -> NinjaScript Editor -> Strategy. You will see locked strategies where you can see the details of the code, but you will not be able to edit (you can though always create copies you can later edit via right click > Save as)

    We also have some Reference samples online as well as ‘Tips and Tricks’ for both indicators and strategies:

    Click here to see our NinjaScript Reference Samples

    Click here to see our NinjaScript Tips

    These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

    Further, the following link is to our help guide with an alphabetical reference list to all supported methods, properties, and objects that are used in NinjaScript.

    Alphabetical Reference

    And our Educational Resources in the NinjaTrader 8 help guide.

    Educational Resources

    A set of specific tutorials for creating conditions in the NinjaTrader 8 Strategy Builder in the NinjaTrader 8 help guide.

    Condition Builder

    You can also contact one of our professional NinjaScript Consultants or Educators who would be eager to create or modify this script at your request or assist you with your script. Please let me know if you would like a list of professional NinjaScript Consultants or Educators who would be happy to create or modify any script at your request or assist you in learning NinjaScript.

    Please let me know if I may be of further assistance.
    Attached Files
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Hi Kate, thanks for the info. Could you please send that list of professional NinjaScript Consultants or Educators that you mentioned? I think I will need help with this even though it is a very simple strategy. Thank you.

      Comment


        #4
        Hello Dennis W,

        Thank you for your post.

        You can search our list of NinjaScript consultants through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more:
        You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third-party services for NinjaTrader, all pricing and support information will need to be obtained through the consultant.

        The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The companies and services listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem, LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

        Let me know if I may be of further assistance.
        Thomas C.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by DJ888, Today, 10:57 PM
        0 responses
        6 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        158 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Today, 09:29 PM
        0 responses
        7 views
        0 likes
        Last Post Belfortbucks  
        Started by zstheorist, Today, 07:52 PM
        0 responses
        7 views
        0 likes
        Last Post zstheorist  
        Started by pmachiraju, 11-01-2023, 04:46 AM
        8 responses
        151 views
        0 likes
        Last Post rehmans
        by rehmans
         
        Working...
        X