Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MIN indicator error / wrong output in the strategy?!

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

    MIN indicator error / wrong output in the strategy?!

    Hello ,

    - (I have uploaded the important information / pictures) -

    Although I have specified in the settings that the strategy should only go short when the "MIN" is undershot ....
    But how can the strategy go short over the price if the IF condition above does not actually allow it?
    The period for the MIN indicator is set to 3

    How can the lowest short price of the indicator 58.37 be if it uses the last 3 candles for calculation?

    Thanks!


    #2
    Hi Yannick, thanks for your post.

    I do not fully understand the problem. Is the strategy entering short when it is not supposed to? Have your printed your conditions whenever EnterShort is called? For example, when your set 3 becomes true, print out everything used in the above condition to see why it became true.

    I look forward to hearing from you.

    Comment


      #3
      " Is the strategy entering short when it is not supposed to? "
      Yes, the strategy goes short although the condition does not allow it .
      Or have I overlooked a mistake?

      The condition is: GetCurrentBid(...) < MIN(Period)[0]
      (Period = 3)

      Thanks!

      Comment


        #4
        Hi Yannick, thanks for your reply.

        Please use the Print statement to print out the values of GetCurrentBid(...) and MIN(Period)[0] along with the EnterShort method, what values are these methods returning? It might also help to create a new strategy with 0nly this condition and single out the problem that way.

        I look forward to hearing of your results.

        Comment


          #5
          .

          I did it now and uploaded the picture

          How can the Min Price be 58.37 if it uses the last 3 candles for the calculation?

          Comment


            #6
            Hi Yannic, thanks for your patience.

            Something like this code will return the minimum Close price of the bar that just closed, and the two bars behind it:



            Did you need to get the lowest low or lowest close in your strategy? If you need some other input series to get the minimum, specify the series like so Min(Low, 3)[0].

            I think this is just a matter of getting the correct minimum here. Also, note that the GetCurrentBid method is getting the very most current bid price, and this can be different than any values you see on the last closed bar.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Today, 05:17 AM
            0 responses
            46 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
            66 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