Alert when there are Consecutive Bullish or Bearish Candles

Discussion in 'Ask A Question' started by Customer Questions, Sep 26, 2013.

This is the TIMETOTRADE forum. Use the TIMETOTRADE Trigger Trading Technology™ to execute your trades when your Price, Candlestick, Trend Line and Technical Analysis chart conditions are met - no coding required. Trade directly in the world’s global markets. Backtest your Trading Strategies. Calculate your UK HMRC Capital Gains Tax liabilities. Manage your Investment Club. Create a FREE account today.

  1. Customer Questions

    Customer Questions John @ timetotrade

    Is it possible to set up an alert that would occur when for example 5 consecutive candlesticks closed at a price that is equal to or less than the previous candlestick?
     

    Apply for a trading account today and get the superb Trigger Trading™, Taxation and Investment Club Pro Package for FREE. Get your trading advantage.
  2. Customer Care

    Customer Care John @ timetotrade

    A good starting point for understanding how to create Candle Stick Alerts are the following posts:

    For this response, rather than create five Alert Triggers that compare the consecutive Close prices to the previous candle Close prices, we will try another approach that is much faster. A custom indicator has been created for the following and can be imported using the code: 9FAB-9639-F80A. Click here to learn how to import custom indicators into timetotrade.

    Before the solution is explained, lets prepare a simple test case based on 5 candles, so that we understand the maths for the solution that will be proposed. In this example we are looking for 5 consecutive lows, which would be true for the following candle sequence:

    Code:
    Current Candle Close Price: 5
    Close Price One Candle in the past: 6
    Close Price Two Candles in the past: 7
    Close Price Three Candles in the past: 8
    Close Price Four Candles in the past: 9
    Close Price Five Candles in the past: 10
    

    To work out the difference between the consecutive close prices you simply subtract the close price from the previous close price for each consecutive candle:

    Code:
    5 - 6  = -1
    6 - 7  = -1
    7 - 8  = -1
    8 - 9  = -1
    9 - 10 = -1
    

    In this example, each of the subtraction results are less than or equal to zero for this consecutive range of candles therefore the trading rule has been met. The phrase it another way, the highest result in the range is less than or equal to 0.

    Lets do another example where the sequence is broken by a higher candle.

    Code:
    Current Candle Close Price: 5
    Close Price One Candle in the past: 6
    Close Price Two Candles in the past: 8
    Close Price Three Candles in the past: 3
    Close Price Four Candles in the past: 9
    Close Price Five Candles in the past: 10
    
    Code:
    5 - 6  = -1
    6 - 8  = -2
    8 - 3  =  5
    3 - 9  = -6
    9 - 10 = -1
    

    As one of the results was greater than 0 i.e. 5, then the trading rule of 5 consecutive Close prices that are equal to or less than the previous Close price has not been met, i.e. the highest result in this range of results is greater than 0.

    Therefore to determine if there is a consecutive sequence of lower closing price candles we can do so by getting the highest result of the Close minus the previous candle (past) Close price for a given range of data.

    A custom indicator can be quickly created to indicate when any number of sequential Close Prices are higher, lower or equal to zero.

    The Timetotrade Trigger Language for this, which we will implement via the Chart Settings drop down menus is as follows:

    5 Bearish Candles Custom Indicator:

    Code:
    HIGHEST(
        SUB(
              CLOSE,
              PAST(
                  CLOSE,
                  1
              )
        ),
        5
    )
    

    To implement this, in the Chart Settings click on the 'Add Indicator' button and search for the 'Maximum in Range (HIGHEST)' as illustrated:

    consecutive_candles_5.png

    Then set the Source Data to Subtract the Close price from the Close price of 1 candle in the Past. As we are looking for 5 consecutive results, set the 'Maximum in Range Configuration' Period to 5 as illustrated:

    consecutive_candles_8.png

    The indicator will display the highest result of subtracting the Close price from the previous Past Close price for 5 consecutive candles. When the indicator falls below zero the candle sequence has been met as illustrated:

    consecutive_candles_3.png

    To implement a custom indicator to detect five consecutive bullish candles the Timetotrade Trigger Language would be:

    5 Bullish Candles Custom Indicator:

    Code:
    LOWEST(
        SUB(
              CLOSE,
              PAST(
                  CLOSE,
                  1
              )
        ) ,
        5
    )
    
    To implement this, in the Chart Settings click on the 'Add Indicator' button and search for the 'Minimum in Range (LOWEST)' as illustrated:

    consecutive_candles_1.png

    Then add the Subtractions values as before.

    consecutive_candles_2.png

    In this case if the lowest in the range is greater than zero the candle sequence has occurred:

    consecutive_candles_4.png

    Lastly to create an alert that will notify you when the 5 consecutive Bearish candles have been formed, click on the Falling Threshold Trigger. To create an alert that will notify you if all of the candles form lower lows, using the first indicator, the highest value in the range must be less than 0 as illustrated:

    consecutive_candles_6.png

    To create an alert where the Candles must have a Close price that is lower or equal to the previous Close price, then enter a negative Falling Threshold Alert value. The value should be zero less than the smallest unit of change for the selected market e.g. for GBPUSD the smallest tick can be 6 decimal places therefore the highest value must be greater than -0.000001. In this case set the value to -0.0000001 rather than zero when creating the Threshold Alert Trigger as the requirement is to get an alert with the Close price is lower or equal to the previous Close price.

    Click on the Add Trigger button and then activate the alert; the next time there are five consecutive lower or equal to candles you will be notified:

    consecutive_candles_7.png

    To import the Bullish and Bearish Consecutive Candle custom indicator use the following import code: 9FAB-9639-F80A

    Click here to learn how to import custom indicators into timetotrade.
     
    Last edited by a moderator: Dec 23, 2015

    Apply for a trading account today and get the superb Trigger Trading™, Taxation and Investment Club Pro Package for FREE. Get your trading advantage.
  3. Dary

    Dary Dary McGovern Staff Member


    Apply for a trading account today and get the superb Trigger Trading™, Taxation and Investment Club Pro Package for FREE. Get your trading advantage.
  4. Dary

    Dary Dary McGovern Staff Member

    There is now an extensive range of indicators pre-built that will detect candlestick patterns without having to build them by hand. For more information, please see the help wiki:
     

    Apply for a trading account today and get the superb Trigger Trading™, Taxation and Investment Club Pro Package for FREE. Get your trading advantage.
  5. DennisMuldowney

    DennisMuldowney New Member

    Is it possible to create an indicator and alert for 10 consecutive minutes of bullish or bearish candles. I use 1 minute charts and have found this a good way to predict a reversal. I have used the 5 candle template and just changed the value from 5 to 10 but it doesn't seem to work in the same way. It seems to work fine for 1 day charts but not 1 minute charts. Any ideas on how to do this? Many thanks.
     
    Last edited: May 7, 2016

    Apply for a trading account today and get the superb Trigger Trading™, Taxation and Investment Club Pro Package for FREE. Get your trading advantage.
  6. Dary

    Dary Dary McGovern Staff Member

    Hi Dennis

    Changing the 5 period to a 10 will work, but it quite an unusual pattern. I've created a version of the above indicator based on looking for 10 bullish and bearish candles and can be imported using the code: 3633-684A-BBA5.

    I had difficulty finding a chart with 10 bullish or bearish candles, but here is an example from Asos:


    upload_2016-5-10_9-17-22.png
     

    Apply for a trading account today and get the superb Trigger Trading™, Taxation and Investment Club Pro Package for FREE. Get your trading advantage.

Share This Page

Open a FREE TIMETOTRADE account today:
Execute your Trigger Trading™ strategies automatically in the world’s global markets. Apply Now to try our superb platform and get your trading advantage.
170+ Technical Analysis and Candlestick Pattern Indicators - learn more
Back Test Trading Strategies - learn more
Manage your Portfolio and calculate UK HMRC Capital Gains liabilities and SA 108 CGT Return - learn more
Manage your Investment Club and generate UK HMRC Investment Club Tax Return Form 185 - learn more