Getting to Know Empty4 Inside Out
- Freedom787
- Trader
- Posts: 30
- Joined: Wed Mar 13, 2013 3:46 pm
- Location: United States
Re: Getting to Know Empty4 Inside Out
Being unable to initialize Arrays with a variable frustrates me. Whether its proper coding or not, I like the idea of the code being more dynamic.
- 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: Getting to Know Empty4 Inside Out
You can use the ArrayResize() function to reinitialize the array to your variable size.Freedom787 wrote:Being unable to initialize Arrays with a variable frustrates me. Whether its proper coding or not, I like the idea of the code being more dynamic.
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.
- Freedom787
- Trader
- Posts: 30
- Joined: Wed Mar 13, 2013 3:46 pm
- Location: United States
Re: Getting to Know Empty4 Inside Out
Wow, thanks Steve! Can't believe I never thought of that.
- 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: Getting to Know Empty4 Inside Out
Hehe. The total tonnage of what I can't believe I never thought of over the years, would stop a charging bull elephant in its tracks.Freedom787 wrote:Wow, thanks Steve! Can't believe I never thought of that.
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.
-
cjthomson
- Trader
- Posts: 100
- Joined: Tue Jan 29, 2013 6:27 am
- Location: The Cape
Re: Getting to Know Empty4 Inside Out
Does anyone know how to re-order the tab order for the keyboard shortcut (cntrl + tab). I have about 15 chart tabs on screen and when I hit ctrl + tab it seems to adopt a very random order i.e. it doesn't move from tab to tab in a left to right or right to left way, it jumps around.
Any advice would be appreciated.
Any advice would be appreciated.
- SatchFan
- Trader
- Posts: 30
- Joined: Mon May 28, 2012 12:31 am
- Location: Flying in a Blue Dream or Surfing with an Alien
Re: Getting to Know Empty4 Inside Out
cjthomson wrote:Does anyone know how to re-order the tab order for the keyboard shortcut (cntrl + tab). I have about 15 chart tabs on screen and when I hit ctrl + tab it seems to adopt a very random order i.e. it doesn't move from tab to tab in a left to right or right to left way, it jumps around.
Any advice would be appreciated.
If I remember correctly you need to do the following steps:
1. Click on the tabs in the order you want to view the charts. Make sure you click on all the tabs. (It may be easier to first click and drag all the tabs and put them in the order first by putting the first one you want to view to the far left and the next one to the right of that and so on.)
2. Once you have them in the order you want, then start clicking on each tab starting at the far left and work your way to the right. Take your time and make sure you click on all of them and the chart changes to the correct chart after you clicked on the tab.
3.Once you have clicked on all the tabs in the order you want then you should be able to use your keyboard to scroll through all your charts in that order. Enjoy!
Let me know of that helps it has been a long time since I have done that.
Peace,
SatchFan
-
ovo.cz
Re: Getting to Know Empty4 Inside Out
When working with DLLs functions, there are variables passed by reference, which are supposed to be modified by the DLL. With integers and doubles there is one and only solution - using arrays in place of a simple variables. But strings are tricky.
You may pass a string by its value (syntactically) and it works like if it were by reference (weird? yes).
It works correctly, supposing, that the string had only been initialized by a constant (not variable) with a length not more than 254 chars. Why 254? The compiler wouldn't compile longer one.
So what if you need more than 254?
The first thought is adding more constants to a string like that:
But surprise --- this doesn't work. Passing this variable to a DLL no longer behaves like a reference (weird? yes).
So what? A workaround is often used, which converts strings into integers and vice versa. That works nice, but the code looks kinda complicated and unreadable.
Recently I noticed a simple trick that I did not know about. It is using Concatenate() to initialize the string. As many times as you need, to get the required length.
And the string behaves like a reference, again.
You may pass a string by its value (syntactically) and it works like if it were by reference (weird? yes).
Code: Select all
string outputString = "xxxx";
dllFunction(inputValue, outputString);So what if you need more than 254?
The first thought is adding more constants to a string like that:
Code: Select all
string outputString = "xxxx" + "xxxx";So what? A workaround is often used, which converts strings into integers and vice versa. That works nice, but the code looks kinda complicated and unreadable.
Recently I noticed a simple trick that I did not know about. It is using Concatenate() to initialize the string. As many times as you need, to get the required length.
Code: Select all
string outputString = StringConcatenate("xxxx", "xxxx");-
cjthomson
- Trader
- Posts: 100
- Joined: Tue Jan 29, 2013 6:27 am
- Location: The Cape
Re: Getting to Know Empty4 Inside Out
Thanks SatchFan - its worked as you said.SatchFan wrote: Let me know of that helps it has been a long time since I have done that.
Peace,
SatchFan
-
cjthomson
- Trader
- Posts: 100
- Joined: Tue Jan 29, 2013 6:27 am
- Location: The Cape
Re: Getting to Know Empty4 Inside Out
Can anyone tell me what I should do with a .rar file. Which folder should it go into and what do I need to do to use it?
Any help would be appreciated.
Cheers.
Any help would be appreciated.
Cheers.
- 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: Getting to Know Empty4 Inside Out
It is a file containing compacted files as in zip files, but using some blasted commercial compacting software that users are supposed to pay for. It infuriates me when people use them.cjthomson wrote:Can anyone tell me what I should do with a .rar file. Which folder should it go into and what do I need to do to use it?
Any help would be appreciated.
Cheers.
Anyone here know of a free utility that extracts files from the damn things?
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.