Automated trading with Pivot Points and Dojis

Forums ProRealTime English forum ProOrder support Automated trading with Pivot Points and Dojis

Viewing 15 posts - 31 through 45 (of 85 total)
  • #70395

    I tried to change the time frame for the daily pivot conditions by only considering the 34 candles before 16:30. But apparently that is also not working:(

     

    #70426

    Is anything working? 🙂

    Why don’t you get a simplifiedcut down version working then start building it back up again?

    If anybody else can offer any help here then feel free? 🙂

     

    #70429

    Everything else is working:) There is just this little time issue left.

    #70430

    Sorry to bother you again, but it is almost working:) I enhanced to range of the day to the whole day from 0:00 till 23:59 and the pivot lines match those of the chart:) The profit is also still high. But now I have a new issue:( As you can see in the picture, the pivot lines are good for tuesdays till friedays but they are pretty messed up on mondays. I have no idea why that happens.

    #70434

    the pivot lines are good for tuesdays till friedays but they are pretty messed up on mondays

    Now I’ve forgotten again what market this is on sorry? 🙂

    Are the Pivot lines based on price the day before? If Yes, then the DAX and other markets  open for 2 or 3 hours on Sunday night (e.g. EUR/USD @ 22:00 and DAX @ 23:00) so this could be screwing the Pivots for Monday??

    Just an idea / immediate thoughts?

    1 user thanked author for this post.
    #70436

    You don’t have to say sorry:) Yes it is the DAX, and you where right about sunday. Now I change the code to this and the pivot lines for mondays are align with those within the chart:) Thank you so much!!!

     

    1 user thanked author for this post.
    #70457

    Why not code fewer lines re days other than Day 1 and use …

     

    1 user thanked author for this post.
    #70557

    You are right, that looks better!:)

    Unfortunately there still seems to be a problem with my stops.

    I tried to set the stop to the highest high of the doji or of the confirmation candle right next to the doji. So if the high of the doji is higher, then this is my stop, and vice versa. Additionally the stop should be placed 2 points higher than those highs, because of the spread. But as you can see in the picture the trade is exited by the condition when a close ist higher than the previous high. It should have been closed somewhere around the red line. It would be nice if the stop was triggerd immediately and not at the open of the next candle. Thank you very much for your help!:)

     

    #70567

    To get an immediate exit (not at end of candle) try this …

    The difference is that you are setting the Stop at Trade Open.

     

    #70627

    This did not change anything. And the conditions where it places the stop would also be neglected.

     

    #70643

    I tried a different approach but as soon as I added one more Pivot Line the system fails again and messes up. It works for only one Line, though. Within this approach I tried to store the candle conditions of the entry. It was also not possible to write the exitshort commands within the “if bearishp” conditions. I had to write them into new if conditions afterwards.

    I don’t know what to try anymore, or if it will work at all like I planned. Any suggestions?:)

     

    #70645

    Sorry to write again, but I coudn’t edit it anymore. A simple solution might be to set up 8 different trading systems where each system consideres a different Pivot line and execute all of them at the same time. Does that make sense?

    #70647

    I’m not one bit a supa-coder and have to visualise more complex actions happening in order to understand them and so all I have been doing is offering a solution to your snippets that you said did not work.

    Maybe supa-coder @RobertoGozzi (or AN Other) might happen along anytime soon and see what is wrong with your System?

    In the meantime, to make it easy for helpers …

    • Post an equity curve of results from a backtest.
    • What is the most significant function that is not working?
    #70660

    I was looking at code at post https://www.prorealcode.com/topic/automated-trading-with-pivot-points-and-dojis/page/3/#post-70557, these are the logical errors I could spot:

    1. lines 24 and 28 + 41 and 43 may assign new values to the variables that mimic a stoploss at each new bar because they do not tell between being or not ONMARKET and this behaviour will change the results of your attempts to exit due to SL, so they should not be changed ONCE a trade has been opened (line 22 should read If bearishp and Not OnMarket then)
    2. at lines 34, 36, 53 and 57 variables HDBP, HNBP, HDBR1 and HNBR1 will always be true once they have been set the first time, while you should reset them to ZERO when Not OnMarket, I guess;
    3. line 61 will NEVER be true, since you want to exit at a price which is either 0 or 1; for sure it won’t work with DAX, it may turn true with EUR/USD if that pair falls to 1.0000 and at that very moment that line is executed, what did you want to do with that line?

     

     

    2 users thanked author for this post.
    #70698

    First of all, thank you very much!!! 😉

    I changed a few things, but it is still not executing the exitshorts when hitting the highest high of the doji or the trigger candle. Where the red circle is, was it supposed to exit.

     

     

Viewing 15 posts - 31 through 45 (of 85 total)

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