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

Entry timing question

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

    Entry timing question

    [EDIT] I am still looking for help with this. Please, any assistance is greatly appreciated.

    I am building a very basic script using the Strategy Builder wizard and don't have much knowledge of code.
    I notice that my strategy's entries are extremely specific (obviously) for example 10:45:00 or 11:10:00... I am trying an experiment and was wondering if my query is possible.
    I would like to add a "randomization" to each entry point so that it has a random delay of anywhere between 1-20 seconds for the entry. For example, the conditions to take the trade are met and the script makes the entry delayed by a few seconds, and it varies each time, so in the above example, the trades would be (for example) 10:45:03 and 11:10:19 instead.

    Again I have zero code knowledge and I don't know if what I am requesting is at all possible.
    Apologies as English is not my first language, please ask if you need me to clarify further.
    Thank you in advance.
    Last edited by betsuni_123; 03-26-2024, 10:50 PM.

    #2
    Hello betsuni_123,

    Thanks for your post and welcome to the NinjaTrader Forums!

    This would not be possible to accomplish in the Strategy Builder and would require unlocking the code from the Strategy Builder by clicking the 'Unlock code' button and manually programming your own custom logic into the strategy to submit orders in that fashion.

    If you need someone to write this script for you and add this logic on your behalf, you can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script.

    You can search our extensive library 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!

    Search trading apps & services to cusomize your NinjaTrader platform with trading indicators, signals and strategies.


    Educators - https://ninjatraderecosystem.com/sea...ures=education

    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.

    This 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.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3

      Thank you Brandon. I will look into the link you provided.


      Comment


        #4
        Unfortunately, I am still in need of help with this. I have emailed over a dozen of the consultants, none have replied.
        Please, I am looking for just a simple code if anyone is willing to assist me.

        Comment


          #5
          Hello betsuni_123,

          Thanks for your notes.

          It may take some time for the consultants to review your request and get back to you. You could consider sending them a follow-up email.

          This would be difficult to accomplish without any knowledge of coding NinjaScripts or using C#.

          That said, you could consider adding a timer to the script using TriggerCustomEvent() to have the script wait a certain amount of seconds before submitting the order from the script. Making the number of seconds be random would require coming up with your own custom logic to implement randomization for the timer.

          TriggerCustomEvent(): https://ninjatrader.com/support/help...ustomevent.htm

          Note that in the support department at NinjaTrader it is against our policy to create, debug, or modify, code or logic for our clients. Further, we do not provide C# programming education services in our support. This is so that we can maintain a high level of service for all of our clients as well as our partners.

          If you are interested in learning more about creating NinjaScripts, here is a link to our publicly available training videos, 'Automate your trading with NinjaTrader's Strategy Builder' and 'NinjaScript Editor 401', for you to view at your own convenience.

          'Automate your trading with NinjaTrader's Strategy Builder': https://youtu.be/VxU4FR6GWNA
          NinjaScript Editor 401 - https://youtu.be/H7aDpWoWUQs?list=PL...We0Nf&index=14

          I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript:


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


          And the MSDN (Microsft Developers Network) C# Language Reference.

          Brandon H.NinjaTrader Customer Service

          Comment


            #6
            Appreciate the help and can understand why staff cannot provide custom code. I will try to reach out to consultants once again and review the pages you linked.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by fx.practic, 10-15-2013, 12:53 AM
            5 responses
            5,404 views
            0 likes
            Last Post Bidder
            by Bidder
             
            Started by Shai Samuel, 07-02-2022, 02:46 PM
            4 responses
            95 views
            0 likes
            Last Post Bidder
            by Bidder
             
            Started by DJ888, Yesterday, 10:57 PM
            0 responses
            8 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by MacDad, 02-25-2024, 11:48 PM
            7 responses
            159 views
            0 likes
            Last Post loganjarosz123  
            Started by Belfortbucks, Yesterday, 09:29 PM
            0 responses
            8 views
            0 likes
            Last Post Belfortbucks  
            Working...
            X