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
simply..
you need to find last opened order first and find its lot amount too
after that you need to incerase last opened orders lots amount (with plus or multipy factor)
it will be next lot for your next order
Hi.. thanks a lot for your reply.. that is what am trying to do.... i did it with mql4.. finding it hard with mql5
https://www.mql5.com/en/forum/15083/page2
Hi.. thanks a lot for your reply.. that is what am trying to do.... i did it with mql4.. finding it hard with mql5
https://www.mql5.com/en/forum/15083/page2
dont overcomplicate things.
I literally gave you a function that needed one line changed.... and youve already got the code for that change. :it literally just returns the next lotsize in the sequence
You dont need to know anything other than the amount of currently opened trades in one direction. finding that number also gives you the mechanism to calculate the next lotsize in the sequence.
By the time you know the most recently opened trade, since you have to iterate the whole order stack to do this (and additionally keeping track of which index it is, or examining (and recording) the timestamp and lotsize), then reslecting it to get its lotsize, youve already done enough to just calculate the next lotsize, before asking for the most recent trade lotsize?
Theres no need to be both slower and more complex.
This is the exact method I used to calculate lotsize 12 years ago when playing with a martingale/grid hybrid (martingale in a range, and on breakout of that range hedge off the group, and start martingailing the next range) just for funsies.
dont overcomplicate things.
I literally gave you a function that needed one line changed.... and youve already got the code for that change. :it literally just returns the next lotsize in the sequence
You dont need to know anything other than the amount of currently opened trades in one direction. finding that number also gives you the mechanism to calculate the next lotsize in the sequence.
By the time you know the most recently opened trade, since you have to iterate the whole order stack to do this (and additionally keeping track of which index it is, or examining (and recording) the timestamp and lotsize), then reslecting it to get its lotsize, youve already done enough to just calculate the next lotsize, before asking for the most recent trade lotsize?
Theres no need to be both slower and more complex.
This is the exact method I used to calculate lotsize 12 years ago when playing with a martingale/grid hybrid (martingale in a range, and on breakout of that range hedge off the group, and start martingailing the next range) just for funsies.
Okay ill try it..
I will be greatful If you could paste the code
Thanks
Okay ill try it..
I will be greatful If you could paste the code
Thanks
for what? the function that returns the lotsize? i already did that.
for the grid/martingale hybrid? No.
for what? the function that returns the lotsize? i already did that.
for the grid/martingale hybrid? No.
Yes please send me the function that return lot size..
Then ill continue
Yes please send me the function that return lot size..
Then ill continue
I already gave it to you its on page one. I already said this.
Its even commented, and only needs one line changed to suit your exact circumstances. I already said this too.
I will not do more for you, your laziness is just galling at this point.
I already gave it to you its on page one. I already said this.
Its even commented, and only needs one line changed to suit your exact circumstances. I already said this too.
I will not do more for you, your laziness is just galling at this point.
Haha.. thanks.. will look at it..
Thanks a lot.. el_looto
here is the final code maybe?
it worked perfect!!
The mart code increase trades on new buys and sells..
sells mart not controlling sells only.. instead it increase lot on new buy signal.. same as buy
MT5
MT4
okay here is the final code
did not code mart for stop orders
Thanks to you all for your feedbacks