oil-10min-hammernegated-pattern-strategy
Forums › ProRealTime English forum › ProOrder support › oil-10min-hammernegated-pattern-strategy
- This topic has 93 replies, 25 voices, and was last updated 4 years ago by nonetheless.
-
-
08/03/2017 at 2:35 PM #42409
Hi Francesco,
Right now, the trailing you have coded fixed the benefits above TGL (or TGS for short). Once the price is above TGL, the trailing stop is activated. Sometimes, I have realised that when is winning 32 pips (in case of TGL=32), it activate the trailing just above cero.
Following this example, is there any way once the price goes 32 pips that it could be locked to 15 for example? I am studying this part of the code, but have no clue on how to get it. I was never the smartest kid of my class :)), so I wanted to ask you first, in case there was an easy solution (i.e.- just changing the value of some parameters).
If any other case, I will continue studying your trailing code.
Thanks anyway for the hammer negated. It works really well.
Best,
Juan
08/03/2017 at 2:53 PM #42410That’s right, this trailing stop code is the ‘max favorable excursion’ one you can find in this blog article: https://www.prorealcode.com/blog/learning/trailing-stop-max-favorable-excursion-mfe/
But the way you want the trailing stop to move is the one explained in this other blog post: https://www.prorealcode.com/blog/trading/complete-trailing-stop-code-function/
with this last one, you can set the “trailing start” which is the amount of point in profit to start the function and the “trailing step” which is the step in points of the stoploss.
3 users thanked author for this post.
08/03/2017 at 3:02 PM #42413Hi Nicolas,
Thanks so much. I will check those blogs. Nothing that is achievable is enough.
Best,
Juan
08/03/2017 at 3:09 PM #42415I meant: Knowing that is achievable….
08/03/2017 at 6:39 PM #4243908/06/2017 at 7:51 PM #42571@Despair: You are right. It close the winnings prematurely. What I am doing is setting the trailing start close/equal to my profit, and allowing the profit to run after securing benefits, but it is not as simple as I pictured it in my mind 😉
08/11/2017 at 6:54 AM #42990Hi.
I have ran Nicolas fix version of this strategy since some of us could not make the org. Version to start in.live prt.
Now i stopped the strategy after 10trades or so to up my contracts but after doing so it wont start again. I Get error stopped after pushing start/run and code says
Not enough historical data and preloadbars need to.be same or above 1000?
08/11/2017 at 7:59 AM #4299908/11/2017 at 8:35 AM #43001I got loss in real buy but I also got.loss in.backtest ,but I have tested many times in.bactest and somethimes this trades win as well. Sometimes it happens but I dont belive its a big problem becase sometimes you win.and bactest showes loss 🙂
08/23/2017 at 1:22 PM #44437Hi Francesco,
I really like this strategy of yours but I had a problem with the wide stop loss. The result of having such a wide SL is that you get a buy/sell signal and then it is possible that the trade just goes sideways for a long time without hitting TP or SL. This didn’t feel right for me. If we get a negated hammer the result should be a direct move in the direction of the trade. Staying in the trade longer makes it a game of chance IMO. 2-3 hours (or more) after the negated hammer the signal has lost it’s power and the trade failed in my eyes. Staying in the trade longer then is only hoping for the trade to develop in the right direction. And I don’t like hoping. 😉
Therefore i introduced a time stop. After 3 bars (30mins) I check if the trade is in profit, is this not the case i close the trade.
Time stop1234567if barindex-tradeindex=3 and positionperf<0 thenif longonmarket thensell at marketelsif shortonmarket thenexitshort at marketendifendifAdding this time stop to your strategy of course reduces the winning % but risk is contained much better and the average losing trades is reduced by 80%!
I think this is an improvement that rectifies the time stop.
1 user thanked author for this post.
08/23/2017 at 2:20 PM #44449thank you Despair! I agree very much with what you said. I am travelling now and I cant test your code right now. Would be great if you post a picture of the statistic of the strategy. thanks again.
08/23/2017 at 2:55 PM #44455Here is the result of my version (I have probably made more changes to your original version but forgot which hahaha) with time stop. My version without time stop had an average losing trade of about 60 USD. Now it is down to 10 USD.
BTW: Some time ago you mentioned the possibility to team up in strategy development. I would be interested in a little tighter cooperation with a fellow physicist. 🙂
08/26/2017 at 5:14 PM #44673hi Despair, many thanks, apologies for the late reply but im travelling in Greece right now. yes sure we can try to team up in strategy devopment.
Edit by admin:please don’t share personally information on forums, thank you.
1 user thanked author for this post.
09/06/2017 at 6:26 PM #4565010/05/2017 at 9:36 AM #48239 -
AuthorPosts