Automated trading with Pivot Points and Dojis

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

Viewing 15 posts - 61 through 75 (of 85 total)
  • #71173

    Thank you, it is good to know, that the code is actually working, but it is just not working on my pc. What could be a reason for that, since my picture shows a different result?

    #71184

    I can’t be of any help about this, maybe it’s because you deal with Futures while I trade CFDs, or maybe you are using end-of-day data.

    I have no further clues.

     

    1 user thanked author for this post.
    #71259

    Once again, when I use the following code with the euro dollar mini chart, the trade does not close when a new lower low forms. This exact code is working at different markets, like DAX or DOW JONES. The picture shows thursday 20.07.2017, and I backtested 100000 units.

    Do I have to consider something special when using the euro dollar mini chart? Thank you!:)

     

    #71262

    Once again, when I use the following code with the euro dollar mini chart, the trade does not close when a new lower low forms.

    It simply DOES what you wrote. At line 95 you wrote to exit a LONG trade when a CLOSING price is lower THAN the previous low, not when it makes a lower low!

     

     

     

    #71265

    I’ve not really been following this thread but thought I would test the code you have given. I think I have the same section of chart as you and mine works fine.

    Screenshot_2-2

    I do notice a couple of things in your code that are unrelated. You have declared the variable values after they are used in a condition so as code is processed from top to bottom the value in the condition will be zero rather than your desired value:

    Also you give a value to a variable at time of market entry and then use it as a condition to set a sell stop which is unnecessary as just being on the market is sufficient conditions to set the sell stop.

    Also you should consider that when a position is opened the Sell Stop will not be set until one bar later as at the time of entry the condition of OnMarket is not being met so you should put the Sell Stop in at the same time as the market entry is made or use a Set Stop Loss at time of entry and then add the Sell Stop one bar later.

     

    2 users thanked author for this post.
    #71270

    Once again, when I use the following code with the euro dollar mini chart, the trade does not close when a new lower low forms.

    It simply DOES what you wrote. At line 95 you wrote to exit a LONG trade when a CLOSING price is lower THAN the previous low, not when it makes a lower low!

    Yes but in the picture he attached it does not adhere to that rule. The arrowed candle should be the decision to exit.

    Screenshot_3-3

     

    1 user thanked author for this post.
    #71273

    Once again, when I use the following code with the euro dollar mini chart, the trade does not close when a new lower low forms.

    It simply DOES what you wrote. At line 95 you wrote to exit a LONG trade when a CLOSING price is lower THAN the previous low, not when it makes a lower low!

    Isn’t that the same?:)

     

    #71274

    I don’t get it why it sometimes works and sometimes it doesn’t work, this is very frustrating:( But apparently it always works with your computers. Maybe I do have to get some updates on my computer or something.

    #71275

    Isn’t that the same?:)

    No.

    Decisions are made at the close of a bar and so at that time the low could be lower than the previous bar but the close higher – or both the low and the close could be lower.

    #71276

    What spread have you set for the backtest?

    #71277

    The spread was 2.

    #71278

    The spread was 2.

    OK – that shouldn’t be the issue then.

    I’ve taken the liberty of tidying up your code a little but I cannot explain why it closes the position at the wrong time on your chart. Which broker are you using?

     

    2 users thanked author for this post.
    #71279

    Adding

    helped me to spot that ldbs2d is negative because it subtracts 2 from 1.14793. Try with line 84 replaced by

    Now the trade you outlined will end at the closing of the candle with a closing price < low[1] (ProOrder will display a cross above the next bullish candlestick).

     

     

    1 user thanked author for this post.
    #71281

    This code solved another big mystery I was going to post in here:) Thank you very much!!!

     

    #71282

    The spread was 2.

    Which broker are you using?

    I’m using firefox and I just downloaded a java update, but nothing changed. I will try internet explorer now.

Viewing 15 posts - 61 through 75 (of 85 total)

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