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 Mindset, 04-21-2026, 06:46 AM
            0 responses
            90 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            137 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
            120 views
            0 likes
            Last Post cmoran13  
            Started by PaulMohn, 04-10-2026, 11:11 AM
            0 responses
            72 views
            0 likes
            Last Post PaulMohn  
            Working...
            X