But I double click on the right papameter where the number 70, a vertical line appears in front of 70, I type 10 in front of 70, I press Enter and the result is 1070 , but I just need 10?
//+----------------------------------------------------------------------------+//| Автор : Ким Игорь В. aka KimIV, http://www.kimiv.ru |//+----------------------------------------------------------------------------+//| Версия : 06.03.2008 |//| Описание : Возвращает флаг существования позиций |//+----------------------------------------------------------------------------+//| Параметры: |//| sy - наименование инструмента ("" - любой символ, |//| NULL - текущий символ) |//| op - операция (-1 - любая позиция) |//| mn - MagicNumber (-1 - любой магик) |//| ot - время открытия ( 0 - любое время открытия) |//+----------------------------------------------------------------------------+bool ExistPositions(string sy="", int op=-1, int mn=-1, datetime ot=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 (ot<=OrderOpenTime()) return(True);
}
}
}
}
}
}
return(False);
}
Question. I'm trying to pass a bar shift in history via iCustom buffer.
Examples PRIOR to date (passing int of course).
#property indicator_chart_window//---externstring __History_method___ = "Set a date for the analysis";
externbool dateshift = false;
externbool dataLine = false;
int init()
{
//---- indicatorsreturn(0);
}
int deinit()
{
//----ObjectDelete("TL2");
//----return(0);
}
#property indicator_chart_window#property indicator_buffers 1#property indicator_color1 Greenexternstring __History_method___ = "Set a date for the analysis";
externstring DateShift = "14.02.2013 07:00";
externbool dataLine = false;
//----double TiBuffer[];
int init()
{
//---- indicatorsSetIndexBuffer(0,TiBuffer);
IndicatorDigits(0);
SetIndexEmptyValue(0,0.0);
//----return(0);
}
int deinit()
{
//----ObjectDelete("TL");
//----return(0);
}
int start()
{
int historybar = iBarShift(Symbol(), 0, StrToTime(DateShift), false);
TiBuffer[1] = historybar;
//---- if (dataLine==true)
{
ObjectCreate("TL", OBJ_VLINE, 0, iTime(Symbol(), 0, historybar), 0);
ObjectSet("TL", OBJPROP_TIME1, iTime(Symbol(), 0, historybar));
ObjectSet("TL", OBJPROP_COLOR, Red);
ObjectSet("TL", OBJPROP_STYLE, 2);
}
//---- return(0);
}
//+------------------------------------------------------------------+
ВОПРОС!
Передача даты идет ТОЛЬКО по ранее установленной цифре! Когда дату меняю, например на 12.2.2013 передача по буферу идет все равно
14.02.2013. Можно ли решить проблему. Идея таким образом объединить несколько индикаторов, для движения по истории.
I can't change the max drawdown in the strategy tester in the optimization section, but people that I bought the Expert Advisor have changed this parameter in the terminal, and I was advised to contact you, is it a problem?
sanktum: I can't change the max drawdown in the strategy tester in the optimization section, but people that I bought the Expert Advisor have changed this parameter in the terminal, and I was advised to contact you, is it a problem?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
pressed twice on the line there was a vertical line in front of 70, pressed Enter the line became blue but the number 70 remained?
Double-click on the desired parameter, enter the desired value and press Enter
Good evening, please advise how to write a condition that does not open buy (sell) if an order(s) is(are) opened in the opposite direction.
I would appreciate it.
Good evening, please advise how to write a condition that does not open buy (sell) if an order(s) is(are) opened in the opposite direction.
I would appreciate it.
check this function on the web site
GetTypeLastOpenPos()
This one is better:
Question. I'm trying to pass a bar shift in history via iCustom buffer.
Examples PRIOR to date (passing int of course).
I can't change the max drawdown in the strategy tester in the optimization section, but people that I bought the Expert Advisor have changed this parameter in the terminal, and I was advised to contact you, is it a problem?
Click once on 70 and enter 10.
I've never been able to change anything at all. Checked or unchecked, the old value comes back and that's it...