Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can't Dial in Cross Above/Below Entry Condition

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

    Can't Dial in Cross Above/Below Entry Condition

    Hello Good People,

    I'm having issues using CrossAbove within my entry conditions for a short entry. What I want to see is price:
    1. CrossAbove myLevel - we'll call this Candle A
    2. And then, close below myLevel (can be candle A or next candle(s))
    3. Current Delta[0] < Delta [1]
    Works great sometimes, but other times the Close[1] condition counts the previous candle before the CrossAbove condition and enters me early. I've tried to insert a bool which turns true once the CrossAbove condition is made, but I'm still having the same issue.

    What is the best way to insure the CrossAbove condition happens first and then the Close[1] < myLevel happens next (never counting a candle as closed before CrossAbove is made)?

    I've tried different Look Back periods, but same issue. I'm sure it's simple but I'm not seeing it....

    Code:
    if  (CrossAbove(Close, myLevel, 5))
                                            
    {
         enableTrade = true; 
    }
                                        
     if   ((enableTrade == true) && (Close[1] < myLevel)
            && (cumulativeDelta.DeltaLow[0] < cumulativeDelta.DeltaLow[1]))
    {
    EnterShort()
    }
    ​
    Many thanks in advance for any guidance!

    #2
    Hello swjake,

    Thank you for your post.

    Based on your description, my understanding is that you would like the CrossAbove to happen on one candle, then you want to check the next condition on the following bar after the bar for the crossover occurred. To do this, you could save the bar index where the crossover condition becomes true, then check in your next condition if the current bar is greater than that saved bar number:
    Code:
    if (CrossAbove(Close, myLevel, 5))
    
    {
    enableTrade = true;
    savedCrossoverBar = CurrentBar;
    }
    
    if ((enableTrade == true) && (Close[1] < myLevel)
    && (cumulativeDelta.DeltaLow[0] < cumulativeDelta.DeltaLow[1]) && CurrentBar > savedCrossoverBar)
    {
    EnterShort()
    }​
    Please let us know if we may be of further assistance.

    Comment


      #3
      Thank you Emily!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      54 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      130 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      72 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      44 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      49 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X