Multi-Timeframe trailing stop

Forums ProRealTime English forum ProOrder support Multi-Timeframe trailing stop

Viewing 15 posts - 1 through 15 (of 16 total)
  • #146597

    Hello every one,

     

    I hope you are well!

     

    i have a strategy on the DJI in UT3min. In this strategy I have a trailing stop that is, for now and obviously, calculated every 3 minutes which is the UT of the code.

     

    I would like to know if I could code the trailing stop with a smaller timeframe for it to be more reactive or if you think of another solution!

    Thank you so much!

    #146598

    Hi Tanou

    You can run the 3min strategy on a smaller timeframe to get a faster trailing stop. Just make sure you put your main code within the 3min timeframe and launch the script in the smaller timeframe.

    #146599

    Thanks @Eckaw! However if I optimise my stratégie in 3 minutes and launch it in 10 seconds for example it would be execute in 10 seconds and not 3 minutes as optimise and it can change everything..!

     

    what I’d like to know if only the trailing stop part could be on a smaller UT, like 1 minutes or 10 seconds for instance 😉

     

    Do you get it? 🙂

    #146603

    Yes, easy to do as below … very rough, but you get the idea?

     

     

    #146607

    hi perhaps have a look at barhunter strategy for an idea

    #146638

    Thanks to both of you! 🙂

    That’s exactly what I’ve wanted to try @GraHal but I wanted to know if it was possible. I’ll try that then 😉


    @Paul
    , I don’t quite get what you mean by Barhunter…

    #146643

    Do you know which  smaller UT than 3 minutes and is a multiple?

    #146645

    You can use any of the selectable Timeframes but the lower one has to divide  into the higher TF.

    So for example you cant use 2 min as lower and 15 min as higher TF as 2 does not divide into 15.

    #146646

    I don’t quite get what you mean by Barhunter…

    Paul is referring you to the Algo on the link below, but re which snippet of code … maybe Paul will describe so you can find the snippet?

    https://www.prorealcode.com/topic/strategy-barhunter-dax-v1p/

    #146647

    Thanks @GraHal. However I tried to write the trailing stop part in a smaller UT but when I try to bakctest it, the system keeps telling me that I have to use a mutliple of 3 minutes and that’s the problem, I can’t find a multiple of 3minutes which is smaller. I tried 6 / 3 / 9 seconds but it doesn’t want it… Do you know any multiple smaller of 3 minutes but lower?

     

    Thanks so much! 😀

    #146648

    9 seconds is no good for anything as it doesn’t divide into 1 minute.

    Try 1 min as the lower TF just to get your code working?

    30 seconds should work also, and 15 secs and 5 secs.

    #146653

    I just tried one minute and still.. I don’t know which smaller UT I could use.. Seconds doesn’t match with minutes?

    #146657

    @Tanou

    Your chart needs to show the 10 second-TF (or whatever else you prefer, provided 3 minutes is a multiple of that TF).

    #146659

    For instance with this code:

    As I wrote it in the code I’d like to get the first part in 3 minutes and the bottom of the code in a smallerUT. I don’t succeed to make it for now.

     

    Could you give me an example with this code? What do you write and in which UT should be the graph?

     

    Thank you so much one more time 🙂

    #146661

    hi Tanou

    Now I reread your question, you want it probably different then I thought.

    In barhunter, the backtest is done on a 1 hour timerframe, but runs live on 1 minute. The trailing stop is split in the timeframes to work correctly.

    Here’s the file if you want to have a look.

     

Viewing 15 posts - 1 through 15 (of 16 total)

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