3 Candle Strategy

Forums ProRealTime English forum ProOrder support 3 Candle Strategy

Viewing 15 posts - 46 through 60 (of 83 total)
  • #77395

    Attached are results for Roberto version code

    But Roberts code still has the conditions looking at the wrong candles.

    #77398

    It works good on high TF’s. On DAX Daily it yields good profits, but only 6 trades in 8 years!

    I have something to point out:

    1. the higher the TF, the more reliable patterns are (yours, Doji, Hammer, Engulfing, ….); if you are looking for many trades then you must devote to lower TF’s and it is not likely to work!
    2. are you sure your patterns are good? how did they come to your mind… tests, rumors, what else? Because they seem a bit odd!
    3. you set your SL and TP based on the current CLOSE, are you sure the SL (say in a LONG position) is really lower (and TP higher) than entry price?
    4. you never care about the current candle, but THAT is the entry price at which your trade will open.

    I mean, maybe you should rethink it a bit… make some changes, or even drop it (I have about 30 running strategies on demo, but I have coded a few hundreds, my trash bin is FULL).

    #77399

    you never care about the current candle, but THAT is the entry price at which your trade will open.

    I think we established earlier on that the OP misunderstood how the candle indexing system worked and did not realise that the most recently closed candle was candle zero. However I have modified his code to look at what I believe are the candles he wanted to look at and also changed the indexing in the SL and TP calculations and it still does not work very well. Losses on fast time frames and barely any trades on slower time frames.

    #77409

    Here’s the current code as I think that the System should work:

     

    #77411

    did not realise that the most recently closed candle was candle zero.

    but we say Close[1] when we want close of the most recently closed candle?? Or have I had it wrong all the time???  🙂

    #77412

    did not realise that the most recently closed candle was candle zero.

    but we say Close[1] when we want close of the most recently closed candle?? Or have I had it wrong all the time??? 🙂

    The most recently closed candle is [0], or no brackets at all, (close, high, low, open, range,….), usually it is called the SETUP CANDLE.

    #77413

    Current Candle is always 0…this means that my calculations are based on candles 2,1,0…if condition is met market order is placed and SL/TP are calculated and linked to open position…
    I have to rechek if the code is okay…I found a bug

    Does this mean that my SL and TP are calculated based when postion is entered?

    As an example:
    candle 2,1,0 meet the condition and position will be opened on next candle…
    for better understanding
    candle 2 is now candle 3,
    candle 1 is now candle 2,
    candle 0 is now candle 1
    and candle 0 is the one in which TPP and SL must be calculated…

    Am I right?

     

    #77414

    I think that there is still abug within the code, but here an amended version

     

    #77418

    Current Candle is always 0…

    Yes, but we have to exactly define what CURRENT means, NOT the candle being formed since it cannot be accessed, but the MOST RECENTLY closed one!

    Even with MTF support candles can only be accessed at CLOSING time, the only advantage is that we can use lower TF’s to access data while the candle in the bigger picture is being formed!

    So, to recap, [0], or no brackets at all, references the most recenty closed candle.

    At lines 16-17, 25-26, SL & TP are calculated on CLOSE (or CLOSE[0]). It will become [1] when the new one (where a trade has been opened) will close thus becoming [0] itself. Whenever a candle closes there’s a shift in the numbering (referencing) system, so that [0] ALWAYS references the most recently closed one! That’s the reason you have to calculate SL & TP only once when entering a trade, otherwise they (since they reference CLOSE) would be recalculated each new bar!

    #77419

    I think that this code is now correct:

    the coments within this codes must be amended from my side….

    #77438

    So, to recap, [0], or no brackets at all, references the most recenty closed candle.

    When I use Close (same as Close[0] ) I always thought I was referring to the current / latest price of the candle which is currently forming?

    When I want to refer to the close of the most recently closed / ended / finished candle I use Close[1]?

    Am I correct or incorrect or have I only read half the above and I am talking at cross-purposes / confusing myself?

    I will in any case use Graph to check out my assertions. Kinda basic / worrying I / we are discussing this … no wonder I’m not making any money on my Auto-Systems!!!!!????? 🙂 🙂

    #77439

    I am talking at cross-purposes / confusing myself?

    I am confusing myself and I have been right all along!

    It’s surprising, being a recent new coder and now having a break for a month or two basic assertions start to slip away.

    Close / Close[0] is the current price (if bar not closed) OR closing price of the bar that just closed / same bar which caused my code to just be read (at the end of each closed bar).

    If I want to refer to the close of the bar that closed immediately prior to this latest bar then it is Close[1].

    Sheeesh … I think I’ll stick to my building and cars at least I can see what is going on!!! haahahaha

    #77444

    I think that some of the confusion may be due to the difference between coding an indicator compared to coding a strategy. In an indicator code bar[0] is the currently forming bar and in strategies it is the last closed bar due to the fact that a strategy does everything at the bar close and indicators change their output values on the fly and so do not wait for bar[0] to be closed.

    2 users thanked author for this post.
    #77477

    Hi together,

    As I can see there are still some issues.
    I will try to handle these bugs during the weekend.

    Rgds
    Marc

    #77489

    Aloha @all,

    Last question for my understanding…
    I think it’s quite a little bit to hard for me to understand which candle is necessary for market entry…

    I have three candle which have to meet conditions to form an entry. When conditions are correct than a market order incl. SL/TP are placed.
    Perhaps attached image shows the way of calculation…and somebody can tell me/us the correct way of calculating.

    Gracias

Viewing 15 posts - 46 through 60 (of 83 total)

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