Some help needed - page 4

 
OP already has the code to do that, it's in init
 

Good stuff, just thought using a function for the job might be of interest....

int init()
{
   string lotsStr[];
   plen = StringSplit(LotsProgression,';',lotsStr);
   if (plen > 0) {
      if (ArrayResize(lots,plen) == plen) {
         for(int i = 0 ; i < plen ; i++ ) {
            lots[i] = StringToDouble(lotsStr[i]);
         }
      }
   }
   return plen;
}
  
 
ydrol:

Good stuff, just thought using a function for the job might be of interest....




Can you please write comments with code lines as like jimdandy did HERE..?
 
How's that?
int init()
{
   // INPUT  : global string LotsProgression is a string of lot values separated by semi-colons. E.g.  '0.1;0.2;0.3' etc.
   // OUTPUT : global array of doubles lots[] is set to the value of each double in sequence.
   // RETURNS: Number of values in the array 

   // Array to hold substrings when LotsProgression is split
   string lotsStr[];

   // Split the global LotsProgression string at every ';' into the string array lotsStr[]

   plen = StringSplit(LotsProgression,';',lotsStr);

   // Check split was ok

   if (plen > 0) {

      // Resize global array lots[] array to hold the double value for each substring in lotsStr

      if (ArrayResize(lots,plen) == plen) {

         // Convert all substrings in lotsStr[] into doubles and store in lots[]

         for(int i = 0 ; i < plen ; i++ ) {
            lots[i] = StringToDouble(lotsStr[i]);
         }
      }
   }

   // Return number of substrings
   return plen;
}
  
 
Jimdandy:

Excuse me while I jump up on this soapbox...I apologize in advance....

1. My apologies I certainly did not intend to break one of your posting rules.
I was thinking more about how to help someone understand mql4 better.
I spend hours sometimes deciding the best way to reply to someone's problem.
I choose the best way that I know of to get the point across. In that process I
may indeed not do it in the way that is the best way that you think is the best way
to do it on this site. However, I do think that people do learn from what I am able
to stumble around and put on here. You have to realize that not everyone knows
how to use this site like you do.

2. Suggestion:
How about you make a video about how to properly use the features on this site
and how to properly use this editor when leaving a post? Or at least give me
a link to that video.

3. If I want to share a sentence or paragraph out of the documentation with someone, I am not
simply going to paste a link to a whole page of documentation and make people search through that
page and try to figure out which part I want them to read.

4. A Line like....
"2. I and j are initialized before use. K wrongfully assumes an initial value of zero and must be initialized properly."

5. Is a classic example of someone who seems incredibly intelligent and talented and a master of the code yet, does not
grasp the fact that they are talking to the uneducated masses. Either that or you do presume that you are
talking to those intellectually inferior to you and you enjoy showing them how smart you are.
Programmers that know what they are doing are NOT reading your posts. They already know any thing that
you may have to share. It is the unknowing that are reading this and trying to better themselves.

6. I don't know which the case is with you. Whether you are genuinely concerned that somehow this site is going
to start looking like a facebook page and that you genuinely do want to promote a better understanding of mql4,
and help others while keeping the site arranged,or, you are on some kind of a ego trip running around all over
the site like a policemen watching for someone to put an arrow in the wrong place. I certainly hope it is not the latter.

7. What I do know from emails and feedback from traders and programmers alike is that many people have stopped
coming here to ask or answer or contribute their knowledge to this site due to the rude and obnoxious way they
themselves or others are treated when asking or answering a question. They are harassed for not posting in the
proper format regardless of the legitimacy of their question or the value of there teaching contribution.
Only those truly desperate stay.

8. There are examples on this site of people asking a simple question that could be answered in less time
than is spent condemning them for not searching the site or posting in the right place or including the wrong image.
You can actually here the fear in their questions as they ask them. Fear of doing something to upset the mql4 GODS.

9. Instead they are made to feel unwelcome and have their question ignored. Why not suggest the proper way to post
AND answer their question? It's an absolute shame. Nobody wins. Everybody loses. The student remains lost, those
with the ability to help remain silent, and mql4.com becomes a less and less desirable place to visit.

10. "There is more happiness in giving than there is in receiving." we are told.
It brings me joy to help others here at Mql4.com but that joy is fading fast.
If we've got to constantly worry about getting our hand slapped away for reaching out to someone in need, there is no
more joy, only dread.

11. Is there any one else out there that feels this way or am I way off base here? Can I get an Amen?
Ok I'm down off of my soapbox..
And I still like your avatar....
PipPip...Jimdandy

Amen ++ brother. I've seen the same thing going on and it looks so ugly. Don't lose hope, you're not alone .

Sadly, most people after getting destructive comments don't return. Who can blame them?

The power of the internet comes with a price tag. One needs to PeopleSelect(SelectByIntentions) and never forget where he/she started.

And if PeopleSelect () = "not genuine " we can always AttentionShift (ignore);

It was a pleasure reading your post.

Keep in mind that " No good deed goes unpunished". Such is life. Amen++ again.

PS.

Not surprisingly, some of the code guru who are so ready to put everybody down and dislike others who provide free help, have a reason !!!

If I give you one guess, would it be " money "? Because that is what it's all about for them.

They're not here to help. They're here to say " you'll never get it done so pay up ". Some even ask for it :

"deVries 2013.02.02 12:28 #

Your message to me I can give you the full code directly.....

That won't be for free. For that you have to use Jobs section and pay to get it...

Don't believe me ? Here's the link : https://www.mql5.com/en/forum/143253/page3#753039

Well, well. How about that ?!! Surprised? Not me.

 
thrdel:

Not surprisingly, some of the code guru who are so ready to put everybody down and dislike others who provide free help, have a reason !!!

If I give you one guess, would it be " money "? Because that is what it's all about for them.

They're not here to help. They're here to say " you'll never get it done so pay up ". Some even ask for it :


is this another example ? or m i wrong ?
 
thrdel:

Amen ++ brother. I've seen the same thing going on and it looks so ugly. Don't lose hope, you're not alone .

Sadly, most people after getting destructive comments don't return. Who can blame them?

The power of the internet comes with a price tag. One needs to PeopleSelect(SelectByIntentions) and never forget where he/she started.

And if PeopleSelect () = "not genuine " we can always AttentionShift (ignore);

It's good that you and Jimdandy have plenty of free time to spend here helping people
 
qjol:
is this another example ? or m i wrong ?


You're wrong and if you did bother to check on me, I'm sure you've seen this https://www.mql5.com/en/forum/149958/page5#916655

and this https://www.mql5.com/en/forum/150036/page2#917693 and this https://www.mql5.com/en/forum/137967, did you?

And just in case you're wandering, if @pandora111

let's me know that the indicator looks right I am happy to share the code and yes, it is free. Are you interested?

I'm not the best code writer there is but I'm glad to share what I know. Are you?

Read the " help " pandora111 has got from others and ask yourself if she/he is going to come back to this forum.

Sorry, trying to make me look bad didn't work this time but if you feel the need you're welcome to try again.

 
RaptorUK:
It's good that you and Jimdandy have plenty of free time to spend here helping people


Did the reply to Jimdandy bothered you that much?

That's too bad.Everything he said is sadly true.

I'm just curious how long before my posts get deleted again.

 

To put the record straight.

I fully agree with Jimdandy and ydrol. The atmosphere of this forum is too often bad, this has to be changed, and I will employ myself in this direction.

Everyone should be comfortable to ask questions. And everyone can respond in its own way, or by providing the answer directly or trying to push the OP to learn.

Reason: