Announcement

Collapse
No announcement yet.

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?

    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.

        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 Mindset, 04-21-2026, 06:46 AM
          0 responses
          93 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          138 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          68 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by cmoran13, 04-16-2026, 01:02 PM
          0 responses
          123 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          73 views
          0 likes
          Last Post PaulMohn  
          Working...
          X