Sierra Chart bar recognition

Discussion in 'Automated Trading' started by Grantx, Sep 30, 2017.

  1. Grantx

    Grantx

    How difficult would it be to automate a strategy based on candle recognition? I have fairly good knowledge with C# but never touched C++. I would like to start simple, give me a signal event when 8 tick bar prints. Where is a good place to start learning how to do this? Is there a repository of code samples that I can look at?
    Thanks.
    Capture.PNG
     
  2. algofy

    algofy

    Umm, have you tried looking at sierra charts documentation?
     
  3. Macca1

    Macca1

    Want is the chart type/ time frame/ symbol ? Do you just want to be alerted to an 8 tick reversal bar? If so, then you should be able to do that without even using ACSIL. However, you will need to use an "indicator" to achieve this, which is against your rules.
     
  4. Grantx

    Grantx

    I dont have anything against indicators just personally havent found a way to benefit from them. When I learn out how to use one successfully I'll use it.
    Its a tick chart. Unirenko. NQ and minidax instruments.
    How would i do it without programming?
     
  5. Macca1

    Macca1

    https://www.sierrachart.com/index.php?page=doc/StudyChartAlertsAndScanning.php

    I would be cautious using Unirenko bars in any automated strategy, because, of the way they are formed- what looks good on historical data, would have not been a possible entry in realtime( without big slippage). So for the purpose of an automated strategy the entry/ exities in back testing are less likely to match up to real time results. For the purpose of creating simple alerts if might also be a good ideal to use ACSIL study function to flag a full recalculation every x seconds, so that any fictitious alerts are cleared out( This might not be necessary) .

    I think I can already see an easy way to construct this using simple alerts. What are your chart settings?
     
    Grantx likes this.
  6. Grantx

    Grantx

    Unirenko settings are 10-6-4 for NQ. I have been reading a lot on this forum about swing trading vs day trading and I really want to transition to swing type trades. The problem I am trying to address is continuously having to watch and scan the charts for setups which is why I need to explore a more intelligent way of doing things. If it involves indicators then so be it I have no problem with that.
    The 10-6-4 setting still contains 'noise' but it allows me to view 2 entire PA days looking for structural setups. Ive attached an example of what my chart looks like.

    Thanks for the link btw. Ill read through that this coming week.

    NQ-201712-GLOBEX [CBV] [M]  Flex Renko 10-6-4  #1 2017-10-01  17_35_08.528.png days
     
  7. Gotcha

    Gotcha

    Here might be some help.

    First, I would find it quite difficult to program exactly what you mean by counter-trend. Of course we all have a general idea of what you're looking to do, but given how there is so much mis-information or lack of concrete definition of what a trend even means, I'm not sure how you go about programming this.

    But I can offer what I use to mark bars that are greater than a certain size. What I use is the study "Color Bar Based On Alert Condition". I use this study twice, one to mark the bar red when this bar is greater than 3 ticks and is a down bar, and a second use of this study to mark an up bar green.

    Once you select this study, under the Alert tab, here is the code for these two different studies. In the Subgraphs tab is where you select how you want it to draw, which for me was just changing the color. Hopefully this gives you at least a start since you will be able to highlight which bars are greater than 7 ticks, since this for you would mean at least an 8 tick pullback.

    =AND(C>O,H-L>TICKSIZE*3)

    =AND(O>C,H-L>TICKSIZE*3)

    bar alert.png
     
    Grantx likes this.
  8. Grantx

    Grantx

    'Color Bar Based On Alert Condition' is marvellous! Really appreciate your help.
    I noticed when I loaded this study that there is another one called 'Colour based on above/below' - so Im going to load up a 300 EMA as a filter and only activate the alert condition based on this EMA.

    Thanks for the advice.
     
    Gotcha likes this.
  9. Grantx

    Grantx

    I really cant thank you enough for this. It is an incredibly useful signal for me so Im really grateful for your help. Ive modified it slightly to work with a moving average, so it only fires on long reversal bars above MA and vice versa when it is below the MA. Its a 300 MA.

    =IF(C<ID1.sg1,AND(C<O,H-L>TICKSIZE*15),AND(C>O,H-L>TICKSIZE*15))
     
  10. Gotcha

    Gotcha

    You're very welcome. Feel free to send a cheque if it helps you rake it in. :D
     
    #10     Oct 7, 2017