What happened? I had the tab with the bot code i code on opened. Now i go back to it and the content is set back to a state it was hours ago in. Strg+z or y doesnt work. Must have been reloaded for some reason i dont see . I always saved and backtested (which includes a save) when i worked on it. Then i came back to work on it and started a backtes without checking the code, because i wanted to see the actual error messages or results. Then errors came and i found that the code is at an status from hours of work ago. It doesnt look like i can get my old code back. Are there backups of the older statuses? And what happened? Server problems? If i would have known this can happen then i would have saved it outside of tradewave.
This is probably a question for email@example.com , but also good to have the warning on the forum for other users.
I'm sorry I don't know the answer to your question, I do remember a time when it seemed my code was autosaved and I didn't want it to be, and another time when I had to open a new tab and re-open the bot code through 'my strategies' to get the desired state.
I would try keeping the tab open, go to 'My Strategies' and open the bot code again in another tab, and see if they are different. Keep the one closest to what you need. I think that's a safe thing to try until you can get an answer from @james.
The thing is that when i wanted to move on with coding, i started a backtest, which triggers an autosave automatically. So the code was saved, if it wasnt already before, and when i opened the strategy in a new tab then the code was the same. But in the old window there was no trace of past changes. So ctrl+z didnt work. Though i worked on the bot on the same tab some hours ago. I dont see how the code could have been sat back without my doing. I had saved a hundred times in between while coding, so the only reason i see is that the server had a problem. But why the editor is getting the old code automatically is something i dont get.
Am I correct in assuming that this is a Python strategy? Whenever you click Save or Run a backtest, it's going to take the current source code that is in that browser window and overwrite the latest version that Tradewave stores, even if it's an older version.
So you should be really careful with keeping multiple tabs open. But please note that we don't currently auto-save anything, it must be triggered by you.
I hope that clears things up. Sorry if you lost any code -- I recommend occassionally copy+pasting into a text editor on your local machine, just in case.
Hm... maybe i really made an error somehow. I know that at one point in time i had a second tab with the same code opened. Though i was sure i worked only with one tab later. So if there was no server issue the only remaining thing might be me doing it. Maybe closing the wrong tab after working on it?
Ill make sure to make backups regularly. Maybe a version history would be fine too.
I think i know now what might have happened. Occassionally it happens that i close a tab in chrome without me wanting it. (I have too many tabs and chrome doesnt have real tab-extensions like firefox). Now it happened again and it was my bot code tab. I restored it and already wanted to execute but i saw constants in it. I already had replaced them with vars before. I went to the url and reloaded the page and the constants were gone. So it might be that this happened last time and i didnt notice. I thought chrome will load the contents from the net or at least store the last contents of a tab when its closed. But it seems that chrome is storing only occassionally and a restored window contains only old data. Dangerous but now i know what to look for.
Ah yes, that might explain it. Sometimes the browser caches too much and you'll see old code (e.g. when click the button back).