Multi time frame and trailing stop management

Forums ProRealTime English forum ProOrder support Multi time frame and trailing stop management

Viewing 15 posts - 1 through 15 (of 63 total)
  • #99017

    Ciao Nicolas,After a lot of posts and the very precious help from Roberto, finally my system works well. But now it remains a BIG problem concerning the management of the trailing stop. I understand that PRT has to wait for the current candle to close in order to carry out the processing and if necessary move the value of the trailing stop. In many cases this delay leads to major differences in the overall performance of the system. The solution to this problem could be the new PRT multi timeframe function. I would therefore need your kind help in this regard to understand how to proceed with the modification of my active system. Up until line 43 everything works fine. However, at this point I would like to switch from the daily time frame to a 1 minute time frame to more quickly check price changes and quickly adjust the level of trailing stops. Could you please tell me what to write in the system in order to use the 1 minute timeframe from line 49. Thank you very much for your kind help. Thank you. GRAZIE !

    #99030

    I did not test the below code, but you only need to add the TIMEFRAME instructions to embed the desired code in the desired timeframe!

    Of course, you’ll have to launch it in the lowest timeframe.

    #99035

    At Line 5

    and at Line 49

    You will need to run the System on 1 min Timeframe.

    You will also need to rename (e.g. add 1mn to the variable name) the variables occuring / being used in the two TFs as you can’t use the same variable name in 2 TF’s.

    Let us know how you get onplease

    #99162

    Thank you very much for your answers. You are very kind and I really appreciate your help. I will try as soon as possible to modify my system following your instructions. Using multi timeframes is the only way to quickly check price changes and adjust the trailing stop value without delay or are there other ways to move trailing quickly? How do you manage the trailing stop values ​​in your systems? My trailing stop management is very simple. When I reach half of my initial target I move the stop loss to the entry price and when I reach 80% of the initial target I move the stop loss to half of the initial target and at the same time start the trailing stop. What do you think of this my risk management? Is it possible to get it without using the multi timeframe? do you have any other suggestions to give me or is the 1 minute time frame still the best solution? (I refer  to lines 49 to 55). Thank you again for your answers and I will let you know how my tests progress. Grazie. Ciao.

    #99446

    Did you get this System at least trading Albert FX?

    I still had it in my List and I am having a clearout … they build up so quickly! 🙂

    I had a play for 10 mins and got it trading, attached is the .itf file running on 4 hour default and Daily.

    Attached may be useful and you can improve.

    There is something very strange … the equity curve shows a profit, but the Detailed Report shows a loss.

    I feel like my coffee has not woken me up yet and I am missing something very obvious!? 🙂

     

    #99527
    Indeed it is very strange. I’ll try some more tests. In reality the system was designed to trade Forex with 4 hour timeframes using the signals of Bill Williams fractals and in this way it should work well with good profits but I don’t know if it could work just as well with other instruments. Then I had big money management problems because after many tests I realized that the system waits for the completion of the candle to calculate and eventually shift the level of trailingstop, and the results I obtained were not real. Fortunately, now with the new multitimeframe version this kind of problem should be solved, and thanks to your help I’m going in the right direction. The current version of this my system is just a simple example with few conditions created just to understand the operation of the trailingstop in order not to have a too complex code that could create confusion by publishing the various requests on the forum. Initially I had thought of dividing my system into three parts. The first are the basic parameters (and I would also like to use the day of the week as a filter as Larry Williams does to see if there are more profitable days than others). The second part contains the entry conditions, so it is sufficient to replace them to try many price patterns (hikkake, IDNR4, Pop Gun, 123 Joe Ross …) and see if there are better configurations than others. The last part concerns the money management which currently has a take profit and a stop loss which correspond to the range of the setup candle but which in the final version will be replaced by the ATR trying to optimize them in the various combinations with steps of 0.5 (1ATR TP + 1ATR SL or 1.5 ATR TP + 1ATR SL etc …) with the trailing stop that starts when 50% of the initial target is reached, as I wrote in my previous post. This is why my system is not 100% functional but for the moment it has only a didactic purpose. When I understand well, planning the trailing stop I will start with the real tests with the Fractals and the ATR for money management. I will surely keep you informed on how my trials proceed and if in the meantime you have any suggestions for me I am always ready to listen to you. GRAZIE !!
    #99535

    Sounds great!

    I look forward to ongoing developments and I like the idea of the 3 parts … makes it more manageable and feels not so overwhelming! 🙂

     

    #99583
    I thank you for the answer and I’m glad you appreciate my method of code management. I think that it is much easier to make changes and make quick tests when a new trading idea comes to us. I will keep you fully informed of any development of my system in order to share my experiences with you and possibly with other forum members. I wanted to ask you if you had discovered the reason for the difference between the result of equity curve and the list of trades. When maybe you have a minute you could please try running my code on EURUSD (4 hour timeframe, with the trailingstop check in 1 minute) and see what happens? I will do my best to fix my code as soon as possible, putting the fractal as the entry condition and the ATR as an indicator for the profit target so you can, if you like, check if everything is correct and maybe give me some important advice on how to possibly improve it. When the system is working properly, I will immediately start trying all the possible combinations between the main currency pairs, the days of the week and the size of the ATR as take profit and stop loss, so we can finally also talk about system performances and not just how to make it work.
    CIAO, GRAZIE !!
    #99589

    Using the code I attached above called Albert.itf

    eurusd
    1 min default T
    spread = 2
    100k bars…

    1st Image is with this …

    2nd image is with this (for comparison)

     

    #99597
    Thank you for trying to run my code, you are very kind, but as I wrote to you before this is just an example code to understand the function of the various commands. As you have surely seen, in lines 24-25-26 the entry conditions are simply based on crossing the zero line of Bill Williams’ Awesome oscillators. Now that I will replace this type of entry with the crossing of the fractal line and I will (I hope) fix the trailing stop, most likely we will get the results we expect. I take this opportunity to ask you again for a little help. In lines 58 and 59 of my code I tried to set my trailing stop by replicating the one created by Nicolas. But I think I didn’t understand one thing … Does the value called “trailing start” represent the number of pips to which the trailing stop is added? Or is it the point from which it begins to move automatically? I’ll give you a practical example: my trade price is 1,1200 and my initial target is 1,1300. When I reach 50% of my initial target (ie 1.1250) I move my stop loss  to the value of the trade price (and this is done from lines 55 and 56 and currently works well). When I reach 80% of my initial target (ie 1.1280) I would like to start the trailing stop from the 1.1250 level. In this case the “trailingstart” value is 1.1280 or 1.1250 ?? And if the trailingstart is 1.1280 how can I tell the system to start going up from 1.1250? Thank you very much for the help you are giving me and I hope as soon as possible to share an updated version of my code with you so we can see the results and any improvements together. CIAO, GRAZIE.
    #99599

    You should use both GRAPH and GRAPHONPRICE  extensively to monitor all the variables you need to, candle by candle.

    You’ll find out easily and faster their behavior.

    1 user thanked author for this post.
    #99645

    With this line at the end of the code:

    you’ll get the exact price of your trailing stop plotted on the price chart, in order to understand how it behaves.

    1 user thanked author for this post.
    #99651

    Attached shows breakeven as the thick black line … so it appears to be working.

    We just need to get more trades now?

    That last long trade appears to be following the equity curve?

    #99660
    CIAO, Thank you very much for your kind answers. I followed your advice and I put the values ​​of the “breakeven” variable on the chart and I can confirm that unfortunately it still doesn’t work. My system correctly moves the initial stoploss to the value of the trade price when I reach 50% of the initial target. When then I reach 80% of the initial target the system moves the stop from my trade price to 50% of the target but then this value does not move anymore. I am attaching two screens where this big problem is clearly seen. In the list of completed trades, there are some trades with an abnormal duration, for example 36 days and also 10, 11, 20, 15 days. In all these operations the stop loss has been correctly shifted to 50% of my initial target (in fact the Abs Perf corresponds to around 50 euros which is half of my target) but then it remained there. In the graph that I attach, it is clear that I opened a position on April 27th 2015. Then the price rose a lot, producing a considerable profit but the trailing did not follow this climb. In fact, the transaction was closed on 25 May 2015 when the price turned back and touched the stop positioned at 50% of the initial target. This could have been a very profitable operation and instead it would have earned me only 50 euros. And like this all the other operations that last many days. Surely the problem is found in lines 58 and 59. I hope that NIcolas who invented the coding of the trailing stop or anyone else can help me correct this strange and wrong behavior. As soon as possible I will modify the entry conditions by putting the fractal and the target profit using the ATR and then I will send you the new code. In the meantime, I hope someone can help me fix the trailing. GRAZIE !!!
    #99663
    Sorry, the lines that don’t work are 53 and 54
    GRAZIE !!
Viewing 15 posts - 1 through 15 (of 63 total)

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