Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 587
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
This is how it compiles:
Thanks. I naively thought that fixing a dozen compilation errors would turn a working mql4 code into a mql5 indicator)
It doesn't want to show maximum, minimum of a day. How far is it from the goal?
Thanks. I naively thought that fixing a dozen compilation errors would make a working mql4 code turn into a mql5 indicator)
It doesn't want to show a minimum of a day. How far is it from the goal?
I don't know :)
Try to expand the arrays of buffers at the beginning of OnCalculate using ArraySetAsSeries
Thanks. I naively thought that fixing a dozen compilation errors would make a working mql4 code turn into a mql5 indicator)
It doesn't want to show maximum, minimum of a day. How far is it from the target?
That's such a huge amount of lines of code just to show the highs and lows of the day?
Yes, also the closing of the day, but it's in the history, not just the previous day. That's the tricky part.
Is this your code? Or was it written to order?
Can you show me a snapshot of how it looks in MT4?
Is this your code? Or was it written to order?
Can you show me a snapshot of how it looks in MT4?
The indicator is from the net. I don't have MT4 at hand, I'll tell you in words. Lines from start to end of each day, by High, Low and Close prices of the day. But, instead of a line atclose price of the day, I want to put a line at close price of the bar at 21:00
Maybe it really can be made easier than contrived.
I am closing 4 positions at once, how can I count them as one in a row in the loss-counting function?
They may close, because of slippage, not at the same price and the time may be different
Try:
I am closing 4 positions at once, how can I count them as one in a row in the loss-counting function?
They may not close at the same price due to slippage, and the timing may be different
The price because of the slippage is different and so is the time; one has closed at the end of the second, while the other has closed at the beginning of the next second. Try to record the order tickers at the time of closing. You can record them in a file...
I am closing 4 positions at once, how can I count them as one in a row in the loss-counting function?
They may close, because of slippage, not at the same price and the time may be different
Trial:
I cycle through the last closed ones. If the last closed one is negative, then I look at all closed ones for 120 seconds (2 minutes) and calculate the total profit
I am closing 4 positions at once, how can I count them as one in a row in the loss-counting function?
They may close, because of slippage, not at the same price and the time may be different
I tried:
Something like this: