Home › Forums › Trading System Mentor Course Community › AmiBroker Coding and AFL › Code Deletion (Except first 4 lines) in Formula Editor
- This topic is empty.
-
AuthorPosts
-
December 2, 2017 at 7:44 am #101734AnonymousInactive
Has anyone else experienced this incredibly frustrating error which I have now experienced twice within the last two days?
For some unknown and highly frustrating reason one of the AFL files I have been working on suddenly seems to have been modified by having all code (except the first four lines) deleted altogether. To make matters worse, it has saved this change to the file I have been working on without any type of confirming of the save. Sure, I completely understand if I myself have been stupid enough to highlight something, delete and then save the result, however I swear I have not done this. Even stranger is that it consistently seems to be the first four lines of code that always remain with everything else deleted. If it is me myself, I can’t possibly be making the same mistake in exactly the same way, two days apart can I?
Of course as you can expect this is incredibly frustrating in my progress through the course materials as basically I have to go back and waste another hour or two of my life fully building the system again. However it could potentially be downright disastrous if it actually I am hoping to use/save these systems for actual trading use and the same problem ensues.
One thing I have come to notice in both instances of this issue is that the latest most version of the file seems to have been saved at 11.44pm (16 minutes before midnight). Then in checking the file after midnight I again have the “everything deleted except first four lines” problem. Note that I do leave Amibroker open during all of this period. I have not opened or closed it.
Is this something others have experienced before? Is there a tip or trick I’m missing? Is there a known issue for AFL files being modified and having content deleted?
STOP THE PRESS
I have just noticed that in one of my other files I have also been working on that it has very erroneous entries somewhat, very similar to the same first four lines of data in the file where everything else was otherwise deleted. It is kind of giving me the feeling that it could be something to do with the Norgate data functions as this is what seems to be repeated in this file. When you see the code in my attachments below, you will see why I have this assumption. You can easily see which file is the one which now seems to be almost entirely deleted. You can also see the one which for some odd reason has a number of double ups of these first four lines and the Norgate info.Could it be something to do with Norgate integration?
Any feedback or ides would be appreciated.
MattDecember 2, 2017 at 10:55 am #108132SaidBitarMemberVery weird
But why you are including the same thing over and over
Try to have it only once in your code (#include_once ….)
Maybe it will helpDecember 2, 2017 at 11:48 pm #108134AnonymousInactiveSaid,
This is exactly my point. I don’t have the same things in my code over and over in the original files I was coding. The original file only has the items once, and now it seems in one file they have been repeated multiple times. In the other file, the rest of the code is deleted and only the first four lines remain. I find it a little odd/strange that the same block of four lines repeats itself multiple times in one file but its those same four lines of code that otherwise remain in the other file.
Matt
December 3, 2017 at 5:07 am #108144Nick RadgeKeymasterMatt,
Can you email me the file please. I’ll chat with Craig and also have a word with Norgate. I’ve not seen this before but I know Norgate are making some changes and you being the last one onboard that program there may be an issue.Nick
December 13, 2017 at 3:17 am #108147AnonymousInactiveI have been doing a little more investigating and testing on this issue. Here is what I have found.
If I open Amibroker I see my default view, for example a simple price chart of a stock. There are no indicators or other charts in view. I then go to my Charts window on the left, browse through to where I have a system or AFL lsited. I double click on the chosen system/AFL and a new chart opens for me in the bottom half of the charts windows. Still all good.
If for any reason I then close Amibroker altogether, the AFL file is having a save enforced upon it. There is no confirmation of any save or “would you like to…” it simply saves and updates the AFL.
Worse still, if whilst playing in the chart I right click, choose “Delete Indicator” and then for example delete one of the components of the indicators shown (Maybe I choose to delete “Universe Filter” for example) then again if I close Amibroker altogether the corresponding code in my AFL file has the code section for the universe deleted and automatically saved to the AFL file without any type of confirmation whatsoever.
So maybe this is just a trap for young players and it is my own fault. However it seems awfully silly to me that in adding indicators/systems to your chart view and then playing around, adding some, deleting some, and then closing down Amibroker because your session is over that your AFL’s get overwritten (and worse still, without any type of confirmation).
Am I missing an “auto save” tick box somewhere? And why would Amibroker seek to overwrite the AFL file by deleting the code sections just because I have “deleted” it in a chart view? It certainly seems silly to be effectively destroying your AFL’s just because of the charts you are playing in?
Matt
December 13, 2017 at 3:54 am #108193Nick RadgeKeymasterMatthew – reach out to Craig – that’s what he’s here for. Book a time in his calendar so he can walk you through these issues. It’s not happening to anyone else so its clearly a routine being done incorrectly.
Here is the link:
Book it now so you can keep moving through the course.
December 13, 2017 at 5:58 am #108194TrentRothallParticipantMatt i followed your steps and when i chose to delete a indicator i get a warning box saying –
So maybe you’ve ticked the box at some stage, not too sure. As Nick said ask the guru
December 14, 2017 at 12:27 am #108195LeeDanelloParticipantSo what’s the outcome from the above. I would like to know what’s been causing this glitch.
December 14, 2017 at 12:34 am #108200Stephen JamesMemberMatt,
Try the following:-
– Only open afl files from the chart tab (right click>edit) or through the Formula editor itself (Analysis menu). Don’t open it from a loaded chart.
-Save any changes in the editor before loading other indicators.
-Its OK to drag and drop indicators from the charts tab but only delete those indicators.
– Do not delete any indicators or sections that are coded – do that from within the code and save any changes.Book a time with me if that doesn’t solve it for you.
Craig -
AuthorPosts
- You must be logged in to reply to this topic.