milanese » Tue Feb 04, 2014 4:41 pm wrote:better something like the crap editor self or, Notepad++, because word can cause problems in the encoding..
Cheers
Tommaso
Jemook » Tue Feb 04, 2014 9:35 pm wrote:For the time being maybe put your code into Microsoft Word or Notepad and use it's find and replace feature?
Cheers
Jeremy
Notepad++ worked fine for me. Pain to have to do the extra work, but is the more simple of solutions.
Pips to all.AnotherBrian » Wed Feb 05, 2014 4:13 am wrote:So now we have to replace all out "." dots in the variables to something else, or delete them.
This is going to be time consuming and prone to errors, opening files in the editor and using find replace.I've done two EA's and an include and what a pain in the ass.
A script would sure help move this along, even if it catches 80% of the fixes.
What we could really use is a script that will find and replace "." with "_"
It needs to look for a letter before and after the "." before it changes the "." to a "_"
I suggest a vbscript that can be run from the command line with the target filename. Any other ideas? Maybe a script run within scite? VB would be more universal.
Here is a start from a Google search. This script is not smart enough and will change all "." to "_". We need to add smarts but I don't get this VB stuff. This can even take care of the search string and the replace string, inside the code.
Any takers on a little code help? In the code below, add a filter to check the text has a letter before and after the "." before replacing. I have no idea how this would search for text, if it not taking word by word then the code below is a non-starter.
To use the script (call it replace.vbs), type a command similar to this from the command prompt:
cscript replace.vbs "C:\Scripts\Text.txt" ". " "_ "
Code: Select all
Const ForReading = 1 Const ForWriting = 2 strFileName = Wscript.Arguments(0) strOldText = Wscript.Arguments(1) strNewText = Wscript.Arguments(2) Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile(strFileName, ForReading) strText = objFile.ReadAll objFile.Close strNewText = Replace(strText, strOldText, strNewText) Set objFile = objFSO.OpenTextFile(strFileName, ForWriting) objFile.WriteLine strNewText objFile.Close
Upcoming Empty4 4 and MQL4 Upgrades
- boldtrader
- Trader
- Posts: 158
- Joined: Fri Jun 29, 2012 10:05 pm
- Location: Somewhere in the Northeast Kingdom.
Re: Can't use a dot
- kwanann
- Trader
- Posts: 948
- Joined: Thu Nov 29, 2012 1:53 am
Re: Upcoming Empty4 4 and MQL4 Upgrades
hmm so any "new" downloads of Empty4 will give me version 600?
I've been trading using OM Dual N EA for the past 2 years, live results can be found over at https://www.fxblue.com/users/kwanann
- SteveHopwood
- Owner
- Posts: 9904
- Joined: Tue Nov 15, 2011 8:43 am
- Location: Misterton - an insignificant village in England. Very pleasant to live in.
Re: Upcoming Empty4 4 and MQL4 Upgrades
Looks like it. Jem has already posted that there is nothing he can do about it and he is on our side, so fuck help those without a broker on their side.kwanann » Tue Feb 04, 2014 10:53 pm wrote:hmm so any "new" downloads of Empty4 will give me version 600?
Read the effing manual, ok?
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.
- kwanann
- Trader
- Posts: 948
- Joined: Thu Nov 29, 2012 1:53 am
Re: Upcoming Empty4 4 and MQL4 Upgrades
Haha yes, just got the short end of the stick for this one.
Seems the Empty4 PL just got a whole smackload of restrictions thrown in to deter external DLL calls, lucky for me minimal changes to what i have now since everything is offloaded to simple web calls

Seems the Empty4 PL just got a whole smackload of restrictions thrown in to deter external DLL calls, lucky for me minimal changes to what i have now since everything is offloaded to simple web calls
I've been trading using OM Dual N EA for the past 2 years, live results can be found over at https://www.fxblue.com/users/kwanann
-
AnotherBrian
Re: Can't use a dot
That's what I did in the Empty4 editor, it has that feature. I will be painful to change all the EA's out there that use a variable such as Daily.Slope It will need to be changed to Daily_Slope or it can't be compiled in the new build.Jemook » Tue Feb 04, 2014 4:35 pm wrote:For the time being maybe put your code into Notepad and use it's find and replace feature?
Cheers
Jeremy
SlipShods Sup/Res indicator has a whole bunch of these. No big deal I guess - as long as an great indi like Slipshots gets fixed and posted. There are lots of others out there.
- slipshod
- Trader
- Posts: 404
- Joined: Tue Dec 27, 2011 9:14 am
- Location: Australia
Re: Can't use a dot
Speaking of which, I'll do my best to get that fixed & uploaded today. Thanks for the heads-up on the indicator's thread btw, I wouldn't have known otherwise.AnotherBrian » Wed Feb 05, 2014 9:21 am wrote:It will be painful to change all the EA's out there that use a variable such as Daily.Slope It will need to be changed to Daily_Slope or it can't be compiled in the new build.
SlipShods Sup/Res indicator has a whole bunch of these. No big deal I guess - as long as an great indi like Slipshots gets fixed and posted. There are lots of others out there.
Edit: the new version of the indicator is now available in its thread in the Indicators forum. AnotherEdit: Library updated as well.
- Elixe
- Trader
- Posts: 98
- Joined: Tue Jun 04, 2013 6:44 pm
- Location: France
Re: Upcoming Empty4 4 and MQL4 Upgrades
Hi all, Notepad++ is actually a very good way to do this bulk replace, it has the builtin functionnality in Search / Find in filesmilanese » Yesterday, 23:41 wrote:better something like the crap editor self or, Notepad++, because word can cause problems in the encoding..
Cheers
Tommaso
Make a backup of the files you want to check, open Notepad++, go to Search / Find in files...
Find what : enter this regexp : ([A-Za-z])[.]([A-Za-z]) it will look for any text matching an alphabetic character, followed by a dot, followed by an alphabetic character.
Replace with : for instance, leave this empty as you will first execute the search through your files to check the result.
Filters : *.mq4 for all your mq4 files
Directory : select the directory where you put the copied files
Uncheck In all subfolders
And, finally in the search mode zone, click the radio button Regular Expression
Click Find All, the find result window will list all occurences found, you can double click on any of theses occurences to open the file at the specified spot.
If what you see is a GO, go again in the Find in Files, reselect the correct options & regexp, but add in Replace with the following regexp replacer : \1_\2
It will preserve the first & last part of the found item and only replace the middle one (the dot) by an underscore
take note that it will replace all dots surrounded by two characters by an underscore, that means http address, email address will be modified
-
meska
- Posts: 5
- Joined: Tue Jul 24, 2012 2:12 pm
Re: Can't use a dot
My favorite tool for this kind of tasks is Powergrep: it can search and replace on whole folders and subfolders using regular expressions. there is a 15 day trial on their website.
try search for this: ([\w\d]+)\.([\d\w]+)
and replace with this: \1_\2
try search for this: ([\w\d]+)\.([\d\w]+)
and replace with this: \1_\2
AnotherBrian » Tue Feb 04, 2014 6:13 pm wrote:So now we have to replace all out "." dots in the variables to something else, or delete them.
This is going to be time consuming and prone to errors, opening files in the editor and using find replace.I've done two EA's and an include and what a pain in the ass.
-
dudest
- Trader
- Posts: 1847
- Joined: Tue May 08, 2012 2:37 pm
Re: Upcoming Empty4 4 and MQL4 Upgrades
Anyone else having an issue with MyFXB publisher EA (not sending statements) despite files being in correct place?
-
dietcoke
- Trader
- Posts: 162
- Joined: Tue Nov 15, 2011 9:59 pm
Re: Can't use a dot
meska » Wed Feb 05, 2014 12:17 pm wrote:My favorite tool for this kind of tasks is Powergrep: it can search and replace on whole folders and subfolders using regular expressions. there is a 15 day trial on their website.
try search for this: ([\w\d]+)\.([\d\w]+)
and replace with this: \1_\2
AnotherBrian » Tue Feb 04, 2014 6:13 pm wrote:So now we have to replace all out "." dots in the variables to something else, or delete them.
This is going to be time consuming and prone to errors, opening files in the editor and using find replace.I've done two EA's and an include and what a pain in the ass.
Be careful!! that will also replace the "." in decimals and filenames.
