[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 252
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Dear Professionals, could you advise... I'm using line drawing in the indicator:
The problem is that when I switch to another timeframe the lines are drawn according to the new parameters, but the old ones are not deleted. What should I add and where should I put it so that when I move to another timeframe the old lines are not drawn? Thanks...Tell me what's wrong:
double order=AccountEquity()/4100;
...
ticket=OrderSend(Symbol(),OP_BUY,NormalizeDouble(order,2),Ask,10,Ask-SL*10*Point,Ask+SL*20*Point, "buy_order",1,0,Green);
it gives out: 2011.03.08 16:35 ScaplerM5 EURUSD,M5: OrderSend error 4051
2011.03.08 16:35 ScaplerM5 EURUSD,M5: invalid amount for OrderSend function
Tell me what's wrong:
double order=AccountEquity()/4100;
...
ticket=OrderSend(Symbol(),OP_BUY,NormalizeDouble(order,2),Ask,10,Ask-SL*10*Point,Ask+SL*20*Point, "buy_order",1,0,Green);
it gives out: 2011.03.08 16:35 ScaplerM5 EURUSD,M5: OrderSend error 4051
2011.03.08 16:35 ScaplerM5 EURUSD,M5: invalid lots amount for OrderSend function
Probably, the lot size is smaller than allowed.
I.e., if the minimum allowable lot is 0.1, but your lot = 0.09....
Good evening all!
Can you please tell me if TimeCurrent(); - returns the last known server time, the time of the last quote, or the last arrival of any instrument?
According to my experimental data, it's the second one.
I just want someone to confirm it!
Thanks in advance for the reply!
Good evening all!
Can you please tell me if TimeCurrent(); - returns the last known server time, the time of the last quote, or the last arrival of any instrument?
According to my experimental data, it's the second one...
I just want someone to confirm it!
Thanks in advance for the reply!
Actually, it's the current server time.... which was received last...
So, not the time of the last quote for a given currency pair?
According to my experimental data, the second...
Yeah.
That's what it says in the help - "last server time". It's not tied to a specific currency.
Yes.
So... So I had a question...
I have a need in init(e) to use a function that collects ticks for the current currency...
I've solved it like this -
But, if you pay attention to the code and my question, I have a lot of values that will stupidly repeat...
What to do, how to make Expert Advisor react only on new tick arrival for a given instrument.
I have an idea to compare i and i+1, but if two equal ones arrive in a row, we will lose one of the values.
Please assist))
What to do, how to make the EA react only to a new tick coming for the given symbol?
remove while
move the code to start
and parameters
outside
remove while
Yes, you can, but in case expert is multicurrency, it won't solve the problem, right?
Still, can we solve this trabble in the inite?)