Can't Export proper data for testing Dow Jones (Update)

General discussion about the Tickstory Lite software package.
TesterThomas
Posts: 19
Joined: Tue Dec 29, 2020 3:45 am

Re: Can't Export proper data for testing Dow Jones (Update)

Post by TesterThomas »

These images didn't seem to upload previously
Attachments
3 Main.PNG
2 Main.PNG
1 Main.PNG

TesterThomas
Posts: 19
Joined: Tue Dec 29, 2020 3:45 am

Re: Can't Export proper data for testing Dow Jones (Update)

Post by TesterThomas »

Sacred heart of God I think I'm getting somewhere :shock: :shock: :shock:

I have followed the steps in this thread viewtopic.php?f=4&t=450&p=2732

I got the basic EA's to work, but still my own EA's are still producing a zero divide error. Even though trading in a live environment there is never a problem.

On the most basic piece of the EA, one indicator that I created, I have tested out the line provided and came to notice that (very rarely) one of the figures can "possibly" become zero, but literally 99.9 percent of the time it is not zero. This figure is then divided by another figure, and so on. I have never even seen it at zero on the alerts tab, it may be 0.2434, 0.323 etc, but never full on zero.

I am very unsure as to why this code fails to run even passed even one bar, and for all I know 1 tick when backtesting, but it runs perfectly live. Isn't backtesting the exact same as live if there are ticks in the backtest? Pretty much a perfect replay?

I'm going to try to do something in the code (will have to figure out what that is), but to skip the code if that figure is zero or something like that. I think maybe simply saying only ask the question if the figure is greater or less than zero.


Does this sound like a valid identification of the problem? As mentioned, I can't understand why there's a difference between live and a back test. I think however this will very heavily improve future programming if you could explain something about it.


Thanks

TesterThomas
Posts: 19
Joined: Tue Dec 29, 2020 3:45 am

Re: Can't Export proper data for testing Dow Jones (Update)

Post by TesterThomas »

FINALLY!!! :) :) I have the solution, you answered someone else here telling them the EA may be trying to get data for 30 days ago but there is only 20 days of data. Well my EA is built to take previous data from up to 200 candles back, and so if the EA is starting from the very beginning of the collected data it's going to be looking back to zero based data.

Thanks to Zerit0 for going out of their way to create that thread, and thanks Tickstory for all the help here. I am not sure where and when the data was not pulling in correctly, for all I know it could have been correct a few times but this zero divide error was confusing the situation.

it's just less than 3 hours away from the new year for me. And thank God this is going to be a very happy new year for me.....

The attached image is simply there as a symbol of celebration. Of course currently celebrating that my EA loses money :lol:
unlimited trades however, so that's understandable :D

I was seriously getting very worried about all this. I thought maybe backtesting just isn't for me :lol:

Well hopefully this marks the beginning of a big and exciting journey...
Attachments
Let the testing begin.PNG

tickstory
Posts: 4883
Joined: Sun Jan 06, 2013 12:27 am

Re: Can't Export proper data for testing Dow Jones (Update)

Post by tickstory »

Hi Thomas,

That's great to hear that you've got everything working! Debugging EAs can be tricky sometimes which is why the best approach is to eliminate all variables and just get the environment working first.

Happy New Year to you - and happy back-testing ;)

TesterThomas
Posts: 19
Joined: Tue Dec 29, 2020 3:45 am

Re: Can't Export proper data for testing Dow Jones (Update)

Post by TesterThomas »

Thanks

Yeah it can be a real pain, but thankfully I've a bit of experience now in programming and one of the most important things I have learned is definitely related to what you said about eliminating variables. The problem is almost never where you think it is. Isolation of pieces is a difficult and complicated skill to acquire since in programming it's very often new circumstances you're dealing with. But because of the experience I have so far I was much less frustrated than I would have been without that experience.

Getting to the point that you first of all know that you're pounding against an unbreakable wall, and then realizing that the solution lies in creating a better pathway for the code you've already created is probably almost as important as being able to code in the first place.

it's complicated, annoying, but also very interesting and fulfilling at the same time.

I was wrong about the new year thing, I have actually got another 21:3 hours to get even more done before the new year kicks in :lol: :lol:

Well happy new year anyway and thanks again

Post Reply