Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Current day condition

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

    Current day condition

    Hi,
    I'd like to have my rays drawn on the current day only. As it stands, I get rays drawn at the inputed times on both the current day and prior days. I suspect I need to add a date series condition of some sort.
    Thanks.

    Click image for larger version

Name:	Current day.png
Views:	84
Size:	26.7 KB
ID:	1295833

    #2
    Hello manraygun,

    Thank you for your post.

    The key to drawing one ray rather than multiple is the "Tag" field. If you use the same tag each time it is drawn, the same object is modified. If you use a unique tag, such as in your screenshot that puts CurrentBars[0] + Ray_1, then a new object is created each time. Please modify your tag to only be "Ray_1" without the CurrentBar value and this should result in only one ray being drawn and modified each time. For more information on the different parameters for drawing rays:


    Please let us know if we may be of further assistance.

    Comment


      #3
      Thanks for the reply, Emily.
      My goal is to keep all rays drawn on the current day within the inputed times. (I believe that means the tag is necessary.)
      What I am trying to eliminate from my chart are rays drawn on the prior day(s) within the inputed times.
      On the attached chart, the inputed time is 5:30 am to 6:30 am.
      The rays I want to keep were drawn on the current day.
      The rays drawn yesterday 5:30 am to 6:30 are the ones I'm trying to eliminate.
      Click image for larger version

Name:	current prior.png
Views:	81
Size:	47.9 KB
ID:	1295911
      Attached Files

      Comment


        #4
        Originally posted by manraygun View Post
        Thanks for the reply, Emily.
        My goal is to keep all rays drawn on the current day within the inputed times. (I believe that means the tag is necessary.)
        What I am trying to eliminate from my chart are rays drawn on the prior day(s) within the inputed times.
        On the attached chart, the inputed time is 5:30 am to 6:30 am.
        The rays I want to keep were drawn on the current day.
        The rays drawn yesterday 5:30 am to 6:30 are the ones I'm trying to eliminate.
        Click image for larger version

Name:	current prior.png
Views:	81
Size:	47.9 KB
ID:	1295911
        Thank you for the clarification.

        What I suggest is to create a new set of Conditions and Actions that checks if it is 5:29am, and if so the action is to remove all draw objects. This is likely the most simple option in the Strategy Builder if the rays are the only draw objects you are working with. Here is a screenshot example:Otherwise, you could use Action > Drawing > Remove draw object to remove individual objects based on their tag values, but you would need a way to save all of the tags for each object drawn on the previous day. This could be done with a custom String series created on the Additional Data screen but could get complex in the Strategy Builder due to limitations of its capabilities, and would ultimately be easier to do in an unlocked script edited in the NinjaScript Editor.

        Please let us know if we may be of further assistance.

        Comment


          #5
          Thank you!

          Comment


            #6
            I got it to work by unlocking and adding this code suggest by Google Gemini to what I had. Thanks again.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            56 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            133 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            73 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            45 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            49 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X