from mc export xml file to git

Questions about MultiCharts and user contributed studies.
biffhero
Posts: 47
Joined: 22 Sep 2020
Has thanked: 29 times
Been thanked: 7 times

from mc export xml file to git

Postby biffhero » 28 Nov 2020

Hi guys,

I was having trouble sharing code with a friend who uses TS. I believe this is something that TS could fix, but it is also something that I can go after myself.

I made an initial script, it reads the xml dump and pulls out the base64 encoded files in the archive, and puts the functions, indicators and strategies in their own directories.

https://github.com/biffhero/mcExport is where I am putting this software

I'd love to hear from anyone or take pull requests or anything like that. Let's use the bug tracker on github to communicate about this.

Have fun,
Rob

User avatar
syswizard
Posts: 295
Joined: 15 Dec 2012
Has thanked: 16 times
Been thanked: 28 times

Re: from mc export xml file to git

Postby syswizard » 28 Nov 2020

I just want to say..."Bravo" Dude. This is something I've always wanted...and this provides the ability to search thru the source code of thousands of functions, indicators, signals, etc. to find keywords and strings. Wow !
That being said, here is some feedback. After installing Python 3.8 (3.9 will not install on Windows 7), I was never able to run the script from the python prompt. It kept on stripping-out spaces in my commands. Also, I was not sure if I should use forward slashes to point to directories or backward slashes.
Finally, I was able to run from the Windows command prompt. What a rude first experience with Python ! But, no doubt it's powerful as the demand for expertise in it is thru the roof right now for data analysis as well as trading systems.
You are probably aware of this problem: name mangling. No biggie and probably easily fixed. See attached. Thanks again !
Attachments
mcexport.PNG
(62.66 KiB) Not downloaded yet

User avatar
syswizard
Posts: 295
Joined: 15 Dec 2012
Has thanked: 16 times
Been thanked: 28 times

Re: from mc export xml file to git

Postby syswizard » 29 Nov 2020

One more thing.....please add a second parameter to specify the output filetype/extension. The current filetype is unsearchable in Windows. I had to use the Bulk File Rename utility to rename all files to ".txt". Note: other users may want an extension of "esl" or something else. Reason : A dictionary in Notepad++ can be created for a specific extension....and thus highlight all of the Easy Language keywords.

biffhero
Posts: 47
Joined: 22 Sep 2020
Has thanked: 29 times
Been thanked: 7 times

Re: from mc export xml file to git

Postby biffhero » 29 Nov 2020

I just want to say..."Bravo" Dude. This is something I've always wanted...and this provides the ability to search thru the source code of thousands of functions, indicators, signals, etc. to find keywords and strings. Wow !
That being said, here is some feedback. After installing Python 3.8 (3.9 will not install on Windows 7), I was never able to run the script from the python prompt. It kept on stripping-out spaces in my commands. Also, I was not sure if I should use forward slashes to point to directories or backward slashes.
Finally, I was able to run from the Windows command prompt. What a rude first experience with Python ! But, no doubt it's powerful as the demand for expertise in it is thru the roof right now for data analysis as well as trading systems.
You are probably aware of this problem: name mangling. No biggie and probably easily fixed. See attached. Thanks again !
1. searching the source code. Yes, without my emacs editor, I'm kind of lost. I keep hitting all sorts of wrong keys in the MultiCharts editor. I sure wish we could have it read and write files on disk, as then I could stop copying and pasting complete buffers worth of code. :-)

2. Python on Windows. I hear you. I started this little script with the IDLE editor, meaning I used the default that was set up for me when I installed python for Windows from the python.org website. I got it mostly working, but then I switched to command line python under WSL.

3. Spaces in filenames, directory names. I'm so bad at windows that I always duck the issue. I put the script and my export in the same directory, and name the export a.xml. My command is ---> ./mcexport.py ./a.xml

4. Name mangling. Thank you for the report and the screenshot. That was the first thing I noticed, too. https://github.com/biffhero/mcExport/issues/1 I'm not sure what to do with it, but so far, I'm thinking that all of the functions like that start with "fa_" and not "f_", so maybe that will help moving forward. Keep an eye on that github repo, as that is where the changes will go.

I'm glad it can help someone else. I think that the benefits of this can be many, but here are the ones that I see so far.

1. Use my own editor. I'll happily code up a full-buffer copy and paste to be able to use something I'm faster at. Even the VS-code people among us should benefit from this. I do think that MC should allow an external editor to be called. Firefox allows it, heh. https://addons.mozilla.org/en-US/firefo ... th-emacs1/ If they coded up that one plug in, or allowed us to read / write from disk, they could shelve a lot of their future programming with the built in editor.

2. Use source control. I am certain that the professional money managers hire programmers who use source control. I note that even TradingView has source control built into the web platform. I'm not asking MC to make git happen. I'm saying that if we have access to text files, we'll happily do it ourselves.

Could the MC developers chime in here?

What is the rule set currently in place for the "data" field? I'm not asking them to keep us users in the loop going forward, and I understand that this work that I'm taking on will be a continual catch-up game. I am going to go forward with trying to reverse engineer it with any help we can find here.


Thanks,
Rob

biffhero
Posts: 47
Joined: 22 Sep 2020
Has thanked: 29 times
Been thanked: 7 times

Re: from mc export xml file to git

Postby biffhero » 29 Nov 2020

One more thing.....please add a second parameter to specify the output filetype/extension. The current filetype is unsearchable in Windows. I had to use the Bulk File Rename utility to rename all files to ".txt". Note: other users may want an extension of "esl" or something else. Reason : A dictionary in Notepad++ can be created for a specific extension....and thus highlight all of the Easy Language keywords.
Yes, that's caused me problems, too.

I have had to "choose notepad" more than one time.

I created an issue for it. https://github.com/biffhero/mcExport/issues/2 Since you are the first person to respond, what would you like the default to be?

Thanks,
Rob

biffhero
Posts: 47
Joined: 22 Sep 2020
Has thanked: 29 times
Been thanked: 7 times

Re: from mc export xml file to git

Postby biffhero » 29 Nov 2020

One more thing.....please add a second parameter to specify the output filetype/extension. The current filetype is unsearchable in Windows. I had to use the Bulk File Rename utility to rename all files to ".txt". Note: other users may want an extension of "esl" or something else. Reason : A dictionary in Notepad++ can be created for a specific extension....and thus highlight all of the Easy Language keywords.
Yes, that's caused me problems, too.

I have had to "choose notepad" more than one time.

I created an issue for it. https://github.com/biffhero/mcExport/issues/2 Since you are the first person to respond, what would you like the default to be?

Thanks,
Rob
I did a quick search and found only one extension that is universally recognized as being "for EasyLanguage". .eld.

At this to line 75, just before the 'outputFile' line.

shortName = shortName + '.eld'

Make sure your indentation matches the line below it, because ... python.

biffhero
Posts: 47
Joined: 22 Sep 2020
Has thanked: 29 times
Been thanked: 7 times

Re: from mc export xml file to git

Postby biffhero » 29 Nov 2020

@syswizard : #2 closed.

edit: I chose "eld", do a new pull and you will have it.

User avatar
syswizard
Posts: 295
Joined: 15 Dec 2012
Has thanked: 16 times
Been thanked: 28 times

Re: from mc export xml file to git

Postby syswizard » 29 Nov 2020

Dude - I think you are "losing it" ! ELD is a horrible extension....it's encrypted or BASE64 encoded or something.
PLEASE, PLEASE DEFAULT TO ".txt" instead. That's known as Plain Text.

Here is the NotePad++ rendition of the contents of an ELD file:

MWRKArea.wrk ORCMP  =‹ .T,
á Äð` ÿ 0H> ø<@¿­Ûþºû÷ ¼|% ô€ o?@ E ¸ýƒ y<%\, (Hý9õ¶èàõ8S"D/bkµ5`Põ _ Ä„JDZ “Ÿø6VlLS÷¿æˆ {
öQ=
à (w<Þ?”p)öæç1 "õ/ ¶wMî5HzX˜=\aíÈû×ð$¡Ñÿ„SFyAôýñÞÄáOþ€¦ôt]0Á•óKÀò Pñ°ð€ÑéÙ'ñ¥¦éÅlüAÉ(ýÁJ{÷Ô¾/äãÿNþ æ“¥o*ÿ°óÐò)Pó2 RÔÛP‰»™?àù¡?¸ù£?ù†?ˆúƒˆ?8hùª½9úœ?ú¤?øùÃø‡¢?àhçÚô:åWÓ?ØüÁÓ\”'/¥þ+ú߁
ØÓÿœî¬üãõ_Oe¨ 8…–þO_!¨ÿ“Ÿ0ê¿ÿðë?©xý—ô‡0ê?„¤þ#èpVýŸž™ýŽ9„iø?™?¨ù¤»½0 ÈÚBÀ<hÜmBÈü
H؈„˜þ‰ƒ@ZÿóAI1¸9À À+GÊÐòæ
›2aÜ@í@;²Új©fO õrF í”fnЂ(TøŽ )¯óSF åŸt-<QN´)#$“:mLv¡pˆÏ®VN"b±·¡œÿ0žˆD‚JµZo곲廸
0`!"þs˜IÊ0’?.âßò‡"¸Añ"Q?ŠÂŸX”o åƒFü8Š`ãQÓ¼±)FŠ`Ç`Rø”øþ±þ1‚×Ká¿b
ÿ1S¸¯šòì§|È)‚ÁNáz
˜7PÉþô¢¨ðwG…I*ÜÙRÁOÒ‚*þÉXòÖ_dýÖlý×tý×|ýØ„ýXyFW>˜ýÃÙ ýAÚ¨ýÁZ²¯±Ð¡oàþ î#lÍ•?ƒÉOxBCïöþ€ïúþÀïþþ 0IûÉ4?)j@$´H?í$íí?¤¸ŽÐêßv4Ò¿ŒÙ„> ZýãGÿ¡ÿvnJ¡Aøu'ã?¨Í{ÓfRB‹ñSP gÎ?™Åü
ùhü£ëþ¹ÿ¤üƒ¹¹…Fÿj’”?÷/&4ÅßM2ÿ@È)C§Ž7eÈ€0#çMtДA„ wÛsënç°v†Í1aØ€°FNš°ó '澂MÝúIÛbCýP9iÜœñ¶
ûÌzÜ+S+lØ*2<èäSÆg«ãf´õ2ÇA+ň6iΠ¡Ã²qoä€(ƒ·àV|3ÄrÇD-c¤”™S‡
‘£‚öVóó\.§õT¶VëÈm³Kט°éŒÈ«Ó¶á•U£&®­þŸŠâ™Zå¾Ú1oë"ð6iZP”±S–¦ ®œe(o-ÌY›üÎ_IÛºh[v0N˜±çãå)cÆLÙ
¢³Ì‰ [,ó—è¦$1.nÈš©¦Q|¼™Û.BsŸšƒÈ°‘Σ‡]e˜."0L *¿®è⨼BþŽ`áÏ0ËÃ8üÄ?HüÅxÎÈñ?ÿ ò"ÿ@ò&ÿ€ò*ÿÀò.Ë3Óä;οèüÏ?øüÐ?ýÑ?ýÒ?(-¿\ˇÔPýƒÕ?`ýƒÖò…¸|ˆýÙ?˜ýÚ?¨ýÛøzéþÇîðþAïøþÁï ÿAðÿÁpyÖ\>ÿò$ÿò,ÿsyC|Íìø7ßáy5ÿ†¾ü0ÿ‡ó?@ÿƒô?Pÿƒõä+÷¿xLøñ ÿóåOùpÿøÿú°ÿüåM‚€D/ø„,Üìÿs n«@n¯@4 ÂjÒÜX
²u!ÑÀ ™‚ÂA¤}dácÀ: Aù¿XS‘Šµ““SŠ%АÙ/IE#WGåD¨?„€®LûÍü ’~O³DúG‚¤€«‚úB ñ¬?Ñ¨å ¬‚ØB ïZ”ü« Uܯ+4ú§-ÿbB„âg
ñ×þƒžû÷z&¡2Áñ#‹†økÿ!—!øþ'_4‹û88@QÃ9ÀPé*!oÞ°)ÆM€ Ôd@°“‘m¦M3Ï &aæÐEm§
èÃ_?TúÁû)#€òO˜×¦þpN†ñ ’¸!S¯ýg_AÎ*…`T?#Š.äEFy@Œ‘S&]Š¢õ«2ÇÙq4aæ€;Ö6gΛ1i½J$rÌ f”’âŒ~æ á ’Ö@™³ÊC8`Á!~BÅY V÷¶î/!©ÿ“H‡LyÓ–¢Àœ:saMÞÖ‡‘=ãÒ˜IûçMÞ é£fiä¢DVƒ
!‘xA@¦ç
h·|I37Ë̵òãÍ®•‡ez‰ˆ”ðÀæÐmâ•IËûŸ01°t#¼l»ŽÜ¦‡ðD€m+ä•hoÓ‹Ëdg­åmûCrXJÿ{×þ…øÃ~ŒÁ.ü!ø
E&ìzþpÈ7lGT'ƒMÈkÛè%_ÝŒ¹ŽHíˆK¸®eÁ;(¾ÙǸ}©/ jn<BìW¹ñ‰\¹0ôs€<ÉùcHqþ¸ÿð«¿ò?ˆ±ÿbü!Ö?öàít”ü‡¬lT­#bH6c¤”™S‡
]Êóó\Þf"O¶`5jâÚŠ•mtœÞ !yœÖ1aË}µÝ]%¼!SŦž¸rF³…™³6Ž8Åé×EÛ²Û€9p·e,Sž2fÌ”­ :Ëœ:eØæ/ÑM¶€é¨iM­Á4o涋Ãk|‰„Áº
Mó)€ jØÈ lfµšwªfÙ½!n0¤”?äÂ$ü"„?·Q®¡Ná†ù5lB±PÊ &s9¡ ÔÂ} †‡xO,m"ÞS««5b€1'‘üED¬ìžp;` Äð‰]…ð‡Ìï&)ÿ}Àˆ 0 ÷P
H<lΆ6àüAa™CV™bͬñ™Ì{H¦­‰H}¥R_‡ü£(˜'ò(Bþ£„¨E¸Ÿeû©Ä8a–­q¾Ôš¾ô€ƒ—,衵zù€úGýBõ¿5aÈÒR—_Ê…±2U:yà”ñIeÐ\Œ‚ì-’”Ä×ZÐ_¨³Épdcå/§÷©|È` &‚dΏ†µuºÎzî/,2KÃr^
Û¸NTÿ6GKÖ–²¬.œ«©÷c$lƒÊà¡+H12ÌÏL _ ÄüÎB
×ïÑ @ €ŠØ

User avatar
syswizard
Posts: 295
Joined: 15 Dec 2012
Has thanked: 16 times
Been thanked: 28 times

Re: from mc export xml file to git

Postby syswizard » 29 Nov 2020

Rob - I think we need to take this offline for sure. Where should we do it ? Github ?

biffhero
Posts: 47
Joined: 22 Sep 2020
Has thanked: 29 times
Been thanked: 7 times

Re: from mc export xml file to git

Postby biffhero » 29 Nov 2020

You are probably aware of this problem: name mangling. No biggie and probably easily fixed. See attached. Thanks again !
Issue #1 has been closed. You will like what happens much more now. Please give it a try and let me know.

https://github.com/biffhero/mcExport/issues/1

biffhero
Posts: 47
Joined: 22 Sep 2020
Has thanked: 29 times
Been thanked: 7 times

Re: from mc export xml file to git

Postby biffhero » 29 Nov 2020

Rob - I think we need to take this offline for sure. Where should we do it ? Github ?
Sure thing. That's where I'm doing it anyway.

Have fun,
Rob

biffhero
Posts: 47
Joined: 22 Sep 2020
Has thanked: 29 times
Been thanked: 7 times

Re: from mc export xml file to git

Postby biffhero » 29 Nov 2020

Dude - I think you are "losing it" ! ELD is a horrible extension....it's encrypted or BASE64 encoded or something.
PLEASE, PLEASE DEFAULT TO ".txt" instead. That's known as Plain Text.

Here is the NotePad++ rendition of the contents of an ELD file:

MWRKArea.wrk ORCMP  =‹ .T,
á Äð` ÿ 0H> ø<@¿­Ûþºû÷ ¼|% ô€ o?@ E ¸ýƒ y<%\, (Hý9õ¶èàõ8S"D/bkµ5`Põ _ Ä„JDZ “Ÿø6VlLS÷¿æˆ {
Check #3.

See you on github.

Rob

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: from mc export xml file to git

Postby JoshM » 30 Nov 2020

Congrats on your tool Biffhero. :)
2. Use source control. I am certain that the professional money managers hire programmers who use source control. I note that even TradingView has source control built into the web platform. I'm not asking MC to make git happen. I'm saying that if we have access to text files, we'll happily do it ourselves.
You can use the 'C:\ProgramData\TS Support\MultiCharts64\StudyServer\Studies\SrcEl' directory for that, which has the plain text content of the custom MultiCharts PowerLanguage scripts from the editor.

(Their file extension is .el, but they are simply plain text files that can be opened in Notepad or any other editor.)

biffhero
Posts: 47
Joined: 22 Sep 2020
Has thanked: 29 times
Been thanked: 7 times

Re: from mc export xml file to git

Postby biffhero » 30 Nov 2020

Congrats on your tool Biffhero. :)
2. Use source control. I am certain that the professional money managers hire programmers who use source control. I note that even TradingView has source control built into the web platform. I'm not asking MC to make git happen. I'm saying that if we have access to text files, we'll happily do it ourselves.
You can use the 'C:\ProgramData\TS Support\MultiCharts64\StudyServer\Studies\SrcEl' directory for that, which has the plain text content of the custom MultiCharts PowerLanguage scripts from the editor.

(Their file extension is .el, but they are simply plain text files that can be opened in Notepad or any other editor.)
Thank you for pointing out that directory. That is going to be a big help.

I note that they save the encoded values in the files, such as fa_EEa2eKeepRegions.elf instead of EE.KeepRegions.elf. I wonder why they use .elf for functions, and not .eli for indicators or .els for studies.

Thanks,
Rob

User avatar
syswizard
Posts: 295
Joined: 15 Dec 2012
Has thanked: 16 times
Been thanked: 28 times

Re: from mc export xml file to git

Postby syswizard » 30 Nov 2020

I am now posting to https://github.com/biffhero/mcExport/ in the issues section. Should a WIKI be established there ?


Return to “MultiCharts”