Check of previous candles

Forums ProRealTime English forum ProOrder support Check of previous candles

  • This topic has 31 replies, 3 voices, and was last updated 5 years ago by avatarMarc.
Viewing 15 posts - 16 through 30 (of 32 total)
  • #76693

    Hi together,

    I’ve tried to fix the code a littlebit while using HA-Candles instead of normal Japanese Candle-Sticks and to expand days from non trading day monday to friday.
    There is a bug within the code and nothing happens when starting backtest.
    Can somebody try to check where I made the mistake?

    Thank you in advance

    Marc

     

    #76696

    This the code I adapted to non-MTF platforms

     

    #76698

    As for your previous code on top of the page, when changing code I suggest that you change 1 feature at a time and when THAT feature works go on to add another one, otherwise you (and everybody else) will be lost!

    If you want to add days after Tuesday lines 58-59 (for Wednesday) should be replaced by

    if you still want to check the same trend is upgoing.

    Moreover, my fault, line 24 of my original code and your line 25 should be replaced by

     

    #76706

    Hi Roberto,

    this is the amended Code which contains the addition of ‘AND MyDay = -1’ &  ‘AND MyDay = 1’  for all other days than Monday and Tuesday.
    Amendment contains also the syntax ‘ThisDay = OpenDayOfWeek’

     

    #76708

    It’s still looking a little bit wrong in it’s structure…I used first code:

     

    #76716

    As you add more days you’ll have to add further references to past instancesc of MyDay, thus MyDay, MyDay[1], MyDay[2],…

    Read https://www.prorealcode.com/topic/check-of-previous-candles/page/2/#post-76698.

    #76781

    Hi Roberto,

    I see, I see…Thank you I will amend the code and paste latest version

     

    Rgds

    Marc

    #76806

    Amended Code

     

    #76807

    When checking System with manually traded one the differences are really big.

    I have no idea why the backtest show this negative results -.-

    #76860

    Hi together,

    I’d like to receive some help again. Is it possible to change the value of close to heikin ashi close?
    Is it correct to change close versus  (open+close+low+high)/4    ?

    The same idea for open: instead of open i would change the code to (open[1]+close[1])/2

    Then I need to calculate the high and low also in heikin ashi based calculation-system

    Thank you very much for your help.
    Marc

     

    #76864

    There’s no instruction to deal with Heikin Ashi candles, when you want to reference them you’ll have to set them up like that

    this code is ready AS IS, just reference xClose, xOpen, xHigh, xLow to get Heikin Ashi values.

    Some prefer to use variable names with leading HA instead of X, you can change them as you like.

    To deal with HA you may use the search box to find out what HEIKIN (or ASHI, or HA)  returns.

     

    #76867

    Hi Roberto thank you very much. Where can I set Barindex?

    Only as variablke on Top of the Code a la

    ‘BarIndex = 0’

    afterwards the rest of the code incl. amendmends?

     

    #76869

    Where can I set Barindex?

    You do not need to set BARINDEX. It is the filing system for the bars on any chart. The first bar is BARINDEX =1 and the second is BARINDEX =2 and so on. If there are 10000 bars on your chart then the current bar is BARINDEX = 10000

     

    #77070

    Heres is the amended code:

    I think this should be correct…

     

    #77077

    When testing this system with it’s new parameters continaing ha-calculation of candles the return is confusing, because it’s very negative and shows only a downside curve…Anybody there who is willing to test this and confirms this?

     

    Rgds

    Marc

Viewing 15 posts - 16 through 30 (of 32 total)

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