[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 216

 

Guys !

how to limit the number of trades the EA can make at the same time ?

urgently!

thank you !

if (OrdersTotal()>1 && OrdersTotal()<3) - ?
 

Finally figured out that ObjectGet(nm,OBJPROP_TIME1) ignores the time for the HLine object.

Can you tell me how to specify time of HLine creation for calculation

iHighest(NULL,0,MODE_HIGH,shift,1 )fromHLine creation to current time?

Read the thread about sorting rules for objects by name, no ideas added.

 
Operr:

Finally figured out that ObjectGet(nm,OBJPROP_TIME1) ignores the time for the HLine object.

Can you tell me how to specify time of HLine creation for calculation

iHighest(NULL,0,MODE_HIGH,shift,1 )fromHLine creation to current time?



Use horizontal Trendlines :)
 
I have several EAs trading on different terminals at the same brokerage house. From time to time they converge. So what is the best way to dilute these EAs?
 
TANKER:
I have several EAs trading on different terminals at the same brokerage house. From time to time they converge. So what is the best way to dilute these EAs?

The best way to dilute EAs is on trust.
 
tara:

Use horizontal Trendlines :)
Thanks twice mate! Wouldn't have figured it out myself, and now I know the new object type.
 

Please help me to find the reason why when writing data to an exceL file, the columns are not split, the headers are just written in one cell.

In addition, the script only creates a table header, the order values themselves are missing.

+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
int start()
{
//----
string FileName;
int Handle;
int ClOp; // разница между закрытием и открытием в пунктах
int spread;// спред по инструменту
int BarYear;// год
int BarDay; // день недели, 0 - восресенье

spread=MarketInfo(Symbol(),MODE_SPREAD); // запомним спред

// сформируем имя файла, например, EURUSD1440.csv
FileName=Symbol()+Period()+".csv";
//откроем файл с именем FileName (создадим указатель/handle на него)
Handle=FileOpen(FileName,FILE_WRITE | FILE_CSV,";");
if (Handle<1)
{
Print("Не удалось открыть файл, ошибка ",GetLastError());
return;
}

// запишем названия столбцов (создание шапки)
FileWrite(Handle,"Дата","Open","High","Low","Close","Close-Open в пунктах",
"Спред в пунктах","День недели","Год");


for (int index=Bars-1;index>=0;index--)
{
// пропустим бары до 2001 года
if (TimeYear(Time[index])<2001) continue;

// прервем (закончим) цикл, если 2005 год мы прошли весь
if (TimeYear(Time[index])>2005) break;

// Выведем High, Low, Open, Close для бара с индексом index
//Print(High[index]," ",Low[index]," ",Open[index]," "
//,Close[index]," бар=",index);
BarYear=TimeYear(Time[index]);
BarDay=TimeDayOfWeek(Time[index]);
ClOp=Close[index]/Point-Open[index]/Point;
FileWrite(Handle,TimeToStr(Time[index]),Open[index],High[index],Low[index],Close[index],ClOp,spread,BarDay,BarYear);
}


//----


//закроем файл (освободим указатель/handle, чтобы файл можно было
//открыть для редактирования другими программами)
if(Handle>0) FileClose(Handle);


return(0);// работа скрипта завершена
}

 
Suliena:

Please help me to find the reason why when writing data to an exceL file, the columns are not split, the headers are just written in one cell.

In addition, the script only creates a table header, the order values themselves are missing.


I haven't tried it myself, I think delimiters are needed. Space, tab, slash, etc. If you do it through a text file, then delimiters are a must.

 
smartemiy:

Guys !

how to limit the number of trades the EA can make at the same time ?

urgently!

Thank you !

NumberOrd is a function which counts the number of open orders.

if (NumberOrd()>3) return(0); - this will be the correct entry to limit the number of trades opened at the same time ?

I don't want it to look like on the picture!

Thanks in advance!

Have a nice trade!

 
smartemiy:

NumberOrd is a function that counts the number of open orders.

if (NumberOrd()>3) return(0); - will this entry be correct to limit the number of trades entered at the same time?

I don't want it to look like on the picture!

Thanks in advance!

Have a nice trade!