Oil 15 minutes meanreverting strategy
Forums › ProRealTime English forum › ProOrder support › Oil 15 minutes meanreverting strategy
- This topic has 48 replies, 13 voices, and was last updated 6 years ago by stockdemon.
-
-
10/06/2017 at 9:13 AM #48394
I have had alot of issues when running this code. The system have stoped several times, and because of that I missed winning trades. When I have restarted the system again the system have taken a different direction than the system is actually in. Have anyone other than me experiancede the same?
10/09/2017 at 8:25 PM #4881110/09/2017 at 9:47 PM #4881910/09/2017 at 9:56 PM #4882110/09/2017 at 9:57 PM #48824@andyswede: Ah, I saw now there is another contract. Cool 🙂
10/09/2017 at 10:36 PM #4882810/09/2017 at 10:42 PM #4883210/09/2017 at 11:07 PM #4883310/10/2017 at 6:19 AM #48847I have been running the alog for a about a month now and the results are not good. The algo stops alot and I miss winning trades because of it.
Las time it stoped I got the following message
“This trading system was stopped due to a division by zero during the evaluation of the last candlestick. Please add protection to your code to prevent division by zero”
I have not been able to resolve the issue yet, but I will keep looking. Let me know if any of you gus have any suggestions to how to fix it.
10/10/2017 at 7:29 AM #48854@Yngve, I’m getting the same error, and yes, the past month has not showed great results. It might ofc be from overfitting or it might just be a random slope in the algos profits. Guess we gotta keep this bad boy on demo until errors go down and profits go up 🙂
10/10/2017 at 8:39 AM #48869There’s a division by zero error which I’ve solved by using the following code:
if abs(Dhigh(0)-Dlow(0)) = 0 then
fullness = (Dclose(0)-Dopen(0))/0.000001
else
fullness = (Dclose(0)-Dopen(0))/abs(Dhigh(0)-Dlow(0))
endifYou could also probably just skip the evaluation when you’ve got zero division. I think the above works as well.
10/10/2017 at 10:07 AM #48883As I posted many times, this is the solution
fullness = abs((Dclose(0)-Dopen(0))/(Dhigh(0)-Dlow(0)+0.00001)
10/11/2017 at 9:12 AM #49006@Francesco78 Thank you for the reply. I tried to change the line of code your referring to but got even worse results. So I changed it to
fullness = (Dclose(0)-Dopen(0))/abs(Dhigh(0)-Dlow(0)+0.00001)
What do you think about that?
@jebus89 Yes I’ll be running it Demo from now on for awhile10/11/2017 at 7:23 PM #49060As I posted many times, this is the solution fullness = abs((Dclose(0)-Dopen(0))/(Dhigh(0)-Dlow(0)+0.00001)
It’s a solution, I prefer something which can’t yield division by zero. I don’t think it’s likely to create any weird results either.
I bet your solution works too with the underlying primitives, altough without the exact knowledge of how they work it still looks like possibly erroneous code.
10/11/2017 at 7:47 PM #49061As I posted many times, this is the solution fullness = abs((Dclose(0)-Dopen(0))/(Dhigh(0)-Dlow(0)+0.00001)
It’s a solution, I prefer something which can’t yield division by zero. I don’t think it’s likely to create any weird results either. I bet your solution works too with the underlying primitives, altough without the exact knowledge of how they work it still looks like possibly erroneous code.
abs((Dclose(0)-Dopen(0))/(Dhigh(0)-Dlow(0)+0.00001) cant yield to a division by zero as High -Low is bounded to zero, so high +low + 0,0000001 is strictly positive
-
AuthorPosts
Find exclusive trading pro-tools on