Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

singel entry per day

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

    singel entry per day

    Hi,

    I built a multi time frame strategy in the strategy builder. Is it somehow possible to limit the StopLongEntry to just one entry per day when using the strategy builder?

    Thanks in advance!

    #2
    Hi elnoppo, thanks for your note.

    That could be done with a simple Boolean variable. Create the bool variable in the Inputs and Variables section and set it to true. After that, add the bool check to your entry condition, if it is true, trade. After that, set the boolean to false in your exit condition. This will set up a one-time trade switch for the strategy.

    Please let me know if I can assist any further.

    Comment


      #3
      Hi Chris,

      thanks for your answer. I have got two quesions regarding your proposal:

      1. How or where can I set the boolean to false once I entered a long position. I am using a trailing stop in the "Stops and Targets"
      2. As far as I can see your proposal would only allow a one-time switch - correct? I would like to limit the strategy to one entry per day not one entry in total. Is that possible?

      Thanks again.

      Comment


        #4
        Hello elnoppo,

        Thank you for the reply.

        1). You could do this in addition to your entry, where you currently have the action to enter the position you could set the bool to false there. Chris had assumed you wanted to disable this during the Exit condition, if you are using Targets you would want to toggle this right after entering the position or in the entry condition after you Enter Long or Short position.

        2). Correct, I don't see Chris provided details on how to reset the bool so it would essentially only be able to be set to false and never back to true. You would have to disable/re enable the script to see that toggled back to true.

        I look forward to being of further assistance.

        Comment


          #5
          Dear Jesse,

          thanks for the quick response.

          Regarding the two points:

          1. I will try what you mentioned and see if it works.

          2. Understood, but I think that is not exactly what I am looking for. I think I should describe my problem in more detail: I am having a multi-time frame approch where the primary time series is set to 1 day. The strategy shall buy if e.g. I have got an upward trend in the last couple of days. Generally that works fine. However, when I am backtesting the strategy with a shorter time frame I still get several intraday long entries.

          What I actually want from the backtesting is to get maximum 1 entry per day in combination with a trailing stop, selling my long position whenever the threshold is reached.

          Thanks again.

          Comment


            #6
            Hello elnoppo,

            Thank you for the reply.

            Please excuse my last post I should have continued my statement with some additional information.

            The provided logic could apply to that situation however if you wanted to reset it daily you will need to toggle the variable at the session open.

            The strategy builder is not able to do BarsInProgress greater than 0 logic so what you are asking would mean your primary series needs to be the more granular series and the secondary is the daily. That would allow for resetting the bool at the beginning of the session using misc -> First bar of session.

            A set 1 could be made with a condition checking if it is the first bar of session, if so toggle the bool back to true. You would use the entry or condition to set it to false again.

            The alternative is to unlock the code and add a BarsInProgress condition:

            Code:
            if(BarsInProgress == 1 && Bars.IsFirstBarOfSession) 
            {
              //reset variable code here. 
            }
            I look forward to being of further assistance.




            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Today, 05:17 AM
            0 responses
            20 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            119 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            63 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            41 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            45 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X