You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Of course.
I also want to puzzle you with something that puzzled me.))) Is it possible to pass several individual lines in one resource, so that you can read only the selected line from it while reading the resource.
For an image a few lines can be created through TextOut() but attempts to read such a resource has no success. Only the first line can be read.
I also want to puzzle you with something that puzzled me.))) Is there a possibility to pass some separate lines in one resource, so that it's possible to read only selected line from it.
For an image a few lines can be created through TextOut(), but attempts to read this resource have failed. Only the first line can be read.
There is no point in trying to save or read text from a picture. Use the resource to write strings as I described above and then extract back using CharArrayToString. Next, split the string by a delimiter and find the right one among them. (Hence, before saving the string, divide it into substrings by some symbol).
I had no desire to read from a picture. I only mentioned the picture as an example of an entry in a few lines.
Pulling out a substring is too easy. We are not looking for easy ways :))) Thanks for the help.
I had no desire to read from a picture. I only mentioned the picture as an example of a few lines of writing.
To take out a substring, it's too easy. We're not looking for easy ways.) Thanks for the help.
It's not too hard to pull out a substring if you already know how to save data in a resource and retrieve it. It is a simple task in itself. Try saving the string to a resource first and then extracting it from there. Then add a function to break the string into substrings and search for the right one.
Peter thanks for your help. I learned how to work with strings years ago. And how to save a resource and read it, with your help, I figured it out yesterday. Just got a frantic text message in my head, like I should try it... and how to do it the text message got lost on the way, got lost in my thoughts.
I'm trying to figure out the difference between two-dimensional and one-dimensional arrays for creating resources. Do you have any developments, thoughts on this?
Peter thanks for your help. I learned how to work with strings years ago. And how to save a resource and read it, with your help, I figured it out yesterday. Just got a frantic text message in my head, like I should try it... but how to do it the text message got lost in the way, got lost in my thoughts.
So now I'm trying to figure out the difference between two-dimensional and one-dimensional arrays for creating resources. Do you have any insights, thoughts on this?
I read some earlier pages and realized that the task was to read only one small string from the resource. If this string is less than 64 characters, there's no sense in making a mess with unions and saving data to the resource. Just write the required string to description property of OBJPROP_TEXT:
ObjectSetString(chartID,label_name,OBJPROP_TEXT, "Your string");
And get it back like this:
string Str = ObjectGetString(chartID,label_name,OBJPROP_TEXT);
And that's it.))
Forum on trading, automated trading systems and testing trading strategies
Libraries: TradeTransactions
fxsaber, 2018.09.20 16:23
I read some earlier pages and realized that the task was to read only one small string from the resource. If this string is less than 64 characters, there's no sense in making a mess with unions and saving data to the resource. Just write the required string to description property of OBJPROP_TEXT:
ObjectSetString(chartID,label_name,OBJPROP_TEXT, "Your string");
And get it back like this:
string Str = ObjectGetString(chartID,label_name,OBJPROP_TEXT);
And that's it.))
Not exactly. The task was to output a few lines of information. In my opinion... it's just the way I wanted it to be displayed. One of the lines has a date in it. This date is not only for clarity, but should be used by the program even after the restart. It turns out that it has to be saved somehow. This is where I started messing around, we're not looking for easy ways out. Since one way to save the date is to use a graphical object, why not use the same resource. After restarting MT resource is readable, but after restarting the computer has not checked yet. The main thing is that I figured out resources and units. The next thing I knew, I was getting frantic text messages in my head. Once I've deleted everything, I'll continue the useful work.
Not really. The task was to output a few lines of information. In my opinion ... that's just the way I wanted it to be, to display it with a canvas. One of the lines has a date in it. This date is not only for clarity, but it should be used by the program even after the restart. It turns out that it has to be saved somehow. This is where I started messing around, we're not looking for easy ways out. Since one way to save the date is to use a graphical object, why not use the same resource. After restarting MT resource is readable, but after restarting the computer has not checked yet. The main thing is that I figured out resources and units. The next thing I knew, I was getting frantic text messages in my head. Once I've deleted everything, I'll continue the useful work.
Good. Then keep mastering resources and unions. They offer a versatile way to not only write and store any data quickly, but also to share that data between different programs in real time and with no load on the disk.