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

        Attached Files
        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 NullPointStrategies, Today, 05:17 AM
          0 responses
          44 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          126 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          65 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          42 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          46 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X