Optimum Entry after Set Point

Forums ProRealTime English forum ProOrder support Optimum Entry after Set Point

Viewing 10 posts - 1 through 10 (of 10 total)
  • #135919

     

    Hi all

    I’m running round in circles trying to get a code that will trigger an optimal entry after an initial set point.  It needs to go something like this (For a Short Position in this case):

    1. High > = set point (Manually entered into code)
    2. Once condition at 1 triggered code compares current to previous high in a continuous loop until current high is < previous
    3. This current high is then the entry point as long as price is still > original set point

    Hope this makes sense? I’ve pasted my initial attempt below, but am really struggling to get it to trigger correctly

    Your help is much appreciated

    #136094

    Once condition at 1 triggered code compares current to previous high

    So you are looking for a retest of a previous high and when you get a retest fail then there is a good chance that price may go down for a while and so a short is a good bet?

    Problem is you would need to define HH and retest HH over a certain number of bars and that certain number of bars is not always the same over and over again?

    #136124

    I’d like to make it a bit simpler than that. All I’m looking to do is once my set point has been broken, I’d like to test the high vs previous high in a loop until the high is > than previous high then enter as long as still above my initial set point. hope this makes sense?

    Regards

    #136135

    Above is how I am reading the conditions in your latest post … is that what you mean?

    Hey I’m getting worried … it’s starting to seem easier to say stuff in code than in words!! 🙂

    #136659

    Apologies – I’ve been off the screen for a good while so missed your reply!

    Thanks for replying and I get what you mean about replying in code, maybe we’re all in the Matrix after all!!

    Firstly I do seem to run in to problems as it is very apparent the coding manual I downloaded from PRT Software does not have the complete set of codes and operators, hence I struggle to code what I want my strategies to do! is there a complete set of codes somewhere I am missing?

    Back to my original issue.

    I think your reply will work, but I still want to run a continuous loop until the condition is true i.e.

    1. Price is => my set point for the short to trigger the loop (ENTRY)
    2. A set of conditions i.e. high >high[1]
    3. Loops until high < high[1]
    4. Max high within the loop is recored
    5. Loop stops
    6. Code enters me into a Short (in this case)

    A second condition also need to be added if price doesn’t reverse and keeps on powering up to and/or past x number of pips past my set point for entry. i.e.

    I’m guessing an ELSE part of the IF loop:

    1. high>= ENTRY + 30 (i.e. 30 pips above original set point entry)
    2. THEN quit i.e. trade is invalid

    So to summarise an original set point for entry is entered as a variable within the code, if price = or breaks above the entry level then a loop is initiated until the current high is lower than the previous bar. It loops until this condition is met and then enters as soon as it is.

    If it keeps on creating higher highs and breaks above my original set entry point + say 30 pips (variable) the trade is invalid and quits.

    Phew! I hope this explains what I am trying to do?

    Regards

    Steve

    #136661

    is there a complete set of codes somewhere I am missing?

    You could try on the link below
    https://www.prorealcode.com/prorealtime-documentation/

    Phew! I hope this explains what I am trying to do?

    It be best if @RobertoGozzi or @Vonasi might help you as it’s getting beyond being straight out of my head now! 🙂

     

    1 user thanked author for this post.
    #136663

    As to the very first post the correct code should be (not tested):

     

    1 user thanked author for this post.
    #136696

    Hi

    I’ve attached the latest code incorporating your suggestion, but it doesn’t seem to go in below the set point and also increase the reference bar until entry? (it’s for a long entry BTW) again I cannot see wht=y the code will not do this? I’ve also attached a screen shot and for the purposes of the example used the FTSE on 20seconds from 17/06/2020 at 02:29 – set point for entry at 2234 with a stop of 10 PIPs.

    Regards

     

    #136702

    Remove lines 47 and 48.

    1 user thanked author for this post.
    #136709

    That makes a big difference – thanks for that I really appreciate your help.

    Stay safe

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

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