Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 710
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
You can do this: Km=MathMax(i/r,Point); // with division, and it won't be zero!
wow!!! Head! Thank you very much!!! After the extremely tedious four-hour work I finally found how to stick this function so that the tester did not swear) came out about the following.
double a=iLowest(Symbol(),PERIOD_M1,MODE_LOW,m1,0); //return bar index for n-periods with min price
double b=iHighest(Symbol(),PERIOD_M1,MODE_HIGH,m1,0); //return the bar index for n-periods with max price
double MinLOWPeriod=iLow(Symbol(),PERIOD_M1,a); //return the bar price value with the lowest price
double MaxHIGHPeriod=iHigh(Symbol(),PERIOD_M1,b); //return the price of the bar with the highest price
double PriceCloseBar=iClose(Symbol(),PERIOD_M1,0); //return the close price of the last bar
double xm1=(PriceCloseBar-MinLOWPeriod)/(MathMax((MaxHIGHPeriod-MinLOWPeriod)/100,Point));
Print(xm1);
and also made the formula smoother;)
Thank you!
sponger:
It's a pity there's no "Thank you" button.
But there is another magic button: SRC, when you use it, the code (or its fragments) get neater and more readable in the post of the questioner, adding a plus to the questioner's karma and increasing the number of those who will look at this code and decide to help.
Just shhhh. . So in the secret knowledge of the magic of the SRC button are devoted, in general, only those who read the sacred texts of the manuals on the site. For example, such as these.
And success to you here in mastering the secret knowledge in solving further questions!wow!!! Head! Thank you very much!!! After extremely tedious four-hour work I finally found how to stick this function so that the tester did not swear) came out approximately the following.
double xm1=(PriceCloseBar-MinLOWPeriod)/(MathMax((MaxHIGHPeriod-MinLOWPeriod)/100,Point));
Print(xm1);
and also made the formula smoother;)
Thanks!
Hi all)
I tried to write a function to close a part of the position, but when I run in the tester, 138 is popping up an error, I do not understand what the problem. Help please.
Here is an Expert Advisor in which this function should work)
Hi all)
I tried to write a function to close a part of the position, but when I run in the tester, 138 is popping up an error, I do not understand what the problem. Help please.
I have an EA where this function should work.)
Did you look in the Dock, what this error means! From there you will find the answer!
At what price does buy close? And the Sell?
Greetings all
My question is more related to methaquotes developers, but nevertheless...
Сколько баров храниться история? Т.е. с каким максимальным по сдвигу баром можно работать?
Code:
Print(iMA(Symbol(),0,14,0,MODE_SMA,PRICE_CLOSE,1200));
Print(iClose(Symbol(),0,1200));
When testing this shift, the terminal outputs 0.0 for 2 cases
But
Print(iMA(Symbol(),0,14,0,MODE_SMA,PRICE_CLOSE,120));
Print(iClose(Symbol(),0,120));
In the test everything works
Is it possible to somehow adjust the size of available history? Maybe someone has faced such a problem and already found a solution?
Thanks in advance!
Hi all.
I am trying to update a simple trawl EA by Kim to delete pending orders after closing all market orders, it fails(
I have added function to delete pending orders:
I faced another problem which I should not be able to solve because I'm not too good at coding.
I guess I should write a condition such as:
This is just an example from another EA.
Please help me out.
Hi all)
I tried to write a function to close a part of the position, but when I run in the tester, 138 is popping up error. I do not understand what the problem. Please help.
Here is an EA where this function should work)
138 - "Requested price is out of date or bid and ask are mixed up".
The open/close price cannot be recalculated, because it is there, and here is the problem(you need to request the price and give it a value using MarketInfo, and rename this one to another variable):