Retracement breakout with last few candles in Loop

Forums ProRealTime English forum ProBuilder support Retracement breakout with last few candles in Loop

Viewing 12 posts - 1 through 12 (of 12 total)
  • #212580

    Hi Team,

     

    1. Anyway I can code the price to buy only if the price reach at the open of bearish candle when condition is met…as of now SELL trade gets opened when condition is met and candle is down , I need that price to retrace to open or therebaouts instead of opening straightaway…on Dow Jones these 5 mins candles are sometimes 100+ points 🙂 I’d rather wait for price to retrace near open etc?
    2. Is there a way to code and point to a specific candle in last few bars..i.e. condition met for a bearish candle 5 or 7 bars ago..price went down as expected and now traced higher than bearish candle thus signalling a reversal…I trade manually since I do not know how to code that…vice versa for Bullish candle...?

     

    Appreciate your help on this..

    #212581

    Please see attached PIC for example I have colour coded, it took 8 candles for the price to revert…I want someway to track this last candle when condition was met, in this scenario pink/magenta candle –  so when price breaks above this candle, we go long!!

    vice versa for short if blue breaks..

    #212590

    Please see attached PIC for example I have colour coded, it took 8 candles for the price to revert…I want someway to track this last candle when condition was met, in this scenario pink/magenta candle – so when price breaks above this candle, we go long!!

    vice versa for short if blue breaks..

    Any help please, not sure if it’s possible to have a for loop and track last candle that meets the condition?

    #212591

    Please don’t quote any of your message for each of your reply.

    To check if the close of the current candle breaks one of the candlestick Close X bars ago (from minCandles to maxCandles) and with a retracement > minPoints, use the below code:

     

     

    #212596

    Hi Nicolas, apologies for duplication via quoting.  Thank you for your response, appreciate it. Let me try and revert on the results.

    #212599

    Hi Nicolas,

     

    My condition is simple: c1=close>high[1]

    All I want is in a loop is when candle goes below , when this condition was met, an arrow should be drawn or segment as you kindly put in the code already.

    I have tried but unable to get the result I expect. Would appreciate your help.

    #212600

    goes below what please?

    #212602

    Sorry, goes below c1 (condition) i.e. c1=close>high[1]

    So c1 occurred 8 or 10 candles ago , and price was consolidating or going higher, now close is going below c1 after 8-10 candles…I need the arrow/segment at this point please.

    #212603

    I still don’t get it sorry.

    Could you just take a chart and show me the pattern by a simple drawing please?

    #212604

    Hi Nicolas, sure, and many thanks for your assistance.

    Please see the attached chart, I have tried to explain in a simple possible way according to my brain, hope it’s the same message coming across to you as well .

     

    If you actually observe, there are 2 times candle closed below c1 condition. I have only highlighted last 1 for better visibility. it could be 4 candles or 8 when candle closed below c1.

    #212606

    this version plots c1 conditions tested and the arrow on the candle that close below the Open of the c1 candle.

     

     

    1 user thanked author for this post.
    #212607

    minCandles = 3   c1 = close>high[1]   if c1 then trigger=open bar=barindex drawtext(“c1”,barindex,high) endif   if barindex-bar>=minCandles and close crosses under trigger and  trigger>0 then drawarrowdown(barindex,high) coloured(“red”) trigger=0 endif   return

    Hi Nicolas, many many thanks for your help, much appreciate it! All works as expected, finally!

Viewing 12 posts - 1 through 12 (of 12 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login