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

Help Me Please About Writing This Data

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

    Help Me Please About Writing This Data

    Hello i m trying to write automatic trader. How can i write in the C# langue :''in 8 range bar when delta imbalance occur (range bar finishes green ,delta is red) ,buy when the next bar starts?

    #2
    Hello crom041,

    Thank you for your post.

    What are you using to display delta? Is this an indicator you created, or something you got from a 3rd party, or are you using one of the built in indicators?

    Just to be clear, in platform support, we do not create/write strategies, we do not provide debugging services. We also cannot provide programming education services. If you would like the strategy created for you, we can provide references to 3rd party programmers who could meet your needs.

    If you're interested in learning NinjaScript and creating this strategy yourself, we do have resources to help you begin creating NinjaScript Strategies/Indicators. 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 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.


    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.

    Also, below I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript.



    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

    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.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Hello Kate, i am asking a different easy question . what is the C# langues of ''red candle '' or ''green candle '' , i want to write : ,''BUY''(long) when a green 8 range bar completed . i couldn t find from the help- ninjaskript .could you please write an example?


      Regards

      Comment


        #4
        Hello crom041,

        Thank you for your reply.

        What you refer to as Red bars are simply bars that the Open of the bar is greater than the Close of the bar, and Green bars the opposite, they are bars where the Close of the bar is greater than the open.

        A simple way to state this in NinjaScript would be:

        if (Open[0] > Close[0])
        {
        EnterShort();
        }
        else if (Open[0] < Close[0])
        {
        EnterLong();
        }

        This would enter short or long depending on the direction of the bar.

        I do encourage you to start with the Strategy Builder - you can then unlock the code and see how things like this should be structured

        Please let us know if we may be of further assistance to you.
        Kate W.NinjaTrader Customer Service

        Comment


          #5
          If you would like to receive programming education services you may refer to essay typer pro. Also you may post a part of your code here for programmers to check it.
          Last edited by helenwagner1; 03-26-2020, 06:22 AM.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by rtwave, 04-12-2024, 09:30 AM
          2 responses
          19 views
          0 likes
          Last Post rtwave
          by rtwave
           
          Started by tsantospinto, 04-12-2024, 07:04 PM
          5 responses
          67 views
          0 likes
          Last Post tsantospinto  
          Started by cre8able, Today, 03:20 PM
          0 responses
          6 views
          0 likes
          Last Post cre8able  
          Started by Fran888, 02-16-2024, 10:48 AM
          3 responses
          49 views
          0 likes
          Last Post Sam2515
          by Sam2515
           
          Started by martin70, 03-24-2023, 04:58 AM
          15 responses
          115 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X