Help to program an idea that worked

Forums ProRealTime English forum ProOrder support Help to program an idea that worked

  • This topic has 42 replies, 4 voices, and was last updated 8 years ago by avatarquo.
Viewing 15 posts - 16 through 30 (of 43 total)
  • #14970
    quo

    Hi Tikitaka, thanks again for your big help, we have to change the invitation. Prawns has become a “Mariscada”.

    Concerning your doubt:

    if you enter a position april 6th because you got a new maximum, once you have another one (in your example 14 april), you have to move up the stop to 3% below the minimum between these to points, (13th april). The lowest value between both maximums.

    In your example we have 3 consecutives corrections but in the end, when there is a new high, we take the lowest value (3% below) between previous maximum and the new one.

    hope this clarify.

    thanks

    #14976

    High, I’m on call today so let’s try to move on a bit with this business of ours.

    No, forget about the 14th april and all the rest for a moment. My doubt is when exactly do you consider the 6th apr maximum to be a new historical maximum: the 8th, the 12th, none of them? From your earlier explanations, I thought the 8th, am I right?

     

     

    #14978
    quo

    Oh sorry,

    yes, you are right. The 8th allows the 6th to be the trigger. You have to buy when 6th maximum is triggered

    🙂

    #14979
    quo

    I consider day 6 as a maximimum and therefore i put the trigger in its maximum when i see the candle of the day 8 (i realize next day/weekly/month)

    #14983

    Ok, next question:

    the moment a new position is open after an exit, must I update the exit price, that now would be the relative minimum between the entry bar and the previous historical maximum, or must I wait until a new post-buy historical maximum is formed, which could be the entry bar or not? Please, think about it for a moment. I can attach an explanatory picture if necessary.

    #14986
    quo

    I would say you must update the exit price but to avoid misunderstanding a graph is good idea 🙂

    #14987

    Alright then, that’ll have to be tomorrow.

    See you

    #15057

    Hi, let’s carry on with our little chat.

    Hereinafter, let’s assume always that the exit filter is 0%.

    Two pictures are attached. The first (ELE-1) illustrates how exit prices are updated: it’s the lower low not between two consecutive historical maximums (bars 1 and 2), but between the correction bar (b) and the first maximum (bar 1), both included. So, in this example, 8.97, the low of bar b, and not the low of bar a. I think the picture is auto-explanatory of the reason why bar a can’t be used as the exit price. Remember that we’ll only know that bar 2 is a new historical maximum at the close of correction bar b. This is only for your information.

    The second picture (ELE-2) is about our pending question. The position is closed at the right exit price, 8,97. Then, some years later (probably by that time we are already two or three times married) a new position is open at 10.41. At that moment the exit price keeps being 8.97. There are two options:

    a) The exit price is immediately updated at 4,911, the low of bar c, although the entry bar in not a new historical maximum yet. This seems the right option to me.

    b) The exit price is updated (always at 4.911) when the next historical maximum is reached (bar 3).

    Which option do you prefer or even use in your real strategy? (Naturally the strategy code as it is right now doesn’t have any money/risk management that could be used to set our initial stop loss/exit price, which would be a third option).

    Well, this post seems already half a novel, and in Barbarian for all our sins!

    (Claro que peor sería que tuviéramos que expresarnos en la nueva lengua universal: el català :-))

    Please, the answer a bit shorter than the question.

     

    1 user thanked author for this post.
    avatar quo
    #15062

    I always enjoy reading “trading novels”  😁

    #15354
    quo

    Hi all,

    First of all sorry for my late answer. I was very busy with others matters that pay me at the end of the month. As you said before, first things, first. Now you probably understand why i use monthly data 🙂

    it´s being more complicated than i though, maybe because i dont explain myself properly (even more in Shakespeare´s language) or maybe because i don´t realize that a simple idea turns  tough work when you translate into a code.

    I think i have found the problem. A new historical maximum is a new historical maximum when prices goes above the previous one, there is no necessary to have a correction.

    In picture one you say “Remember that we’ll only know that bar 2 is a new historical maximum at the close of correction bar b. This is wrong, in your example you now that you have a new historical máximum the candle before bar 2 (is higher than bar 1), and that date you can set the stop in point a.

    In correction b you are out because of the stop, and as you have a minimun lower than previous minimum you know that when price goes above that maximum (10,41) you can enter a position that date and the stop will be the lowest point between 10,41 and the date that price was triggered.

    Concerning question two you are right, the correct answer is a) but let me correct you: the entry bar IS a new historical maximum.

    I think there has been a misunderstanding. Probably is my fault when i introduce the concept “correction” and “minimum lower than previous minimun” I say that because when that happen you are ready (set the trigger) to open a position or move your stop up when you are already in, but a new historical maximum is when it is (highest price). It is no necessary a correction to have a new historical máximum.

    As this is being half a novel as you say, and people probably are boring and we are both spanish and would be less confussion in our language (no catalanish please). We can contact by email or phone.  Maybe 1 min at the phone or 20 min by email in spanish save us time.

    thanks. Really gratefull, believe me.

    Nacho.

    (edit)  by Nicolas, please don’t give your email address or phone on public forum  😊

    #15440

    Hi man, very useful post. I might still have a doubt though. Let me think about it for a minute (and prepare some pictures if necessary) .

    (You should not ever publish an email direction. It’s a basic anti-spammers rule. And be careful too with “people are boring” versus “people are bored” :))

    See you tomorrow evening, weather permitting. Don’t miss it!

    #15510

    Nope, long and busy day at work and now at home. Impossible to look into anything, sorry.

    Tomorrow should be more relaxed, fingers crossed.

    #15589

    Hi everyone

    First of all, quo, I don’t mind the time (true, for various reasons, longer than I expected) I’m dedicating to this topic: it’s good for my coding brain (or half-brain in my case), good for my English and good for my better knowledge of the ins and outs of this platfom, to which I am quite a layman. So don’t feel sorry or guilty at all, happy to help. Just KEEP CALM AND ASK NICOLA.LM. Bad joke, I know, the good ones  I keep for paying venues 🙂

    Ok then, after opening a position we must update the exit price following the rules of the strategy. We agree so I’ll change the code accordingly.

    About the correction thing when we are already in a position, though, or I’m totally lost or no misunderstanding at all. In fact, I’ve raised the issue not as a question but FYI, as I was quite sure you had another idea in mind. Let me rewrite “Remember that we’ll only know that bar 2 is a new historical maximum at the close of correction bar b” as: Remember that we’ll only know that we must trigger the updating of the stop at the close of correction bar b. As you see nothing changes and the issue subsists: we can’t use the low of bar a as the new exit price. Sure, this only happens when the low of bar b is lower than the low of bar a. In other, more frequent, cases, as the two shown in picture Good-Case.png, there’s no difference between calculating the stop going backwards from bar b or from the new historical maximum bar. So, no big issue in here.

    This is an automatic strategy. Things do happen when they are coded to, not when is more convenient for us in hindsight: in this case we must wait for the close of the correction bar. We can’t act preventivelly because, for example, the high of bar b could be finally higher than the current maximum and we should not update the exit yet, for a new historical has appeared but no correction has taken place after all.

    That’s it for the moment, quo and folks, many or few. Wake up if you are feeling sleepy by now and, please, don’t tell me I’m wrong (at least I am, naturally).

    Cheers

    1 user thanked author for this post.
    avatar quo
    #15604

    At least I am?

    What the f***? I meant unless I am, evidently. Sorry

    #15649
    quo

    Not sure but i am begining to feel myself lost. Even of my own method.

    I would ask permission to writte a couple of sentences in spanish saying what i have already said in order to clarify concepts. Taking into account we have already 29 entries and there are still doubts, i think is necessary.

    -.Identifico un maximo histórico. Cuando lo supera compro situando el stop en el minimo entre esos dos puntos (el maximo histórico identficado y el punto de entrada).

    -.Una vez dentro, espero a que haya una vela cuyo mínimo es inferior al mínimo de la vela anterior. En ese momento se habrá generado un nuevo máximo  (puede ser ese mismo dia, el dia anterior o el de hace dos etc…le llamaremos X) y que, una vez superado (no antes), me permite subir el stop al minimo entre el máximo X y el dia de superación. A veces ocurre que en vez de subir el stop hay que bajarlo… es raro pero puede ocurrir.

    I know this is an english chat so please sorry for this. Makes no sense open a new post in spanish if we can progress after this.

    Tikitaka, use close prices if doing so make things easier for you. It doesn´t have to be exact.

    I use a money management strategy that control the risk and avoid operations with big stops but i dont want to take it into account. I would be happy if this idea can work more or less in monthly timeframe. Apparently is a simple idea but maybe is not easy to code.

    You will say if after this we are in the same point or beyond (hope so).

    thanks a lot

    Nacho

     

     

     

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

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