[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 203
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
Guys!
how do i make every 40th order a bigger lot? :: market and pending
How about this?
Not exactly, you should count the number of orders in the history a = (OrdersHistoryTotal()+ 1) % 40
Well, this does not take into account how many orders may be open at the same time; otherwise, we would have to add the OrdersTotal (probably, minus the pending orders).
Not exactly, we need to count the number of orders in the history a = (OrdersHistoryTotal()+ 1) % 40
Well, this does not take into account how many orders may be open at the same time; otherwise, we would have to add the OrdersTotal (probably, minus the pending orders).
And what if there were open positions in other symbols or other Expert Advisors? Think about what you are writing
For starters, your lot calculation function is declared inside the start function. Take it out. Then there will be some errors with undeclared variable, but I think you can handle them on your own.
Another question, in which function should I declare lot calculation? init, deinit?
Better to make a separate function and use it when needed (before opening a new position)
Better to make a separate function and use it when needed (before opening a new position)
Keeping Teak History
Hi all!
Question is - there is a script for saving tick history
...
FileSeek(ExtHandle,0,SEEK_END);
FileWrite(ExtHandle, TimeToStr(TimeCurrent(), TIME_DATE | TIME_SECONDS), Bid, Ask, iVolume(Symbol(), NULL, 0));
...
it writes like this:
...
2011.08.15 08:38:49;76.936;76.946;1389
2011.08.15 08:38:51;76.934;76.953;1390
2011.08.15 08:38:56;76.929;76.958;1391
2011.08.15 08:38:56;76.935;76.945;1392
...
That is, it turns out that the minimum unit of time is a second. So my question is, is there any way to write ticks in milliseconds ?
Thank you in advance.
So it turns out that the minimum unit of time is a second. So question - is there any way to write ticks in milliseconds ?
Look at GetTickCount... or else refer to the Windows function
Victor, following your advice I added the function. Now it doesn't compile.
Nested functions are not allowed
Nested functions are not allowed