Getting to Know Empty4 Inside Out

Post Reply
User avatar
Freedom787
Trader
Posts: 30
Joined: Wed Mar 13, 2013 3:46 pm
Location: United States

Re: Getting to Know Empty4 Inside Out

Post by Freedom787 »

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.
User avatar
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

Post by SteveHopwood »

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.
You can use the ArrayResize() function to reinitialize the array to your variable size.

:D
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.
User avatar
Freedom787
Trader
Posts: 30
Joined: Wed Mar 13, 2013 3:46 pm
Location: United States

Re: Getting to Know Empty4 Inside Out

Post by Freedom787 »

Wow, thanks Steve! Can't believe I never thought of that.
User avatar
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

Post by SteveHopwood »

Freedom787 wrote:Wow, thanks Steve! Can't believe I never thought of that.
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. :lol:

:D
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.
cjthomson
Trader
Posts: 100
Joined: Tue Jan 29, 2013 6:27 am
Location: The Cape

Re: Getting to Know Empty4 Inside Out

Post by cjthomson »

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.
User avatar
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

Post by SatchFan »

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
Screenshots provided by PickPick. A Must Read --> Phantom of the Pits
ovo.cz

Re: Getting to Know Empty4 Inside Out

Post by ovo.cz »

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).

Code: Select all

string outputString = "xxxx";
dllFunction(inputValue, outputString);
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:

Code: Select all

string outputString = "xxxx" + "xxxx";
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.

Code: Select all

string outputString = StringConcatenate("xxxx", "xxxx");
And the string behaves like a reference, again.
cjthomson
Trader
Posts: 100
Joined: Tue Jan 29, 2013 6:27 am
Location: The Cape

Re: Getting to Know Empty4 Inside Out

Post by cjthomson »

SatchFan wrote: Let me know of that helps it has been a long time since I have done that.

Peace,
SatchFan
Thanks SatchFan - its worked as you said.
cjthomson
Trader
Posts: 100
Joined: Tue Jan 29, 2013 6:27 am
Location: The Cape

Re: Getting to Know Empty4 Inside Out

Post by cjthomson »

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.
User avatar
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

Post by SteveHopwood »

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.
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.

Anyone here know of a free utility that extracts files from the damn things?

:D
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.
Post Reply

Return to “Know your MT4 platform”