PROBACKTEST strategy to code

Forums ProRealTime English forum ProOrder support PROBACKTEST strategy to code

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

    Hi everyone! I need some help, please .. I would like to make a backtest code and a proorder with the following parameters:
    Long operations:
    – The closing of yesterday has to be higher than the opening of yesterday
    – The closure before yesterday has to be less than the opening before yesterday
    – The SMA 14 has to be on the rise
    – The purchase order is executed when the price touch the maximum daily yesterday.
    – Trailling stop 10%

    Short operations:
    – The closing of yesterday has to be less than the opening of yesterday
    – The closure before yesterday has to be higher than the opening before yesterday.
    – The SMA must be downward
    – The sell order is executed when the price touches the daily minimum today yesterday
    – Trailing stop 10%

    Sorry about my englsih and thanks a lot in advance for your help!!

    Nuria

    #15134

    Hi, girl. Yes, I’m sorry to say that your English is bad indeed. Let me rewrite the post for you in advanced English:

    Hi everyone! I need some help, please: How can I learn to program this very easy to code strategy?
    I’m sure you’ll then help me with all my beginner’s errors. Thanks in advance!!
    ‘Lazy’ Nuria
    Better?
    #15136

    Hi Nuria, from where did you get this strategy description? Is it yours?

    It is true that this strategy is easy to code, did you even try with the assistant?

    #15158

    Titikaka, thanks for your help. Sorry if I’m not in your level, I,m a begginer.

    Have a nice trading.

     

     

    #15160

    Hi Nicolas!

    Thanks for your patience! I get this strategy after tried on MT4, after long time, whit some mix of strategies from some books. I do that in Indices, TF: 1D, and it works fine, but I want to improve a little bit the strategy with Prorealtime. I tried to do it with the assistant but I can’t get how to put the bar of yesterday and befeore yesterday, and how to put conditioned. Also I don’t know how to put that the SMA 14 in green or red, like I have drawn on my graphic.

    I will try until I get it! I would be grateful if you can help me.

    Thanks a lot!!!

    Nuria

    #15322

    This code is for long side only, I think you’ll have no difficulty to adapt it for short side by yourself:

    The breakout of the yesterday’s high last only 1 bar.

     

    #15452

    Nicolas, thank you very much!  I was tried to do the code for long side with the assistant to compare with your code, and I get it some different…

    Do you know if there is any lessons about the basics of the assistant?

    Thanks a lot!!

     

    Nuria

    #15468

    >> For clarity of messages on ProRealCode’s forums, please use the “insert code PRT” button to separate the text of the code part! Thank you! <<

    The result code from the assistant is pretty much the same, you use here the daily OHLC instead of the current timeframe ones. About the breakout (buy level) of the daily high on lines 10 and 11 you should use the crosses over instruction instead. Here you are testing if the current close is exactly the same as the daily high which is almost impossible to be true.

    There is a video about how to create an automated trading strategy with the assistant in the blog.

    #15537

    Thakn you very much Nicolas!! Have a nice day and a nice trading..

    #15598

    Glad to see you are not lazy Nuria but fighting Nuria after all. That’s the way and the only way.

    Good luck with your trading.

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