Regarding point one, part 1 & 2, I fully agree this should be '<' in both cases
- Jim
Regarding point one, part 1 & 2, I fully agree this should be '<' in both cases
- Jim
Jim, thanks. Is obvious really but, as they say, is good to talk and have confirmation.
cheers
.
btw Jim - ref: https://www.mql5.com/en/forum/126475
For the seed, have you tried GetTickCount()
Under: MQL4 Reference > Common functions
Jim, thanks. Is obvious really but, as they say, is good to talk and have confirmation.
cheers
Any time fbj,
I also noticed that strange lots size condition when I observed that code, it confused me as a novice MQL4/C coder.
Glad you had the balls to post it ;)
Happy coding & trading,
Jim
Jim, thanks. Is obvious really but, as they say, is good to talk and have confirmation.
cheers
.
btw Jim - ref: https://www.mql5.com/en/forum/126475
For the seed, have you tried GetTickCount()
Under: MQL4 Reference > Common functions
Great, that seems to work!
I didn't knew that GetTickCount() statement yet.
Thanks a lot :)
Sidenote: I don't understand why this is so hard in MQ4 (and perhaps C also) since I was used to use the Rand() statement in VBA.
Great, that seems to work!
I didn't knew that GetTickCount() statement yet.
Thanks a lot :)
Sidenote: I don't understand why this is so hard in MQ4 (and perhaps C also) since I was used to use the Rand() statement in VBA.
since you are a C'er, maybe also familiar with Windows API's ?
anyway, I'm not win programmer but msdn site docs on the API are great source of inspiration!
Reason I mention is vast repository of goodies mt can leverage via #import...
I found refs to interesting? threads:
https://www.mql4.com/search/WinAPI
"Millisecond Time of a Tick" https://www.mql5.com/en/forum/110974
"how to obtain current time in miliseconds precision?" https://www.mql5.com/en/forum/112166
since you are a C'er, maybe also familiar with Windows API's ?
anyway, I'm not win programmer but msdn site docs on the API are great source of inspiration!
Reason I mention is vast repository of goodies mt can leverage via #import...
I found refs to interesting? threads:
https://www.mql4.com/search/WinAPI
"Millisecond Time of a Tick" https://www.mql5.com/en/forum/110974
"how to obtain current time in miliseconds precision?" https://www.mql5.com/en/forum/112166
For years I was satisfied with coding/working in VBA/Excel but for automatic trading I find it too slow and impractical to use, so thatswhy I recently made a switch to MT.
Because all of this I haven't worked that much with the Windows API so far, but I agree that it could be a great extention.
Thanks for the interesting links.
- Jim

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Two items I would appreciate your valued comments on.
..
ONE
Reading some site docs and require your observation on this source code found at https://book.mql4.com/samples/expert
In code snippets (1) and (2), > is used
do you agree?
(1)
(2)
.
TWO
For a long time, I have been ignoring and freaking out over this and finally think should attempt to 'move on' and get this sorted out, so your inputs really wanted :-)
.
T/P and S/L setting has been fully aired many times on this forum yet (to me) the conversations have always been 'self' oriented in that this is how "I" view the issue and how "I" use it in my own software.
I mean that it seems that would be best bet to actually get return of say 10pips instead of 10pips less spread.
I have looked in many source codes and the manner of what base is used varies between Entry and Close price...
.
What about the general punter/user ?
IE, MT docs base T/P and S/L on the closing price
This gives a T/P of: T/P - spread; ie, wanted T/P is gross profit and the realised net profit is T/P minus costs
.
If base T/P and S/L on the entry price
This gives a T/P of: T/P; ie, closing price must not only move the T/P distance but the spread distance too. ie, wanted T/P is net profit
.
Assuming I've described the two alternatives in T/P,S/L calculations correctly, my question boils down to:
What does the general punter/user expect to earn when they specify the T/P, S/L values?
.
the same ideas I believe hold for the S/L setting. Either it is based on EntryPrice OR ClosePrice, with the same exclusive/inclusive of spread end results.
.
Guess I'm asking, should stops and the eventual P/L values include OR exclude spread?