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

trading day

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

    trading day

    hello,
    I would like to select the trading days in my strategy. I created the bool starters for the five days but after I jam to treat it in the conditions: can you help me please.
    Thank you

    #2
    Hello,

    Thanks for your post.

    Can you clarify if you are working with the Strategy Builder or coding directly in a Ninjascript strategy?

    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_PaulH View Post
      Hello,

      Thanks for your post.

      Can you clarify if you are working with the Strategy Builder or coding directly in a Ninjascript strategy?
      with stategy builder
      thank's

      Comment


        #4
        Hello,

        Thanks for your reply.

        I've attached an example Strategy Builder Strategy that allows you to select any day of the week. Once the day or days are selected, the strategy builder has two sets where it will check to see if the current bars day of the week matches set 1, if so a bool is set to true. Set 2 will check to see that the current bars day of the week does not match and in that case, it will set the bool to false. Set 3 is to demonstrate on the chart when a day is selected by coloring the background.


        In the screenshot below you can see the strategy properties on the left have Wednesday and Friday checked, the chart shows that every Wednesday and Friday the bool is true and allows the background to be drawn.

        Click image for larger version  Name:	270027-1.PNG Views:	0 Size:	71.2 KB ID:	1186566

        I would suggest downloading and testing to understand the functionality and then duplicating as you wish for your strategy.


        ExampleDaySelector.zip

        Last edited by NinjaTrader_PaulH; 01-21-2022, 03:18 PM.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_PaulH View Post
          Hello,

          Thanks for your reply.

          I've attached an example Strategy Builder Strategy that allows you to select any day of the week. Once the day or days are selected, the strategy builder has two sets where it will check to see if the current bars day of the week matches set 1, if so a bool is set to true. Set 2 will check to see that the current bars day of the week does not match and in that case, it will set the bool to false. Set 3 is to demonstrate on the chart when a day is selected by coloring the background.


          In the screenshot below you can see the strategy properties on the left have Wednesday and Friday checked, the chart shows that every Wednesday and Friday the bool is true and allows the background to be drawn.

          Click image for larger version Name:	270027-1.PNG Views:	0 Size:	71.2 KB ID:	1186566

          I would suggest downloading and testing to understand the functionality and then duplicating as you wish for your strategy.


          ExampleDaySelector.zip
          Merci beaucoup c'est ce que j'attendais : vous êtes les meilleurs

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by pechtri, 06-22-2023, 02:31 AM
          9 responses
          122 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by frankthearm, 04-18-2024, 09:08 AM
          16 responses
          65 views
          0 likes
          Last Post NinjaTrader_Clayton  
          Started by habeebft, Today, 01:18 PM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by benmarkal, Today, 12:52 PM
          2 responses
          13 views
          0 likes
          Last Post benmarkal  
          Started by f.saeidi, Today, 01:38 PM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Working...
          X