[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 182
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
I have written a simple indicator. Here is the code:
There is only one buffer in it. The indicator values are of type double.In Expert Advisor, I decided to get the value of the indicator and apply it to the trade as a filter.
Here I wrote a simple function call of this indicator buffer on the last formed bar:
In the tester the slope value is returned wrong:Why? The type is correct. The call is also correct. The indicator works properly at all. Here is the log log on the tester, and from the real current market:
Why is some number2147483647 returnedall the time instead of the required number ?
I have written a simple indicator. Here is the code:
It has only one buffer. The indicator values are of type double.In Expert Advisor, I decided to get the value of the indicator and apply it to the trade as a filter.
Here I wrote a simple function call of this indicator buffer on the last formed bar:
The slope value is not correct in the tester:Why? The type is correct. The call is also correct. The indicator works properly at all. Here is the log log on the tester, and from the real current market:
Why is some number2147483647 returnedall the time instead of the required number ?
Reworked the indicator
The problem seems to be with the indicator.
You're right... But it's just the number of bars that need to be recalculated... Strange why there is no way to get the correct value in this case.
If you comment out this line, everything works fine and correct the calculation from the 0th bar:
But In the previous variant, at priming it was outputting an adequate value. But owl takes not adequate. Why?
You're right... But it's just the number of bars to be recalculated... Strange why in this case there is no way to get the correct value.
If this line is commented out, everything works fine and the calculation from bar 0 is corrected:
But In the previous variant, it was outputting an adequate value. But owl takes not adequate. Why?
Looks like you are using visualisation mode to check
You seem to be using visualisation mode to check
Yeah, so what?
Help me find an error, no action and no error. Maybe I am missing some libraries?
My system: MT4, Build 451.
Windows 7 Home Base.
Help me find an error, no action and no error. Maybe I am missing some libraries?
My system: MT4, Build 451.
Windows 7 Home Base.
how to choose the smallest lot among all open trades?
int i, ot = OrdersTotal(); double min=0; int min_ticket=0; for(i=0;i<ot;i++) { if(!OrderSelect(i,SELECT_BY_POS)) continue; if(OrderType()!=OP_BUY && OrderType()!=OP_SELL) continue; if(i==0||min> OrderLots()) {min = OrderLots(); min_ticket=OrderTicket();} }