PowerLanguage Editor: Revision Control
- Bruce DeVault
- Posts: 438
- Joined: 19 Jan 2010
- Location: Washington DC
- Been thanked: 2 times
- Contact:
PowerLanguage Editor: Revision Control
It would be helpful for the PowerLanguage editor to incorporate revision control e.g. track previous versions of a given function/study/signal. In this way, it would be possible to go back to a previous version.
In a related note to this, it may also be helpful to allow specifying a given version to run on the format dialog, so that edits can be made to a version in development and tested separately, without affecting production charts.
In a related note to this, it may also be helpful to allow specifying a given version to run on the format dialog, so that edits can be made to a version in development and tested separately, without affecting production charts.
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
I think this is easily accomplished... with only a little programming
when the user press the "Compile" key,
PLEditor would simply rename the existing version to a new name.
(eg. append a number to the end of the indicator name, myindicator_1)
p.s. disclaimer: everything looks simple and easy from a distance.
when the user press the "Compile" key,
PLEditor would simply rename the existing version to a new name.
(eg. append a number to the end of the indicator name, myindicator_1)
p.s. disclaimer: everything looks simple and easy from a distance.
- Bruce DeVault
- Posts: 438
- Joined: 19 Jan 2010
- Location: Washington DC
- Been thanked: 2 times
- Contact:
One use of a simple revision control is to roll back to a prior version very quickly for the current trading day. It happened to me just this week. I used the replay to work on a study over the weekend and it was testing fine. I ran it on Monday and for some reason it was not (more work was needed to deal with situations where barstatus is not equal to 2 only). So I quickly rolled it back for the trading day on Monday and completed it later when I had a chance to give it some thought (ready to minimize the loss of live trading time to test it). With a revison control system I am suggesting I would just choose to have MC run off the Friday version instead of the one that compiled clean on Sunday. So the library would store not only the source could but the link as well. If not maybe it would just recompile direct from that older version. With the current setup I had to rename the current version and import the old version and make sure I kept it all straight. You get all sorts of temp names in the archives that way.
I am thinking along the lines of the Editor would show at the top the version you are working on and the version in production. The MC Study list would show the number of versions in the library and the version running in production now. The export would export all versions and import all versions. The open would allow you to bring in an old version (2 back) and create a new version (maybe restricting it to new versions only). Maybe the user could grab all of a version 2 back then insert some of a version only 1 back (not sure how that would work).
- Bruce DeVault
- Posts: 438
- Joined: 19 Jan 2010
- Location: Washington DC
- Been thanked: 2 times
- Contact:
The simplest, common sense way this could work would be that:
(1) each version (each unique changed source code file that is saved) has its source code retained, organized by version for the indicator.
(2) the editor allows you to tag versions with a particular tag, such as "production" or "beta test", etc. and for any version that is tagged, the compiled object code would also be saved.
(3) one of the tags would be defined in the editor as the default for this indicator.
(4) in a chart, when you apply the indicator, it would default to the version that has the tag that is the default, but allow you to pick a different tag e.g. choose the "beta test" one instead.
(1) each version (each unique changed source code file that is saved) has its source code retained, organized by version for the indicator.
(2) the editor allows you to tag versions with a particular tag, such as "production" or "beta test", etc. and for any version that is tagged, the compiled object code would also be saved.
(3) one of the tags would be defined in the editor as the default for this indicator.
(4) in a chart, when you apply the indicator, it would default to the version that has the tag that is the default, but allow you to pick a different tag e.g. choose the "beta test" one instead.
Yes I was thinking pretty much along that line although I took a break and had not gotten that far into it. I was thinking that the export would store the currently running version and that would be picked up on the inport to another machine. You could simply go in and change it. Also when you go in to open a study it would show you the total revisions and the one flagged as running on the chart(s) now. Maybe it could even be changed there. Maybe that would be a special popup with the list of revisions and you you change the one you want to run on. Making that change would automatically kick off the "loading" process in MC just as we currently get the "verifying" process right now. The list of revisions would of course show if the revision was compiled successfully yet or not. LOL, I can see TSS rolling their eyese right now , thinking "Hey guys, as if we don't already have enough work".
- Bruce DeVault
- Posts: 438
- Joined: 19 Jan 2010
- Location: Washington DC
- Been thanked: 2 times
- Contact:
I agree this is not and should not be a high priority for TS Support - no other trading platform has revision control, yet there are plenty of other trading platforms that have features that need to be accomodated here. It's simply the sort of thing that when they're redoing the PL Editor they should keep in mind because it may be something they can accomodate during such a revision (for instance to fix the handling for long files, etc.)
100% Agreed. When the time comes that they do have the time they can search back for the ideas (or use whatever method they use).
Getting back to the point I made above about importing, currently an import flags that study as not verified and it is up to the user to verify it before opening the workspace. So to keep that concept, if three revisions existed in the inported study, it should remove the flag and it is up to the user to select the one they want to be running on this machine. Much like "compile all" they would have a an option to flag all the latest version for running on the machine and the user would then decide to go back and make a few specialized adjustments if they wanted.
I used two revision control systems with unix. One was RCS and I forget the name of the other. It started with S. SCCS I think. RCS could merge if I remember. It has been a while.
Getting back to the point I made above about importing, currently an import flags that study as not verified and it is up to the user to verify it before opening the workspace. So to keep that concept, if three revisions existed in the inported study, it should remove the flag and it is up to the user to select the one they want to be running on this machine. Much like "compile all" they would have a an option to flag all the latest version for running on the machine and the user would then decide to go back and make a few specialized adjustments if they wanted.
I used two revision control systems with unix. One was RCS and I forget the name of the other. It started with S. SCCS I think. RCS could merge if I remember. It has been a while.
Hi,
i use subversion as my revision control system, in combination with tortoise, which is an windows
fileexplorer extension.
The only problem is, that it is not integrated in the PL-Editor, so i have to do this with the explorer.
But this saves me a lot of time.
You can:
- make new revision of files, and swith back to older revisions.
- make a "Tag". That means that you "mark" several revision of files
which should belong together: function_A version 1.3 and function_B 1.4
So you can swith back to older "Tags" and you will get all the corresponding files.
I do this, if i have a system which i am trading in praxis, then i mark all files,
which belong to this system with an tag: "praxis system date...".
And this saves me a lot of time of searching errors !!
So i don´t think that MC needs to code a new solution, instead it should allow to integrate any
revision control system, such as subversion, which is very common !
i use subversion as my revision control system, in combination with tortoise, which is an windows
fileexplorer extension.
The only problem is, that it is not integrated in the PL-Editor, so i have to do this with the explorer.
But this saves me a lot of time.
You can:
- make new revision of files, and swith back to older revisions.
- make a "Tag". That means that you "mark" several revision of files
which should belong together: function_A version 1.3 and function_B 1.4
So you can swith back to older "Tags" and you will get all the corresponding files.
I do this, if i have a system which i am trading in praxis, then i mark all files,
which belong to this system with an tag: "praxis system date...".
And this saves me a lot of time of searching errors !!
So i don´t think that MC needs to code a new solution, instead it should allow to integrate any
revision control system, such as subversion, which is very common !
You don´t need to copy & paste code.
The whole files are stored in the revision controll system: subversion
You need the tool tortoise.
This is an extension for the windows file explorer.
you navigate to the location of your PLE file, click rigth with the mouse on it and you will see the revision controll extensions: update, commit, browse ...
you can also click on the whole directory folder and "commit" all changes.
this will upload every changed file, you can provide an comment and a tag name. With this tag name, you can download the files, if needed.
tortoise includes:
- browsing the revision repository
- Tagging files
- compare two revision
... lot more, but this maybe are the most importand you will need.
if you install subversion, you simply have the revision controll system, which you can controll with "shell commands".
So, tortoise is an needed extension.
The whole files are stored in the revision controll system: subversion
You need the tool tortoise.
This is an extension for the windows file explorer.
you navigate to the location of your PLE file, click rigth with the mouse on it and you will see the revision controll extensions: update, commit, browse ...
you can also click on the whole directory folder and "commit" all changes.
this will upload every changed file, you can provide an comment and a tag name. With this tag name, you can download the files, if needed.
tortoise includes:
- browsing the revision repository
- Tagging files
- compare two revision
... lot more, but this maybe are the most importand you will need.
if you install subversion, you simply have the revision controll system, which you can controll with "shell commands".
So, tortoise is an needed extension.
I guess the question is that in Unix I could see the text in any simple text editor and the RCS stored it so it could compare code, merge it, etc. I have no idea where MC's EL code is before it is stored to a PLA archive nor what format it is in (ASCII?). Storing an archive in an external revision control system does not make much sense to me because first off I don't think it is stored in ASCII and secondly an archive is several studies of different names where as revision control deals with one study at a time for the purpose of helping to manage different versions.
Last edited by bowlesj3 on 26 Feb 2010, edited 2 times in total.
- Bruce DeVault
- Posts: 438
- Joined: 19 Jan 2010
- Location: Washington DC
- Been thanked: 2 times
- Contact:
My MC Files are stored at: all users\...\multicharts\study server\Studies\SrcEL\
There i find my strategies and signals, the files ends with .el, but they are text-files, which i upload to subversion.
but i have to say, that MC is not my main development software, i do all my studies, backtest ... with tradesignal. only the strategies a wanted to trade are coded than in MC.
So at the moment i ony upload my MC files, i was never in the situation to swith back to an older version. maybe i have to test this, because the way i do this is wrong
There i find my strategies and signals, the files ends with .el, but they are text-files, which i upload to subversion.
but i have to say, that MC is not my main development software, i do all my studies, backtest ... with tradesignal. only the strategies a wanted to trade are coded than in MC.
So at the moment i ony upload my MC files, i was never in the situation to swith back to an older version. maybe i have to test this, because the way i do this is wrong
- Bruce DeVault
- Posts: 438
- Joined: 19 Jan 2010
- Location: Washington DC
- Been thanked: 2 times
- Contact:
Could you elaborate please on why you use TradeSignal for this? It might be instructive in terms of helping TS Support to take MC in a direction that leads to better feature completeness.but i have to say, that MC is not my main development software, i do all my studies, backtest ... with tradesignal. only the strategies a wanted to trade are coded than in MC.
I will try, but the main reason is, that i am working with tradesignal several years now and i am very familiar with it.Could you elaborate please on why you use TradeSignal for this?
What i am missing in MC:
- drawing from signals
- global variables
- access higher TFs without an second symbol in the chart.
- useability (see my Inputs at the right side, no need to open an separate window)
But the main big advantage is that in tradesignal i can work modular.
That means i put on 3 signals, lets say 3 stop-modules.
Than this modules are processed orderd, in the order they where put on the chart. In module 2 i can take the results from modul 1 and do something.
If i want do do this in MC i have to code everything in functions.
Lets say a trend indicator based on a simple moving average. I need an indicator to draw the information on the chart and code the logic in a function. Then i need a signal script and use the function. But i have the same inputs in the Signal and the Indicator and the code has to be executed twice.
I have several trend modules. In my signal script i have only three informations from this moduls: Trend long, Trend Short, trend flat.
It is much better to test trend or stop moduls and i don´t need all the inputs in my main strategy. Each module has an input: Active: yes/no.
so i can test with "drag and drop" my modules on the chart.
Buy the way, this is very usefull for portfolio trading !
A stock portfolio with 100 Stocks. The first modul on the portfolio calculates possible entries. the second modul now knows: 20 possible entries, but only 5 allowed per input, so only 5 order for stock 12345.
Not sure how the signals and indicators are processed in MC ?
- Bruce DeVault
- Posts: 438
- Joined: 19 Jan 2010
- Location: Washington DC
- Been thanked: 2 times
- Contact:
MC does have global variables (or can use them). Are you referring to public variables meaning that you can put variables in a module to be shared by all EL code in a chart or maybe in a workspace or maybe even in all of MC. Public variables would not be shared outside of MC as global variables can be. Public variables (if they existed in MC) would not need to be attached to the back end of an MC function to be used by that function. This is what you can do in VBA and I assume many other languages too. In cobol everything is public.
Oh by the way, thanks for pointing out where the EL source code is wegi
Oh by the way, thanks for pointing out where the EL source code is wegi
The public variables should be shared only in the chart between all "scripts".
And not between all charts in MC.
The current global variables are only available if you use a dll extension, e.g. pushpop.dll. But i can´t use them at the same bar, not for live trading, i don´t trust them, because MC don´t have any order, how the scripts are processed.
But this goes out of the main topic here, maybe we should start an new thread.
And not between all charts in MC.
The current global variables are only available if you use a dll extension, e.g. pushpop.dll. But i can´t use them at the same bar, not for live trading, i don´t trust them, because MC don´t have any order, how the scripts are processed.
But this goes out of the main topic here, maybe we should start an new thread.
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
I will try, but the main reason is, that i am working with tradesignal several years now and i am very familiar with it.Could you elaborate please on why you use TradeSignal for this?
What i am missing in MC:
- drawing from signals
...
you can draw from signals.
ie. ARW_NEW, TL_NEW, TEXT_NEW
(ps. you cannot plot in signal)
.
Last edited by TJ on 28 Feb 2010, edited 2 times in total.
- Bruce DeVault
- Posts: 438
- Joined: 19 Jan 2010
- Location: Washington DC
- Been thanked: 2 times
- Contact:
@TJ, i mean plot, not draw.
I asked MC if i can DRAW about 1.000.000 Objects, i think you know the answere .
1.000.000 are exact 5 informations (drawings) per Bar if you have 200.000 Bars in a chart. And this is about 5min Data, 3 years.
But i read here in the forum, that plotting from signals will come.
I asked MC if i can DRAW about 1.000.000 Objects, i think you know the answere .
1.000.000 are exact 5 informations (drawings) per Bar if you have 200.000 Bars in a chart. And this is about 5min Data, 3 years.
But i read here in the forum, that plotting from signals will come.
- Bruce DeVault
- Posts: 438
- Joined: 19 Jan 2010
- Location: Washington DC
- Been thanked: 2 times
- Contact:
Now that would be great. It's tiring to have two studies, one to draw indicators and one to place orders based on the same indicator logic. Even if the computations are in a function that's used by both studies, the code is executed twice. What a waste.But i read here in the forum, that plotting from signals will come.