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.
-
-
07/14/2017 at 7:02 AM #4060407/14/2017 at 9:01 AM #40609
Hi Carras:
here is no stop if the price moves immediately against any new trade position? (either long or short). Also i’d be interested in hear how you decided on TGL = 18 and TGS = 24 ?
Yes that is correct there is not global stop, you can add a stop as suggested by Kenneth. 18 and 24 came from optimization.
Regards
1 user thanked author for this post.
07/14/2017 at 9:04 AM #40610Kenneth or Francesco , You can describe the conditions, i want to try to im metatrader and see the differences. Thank you for your contribution. mik
Hi Miguel.
hammerup = min(open[1],close[1])>high[1]-(high[1]-low[1])/3 //and timeok
hammerupnegated= max(open,close)<min(open[1],close[1]) and abs(open-close)/(high-low)>x
cs = hammerup and hammerupnegated and bear
hammerdown = max(open[1],close[1])<low[1]+(high[1]-low[1])/3 //and timeok
hammerdownnegated = min(open,close)>max(open[1],close[1]) and abs(open-close)/(high-low)>x
cl = hammerdown and hammerdownnegated and bullif cs then
sellshort p contract at market
endifif cl then
buy p contract at market
endifThe code looks for hammerstyle candle that are negate in the following candle i.e you have an hammer up and then you have a candle whose body is all below the body of the hammer up candle. There are also momentum filter as below:
av1 = average[5](close)
av2 = average[10](close)
av3 = average[50](close)
bull = close> av1 and close >av2 and close > av3
bear = close <av1 and close <av2 and close <av3Hope this help
Best
Francesco
07/14/2017 at 9:10 AM #4061107/14/2017 at 9:12 AM #40612Thanks Stenozar, havent changed anything from the one I posted at the beginnning, you can use that.
Regards
Francesco
07/14/2017 at 9:37 AM #40613The initial code that francesco78 posted is still the original one. But some of us(like me) gets a divition zero error when we run it in autotrading. This might be fixed with the last solutiin francesco78 wrote. But seems like I still have to wait until next week to get a tradingopertunety and veryfi that the fix was good.
07/14/2017 at 9:53 AM #4062007/16/2017 at 7:45 PM #4081907/16/2017 at 9:02 PM #40824hi Enzo, you can find the average profit by running the backtest and looking at the details.
regards
Francesco
07/17/2017 at 9:39 AM #4084207/17/2017 at 9:50 AM #40844hi guys, thank you for the work you are doing, I did not have this division by zero problem, but maybe you could just try to modify the formula like this max(open,close)<min(open[1],close[1]) and abs(open–close)/((high–low+0.0000001))>x? Doesnt change the idea underlying idea and should work as a trick? Best
07/17/2017 at 11:18 AM #40850How is your backtest with your fix francisco78?
When I use this upgrade/fix the system changes quite abit.
Can I use 0.001 insted?
1 user thanked author for this post.
07/17/2017 at 11:35 AM #40853Doesnt change much, the smaller the twick the better in my opinion. Have you tried it live with the trick? Doest it work properly?
Best
07/17/2017 at 5:54 PM #40886Still waiting for a automaded trade with juanj’s fix.
I just tested your fix in backtest and it got from 2 max losses to 4.
Havent done so much more then that, just waiting for new trade at the moment 🙂
07/17/2017 at 8:10 PM #40901hi all ,
thanks for the system francesco .
i ve put three version in live , in demo but in live .
i ve put a stop loss at 100 in a system and 190 in another and the results are a little better .
but for me the problem is that system only works on crude ( oil …) .
I va tried indices ( france , germany and wall street ….) in several timeframes ans no one seems to work well …..
Does anyone found something were the system works well ?
-
AuthorPosts