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 NullPointStrategies, Today, 05:17 AM
        0 responses
        44 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        124 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        65 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