Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exit

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

    Exit

    2 data series , data0 is 30minutes, data1 is 5minutes, data1 did not ExitLong on time, it ExitLong few bars(data1) late .
    code :

    if (BarsInProgress != 0)
    return;​

    if
    (Lows[1][0] < Lows[1][1])

    {
    ExitLong(100, "exitS32m", "S32m");
    }​
    Last edited by bill2023; 06-20-2023, 04:34 AM.

    #2
    Hello bill2023,

    The way that is coded the code is only executed every 30 minutes, are you expecting to have that code executed at the 5 minute interval?

    Comment


      #3
      instead, you could do it like this:

      Code:
      if (BarsInProgress == 1 && Lows[1][0] < Lows[1][1])
      {
      ExitLong(100, "exitS32m", "S32m");
      }​​
      That way, it would only process your code if BarsInProgress == 1 and not if BarsInProgress == 0.

      Comment


        #4
        Hello bill2023,

        If you expected the logic to be executed for the secondary series you can do what UltraNIX said but you do need to remove the following line of code if you do that:

        if (BarsInProgress != 0)
        return;​​

        This code prevents the secondary series from executing the code below that line, the way your code is now it would only be executed for the primary series.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        88 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        134 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
        119 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        69 views
        0 likes
        Last Post PaulMohn  
        Working...
        X