Heikin Ashi Bollinger Bands Strategy

Forums ProRealTime English forum ProOrder support Heikin Ashi Bollinger Bands Strategy

Viewing 6 posts - 1 through 6 (of 6 total)
  • #243965

    Hi everyone,

    Wondered if anyone can help me.  I’m trying to build a strategy based around Heikin Ashi Candles and Bollinger bands.  To enter a buy position a red heikin ashi candle must close below the lower Bollinger band and then on the next green heikin candle open a buy of 0.5 contracts.  If the price goes against the position, if the entry conditions are met again with a minimum of a 10 point distance, enter another position of 0.1 etc.  Close all positions when the price meets the weighted position price + 5 points (or whatever set).  It should do the opposite for short positions.  This is what I have so far, apologies for my code, I’m a novice…

    #243974

    Bonjour

    Sorry, I replied in French, surely it is better in english as this is the english forum

    Some remarks

    • The condition in line  40 If PositionSize > 0 is it also valid for short trtades ?
      I would recommend to split Long and Short trades and to create ExitConditionLong and ExitConditionShort

      • If LongonMarket then… ExitConditionLong = (close >= WeightedExitPrice + 5) …
      • and If Shortonmarket then … sortie ExitConditionShort = (close <= WeightedExitPrice – 5)
    • In the block of exit orders, I would rcommend to reset after exit eht PositionSize to 0ne faut-il pas mettre après la sortie une ligne de réactualisation PositionSize = 0 dans la boucle
      IF ExitConditionLong THEN
      IF PositionSize > 0 THEN
      …. ordres
      PositionSize = 0
      endif
      endif
    • and the same for IF  ExitConditionShort

    Hope this will be helpful, let us exchange about the modified code

    1 user thanked author for this post.
    #244164

    Hi,

    Thanks for replying.  I’ve made some modifications to the code but I still can’t get it to open any positions.  Would anyone be able to help?

     

    #244165

    Assuming you are testing in your Demo Account, try changing position sizes to a minimum of 1.

    #244171

    Thanks for your reply. I just tried changing the size to 1 but unfortunately still no positions opened.

    #244174

    You need below instead of your Line 17

     

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

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