Techno: what if? Indicators are built with absolute accuracy based on current readings. Trading is based on these same readings, what else is unclear here ?
"with absolute accuracy based on current readings".
Let's be clear - unreliable readings. And if we do not work on average prices, the spread is very large.
Just compare two candlestick charts on, say, M15. For example with these
How do I find the opening price of the last order?
I did it like this, but when I close a series of orders by close, the price of the first order in the series comes out, but not the last...
Is there any other way to determine the last order?
//+----------------------------------------------------------------------------+//| Автор : Ким Игорь В. aka KimIV, http://www.kimiv.ru |//+----------------------------------------------------------------------------+//| Версия : 19.02.2008 |//| Описание : Возвращает цену открытия последней открытой позиций. |//+----------------------------------------------------------------------------+//| Параметры: |//| sy - наименование инструмента ("" - любой символ, |//| NULL - текущий символ) |//| op - операция (-1 - любая позиция) |//| mn - MagicNumber (-1 - любой магик) |//+----------------------------------------------------------------------------+double PriceOpenLastPos(string sy="", int op=-1, int mn=-1) {
datetime t;
double r=0;
int i, k=OrdersTotal();
if (sy=="0") sy=Symbol();
for (i=0; i<k; i++) {
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol()==sy || sy=="") {
if (OrderType()==OP_BUY || OrderType()==OP_SELL) {
if (op<0 || OrderType()==op) {
if (mn<0 || OrderMagicNumber()==mn) {
if (t<OrderOpenTime()) {
t=OrderOpenTime();
r=OrderOpenPrice();
}
}
}
}
}
}
}
return(r);
}
//+----------------------------------------------------------------------------+//| Автор : Ким Игорь В. aka KimIV, http://www.kimiv.ru |//+----------------------------------------------------------------------------+//| Версия : 28.11.2006 |//| Описание : Возвращает цену установки последнего ордера или 0. |//+----------------------------------------------------------------------------+//| Параметры: |//| sy - наименование инструмента ("" - любой символ, |//| NULL - текущий символ) |//| op - операция (-1 - любая позиция) |//| mn - MagicNumber (-1 - любой магик) |//+----------------------------------------------------------------------------+double GetOrderOpenPrice(string sy="", int op=-1, int mn=-1) {
datetime t;
double r=0;
int i, k=OrdersTotal();
if (sy=="0") sy=Symbol();
for (i=0; i<k; i++) {
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol()==sy || sy=="") {
if (OrderType()>1 && OrderType()<6) {
if (op<0 || OrderType()==op) {
if (mn<0 || OrderMagicNumber()==mn) {
if (t<OrderOpenTime()) {
t=OrderOpenTime();
r=OrderOpenPrice();
}
}
}
}
}
}
}
return(r);
}
there are no absolutely reliable ones. It's like the weather, in the same city may differ slightly in different parts. A profitable EA will work fine on either variant. What am I supposed to see on these charts? Charts are like charts.
Hi all. Is it possible to configure the terminal to display data on the chart only during the American trading session (from 17:30 to 24:00 Moscow timeframe)?
No way. Every kitchen has its quotidian.
And there's nowhere to get more or less real charts?
Sad...
accuracy of indicator readings...
kopeck, for the selected dc, all relevant indicator readings will be absolutely fair.
if only...
if...
what if? Indicators are built with absolute accuracy based on current readings. Trading is based on these same readings, what else is unclear here ?
"with absolute accuracy based on current readings".
Let's be clear - unreliable readings. And if we do not work on average prices, the spread is very large.
Just compare two candlestick charts on, say, M15. For example with these
iMoningStar https://www.mql5.com/ru/code/9520
i3Indians https://www.mql5.com/ru/code/9695
iDragon https://www.mql5.com/ru/code/9617
And then tell me - how would an EA work on them?
How do I find the opening price of the last order?
I did it like this, but when I close a series of orders by close, the price of the first order in the series comes out, but not the last...
Is there any other way to determine the last order?
What was I supposed to see on these charts?
Hi all. Is it possible to configure the terminal to display data on the chart only during the American trading session (from 17:30 to 24:00 Moscow timeframe)?
Thank you
Good afternoon, continuing to get to grips with coding, took the example EA from the tutorial section article, replaced the code from the example:
To an arbitrary one for training purposes:
The trades don't show up, could you please tell me what's the reason, how to fix the code.