[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 375

 

It is possible not to look anywhere at all:-)

But who would benefit from it - the Expert Advisor or your deposit?

 
alsu >>:

если приперло, ставьте себе Wine и вперед:)))

I see that it works through an emulator - not sure if it will be faster than on Windows. Has anyone tested it?

 
chief2000 >>:

Вижу что это работа через эмулятор - не уверен что будет быстрее чем на Windows. Может кто-нибудь проверял?

The best tool is the one you know and know how to use, if you are so lacking in power you can upgrade to an i7, under Linux is not so simple, if you don't know how to use it better not to worry.

 
alsu писал(а) >>

please specify what is meant by "watch"?

To watch means to use it for work.

In details, it looks like this: For example, in the account we have 5000 c.u., we set variable Balance =1000, and the Expert Advisor should work as if there were not 5000, but 1000 in the account. >> How ...

 
chief2000 >>:

Вижу что это работа через эмулятор - не уверен что будет быстрее чем на Windows. Может кто-нибудь проверял?

Search has checked. :))

 

My respects to the community.

Can you please explain what I am doing wrong?

In my EA I have decided to implement a text in the chart window at a given price level, which keeps its position near the edge of the window while scrolling the chart. At that the text should be interactive and take one of two values, that cyclically change when manually shifting the text. I built a scheme similar to this one:

double   LabPr;
datetime LabTm;
int      Value;
int      Shift;
int      Flag;

int init()
  {
   Value=1;
   Shift=6;
   LabPr=Bid;
   Flag=0;
   LabTm=iTime(NULL,0,WindowFirstVisibleBar( )- Shift);
   
   ObjectCreate("LabTest",OBJ_TEXT,0, LabTm, LabPr);
   ObjectSetText("LabTest",DoubleToStr( Value,0) ,11,"Tahoma",Red);
  }

int start()
  {
   if( LabPr!=ObjectGet("LabTest", OBJPROP_PRICE1)||
      LabTm!=ObjectGet("LabTest", OBJPROP_TIME1))
     {
      if( Flag==0)
        {
         Value= Value*(-1);
         Flag=1;
        }
     }
   else Flag=0;
   LabTm=iTime(NULL,0,WindowFirstVisibleBar( )- Shift);
   ObjectSet("LabTest", OBJPROP_TIME1, LabTm);
   ObjectSet("LabTest", OBJPROP_PRICE1, LabPr);
   ObjectSetText("LabTest",DoubleToStr( Value,0) ,11,"Tahoma",Red);
  }

The Flag variable prevents multiple state switching when the label is moved with the mouse but not released for several ticks.

The problem is that switching doesn't always happen. Is there something I haven't considered?

 

Here is the code


int tm, bu, se;

int start()
{

tm=Hour(); // determine what time it is

// close all orders
if (tm==23) while (OrdersTotal()!=0) if(OrderSelect(0,SELECT_BY_POS,MODE_TRADES)) {int tik=OrderTicket() ; int t=OrderType(); double l=OrderLots();
if (t==OP_BUY) OrderClose(tik,l,Bid,3,Red);
if (t==OP_SELL) OrderClose(tik,l,Ask,3,Green);
if (t==OP_BUYSTOP) OrderDelete(tik);
if (t==OP_SELLSTOP) OrderDelete(tik);
}
if (tm==23 && bu!=0 || tm==23 && se!=0 ) { bu=0; se=0;}



// at zero o'clock put two pending orders on high i low of the previous day's candle
double h1=High[1];
double l1=Low[1];
if (bu==0 && tm==0 ) if ( OrderSend(Symbol(),OP_BUYSTOP,0.1,h1,3,(h1-30*Point),(h1+20*Point),"__",555,0,Red )!=-1) bu=1;
if (se==0 && tm==0) if (OrderSend(Symbol(),OP_SELLSTOP,0.1,l1,3,(l1+30*Point),(l1-20*Point),"__",444,0,Green)!=-1) se=1;
return(0);
}
In the tester no order was opened

Here is what appears in the log

2010.01.06 15:36:00 There were 1 passes done during optimization, 1 results have been discarded as insignificant
2010.01.06 15:36:00 DayBar1: optimization stopped
2010.01.06 15:35:25 DayBar1: optimization started
201001.01.06 15:35:25 TestGenerator: unmatched data error (volume limit 4581 at 2010.01.06 00:00 exceeded)
2010.01.06 15:35:25 TestGenerator: unmatched data error (volume limit 4581 at 2010.01.06 00:00 exceeded)
2010.01.06 15:35:25 TestGenerator: unmatched data error (volume limit 4581 at 2010.01.06 00:00 exceeded)
2010.01.06 15:35:25 TestGenerator: unmatched data error (volume limit 4581 at 2010.01.06 00:00 exceeded)
2010.01.06 15:35:25 TestGenerator: unmatched data error (volume limit 4581 at 2010.01.01.06 00:00 exceeded)
2010.01.06 15:34:33 TestGenerator: unmatched data error (high value 1.3816 at 2007.08.09:00 and price 1.3817 mismatched)
2010.01.06 15:34:33 TestGenerator: unmatched data error (low value 1.3684 at 2007.08.03 10:00 and price 1.3683 mismatched)
2010.01.06 15:33:49 TestGenerator: unmatched data error (low value 1.1902 at 2004.04.27 12:00 and price 1.1858 mismatched)
2010.01.06 15:33:49 TestGenerator: unmatched data error (low value 1.1902 at 2004.04.27 08:00 and price 1.1836 mismatched)
2010.01.06 15:33:49 TestGenerator: unmatched data error (low value 1.1902 at 2004.04.27 04:00 and price 1.1832 mismatched)
2010.01.06 15:33:49 TestGenerator: unmatched data error (low value 1.1902 at 2004.04.27 00:00 and price 1.1849 mismatched)
2010.01.06 15:33:48 TestGenerator: unmatched data error (high value 1.1864 at 2004.04.21 16:00 and price 1.1919 mismatched)
2010.01.06 15:33:48 TestGenerator: unmatched data error (low value 1.1826 at 2004.04.21 12:00 and price 1.1817 mismatched)
2010.01.06 15:33:48 TestGenerator: unmatched data error (low value 1.1826 at 2004.04.21 08:00 and price 1.1813 mismatched)
2010.01.06 15:33:48 TestGenerator: unmatched data error (low value 1.1826 at 2004.04.21 04:00 and price 1.1819 mismatched)
2010.01.06 15:33:48 TestGenerator: unmatched data error (low value 1.1826 at 2004.04.21 00:00 and price 1.1819 mismatched)
2010.01.06 15:33:48 TestGenerator: unmatched data error (high value 1.1864 at 2004.04.21 00:00 and price 1.1873 mismatched)
2010.01.06 15:33:32 TestGenerator: unmatched data error (high value 1.1860 at 2003.06.17 04:00 and price 1.1863 mismatched)
2010.01.06 15:33:32 TestGenerator: unmatched data error (low value 1.1828 at 2003.06.16 20:00 and price 1.1817 mismatched)
2010.01.06 15:33:25 TestGenerator: unmatched data error (high value 1.0490 at 2002.12.31 20:00 and price 1.0507 mismatched)
2010.01.06 15:33:25 TestGenerator: unmatched data error (low value 1.0462 at 2002.12.31 16:00 and price 1.0454 mismatched)
2010.01.06 15:33:25 TestGenerator: unmatched data error (high value 1.0490 at 2002.12.31 16:00 and price 1.0507 mismatched)
2010.01.06 15:33:25 TestGenerator: unmatched data error (low value 1.0462 at 2002.12.31 12:00 and price 1.0454 mismatched)
2010.01.06 15:33:25 TestGenerator: unmatched data error (high value 1.0490 at 2002.12.31 12:00 and price 1.0504 mismatched)
2010.01.06 15:33:25 TestGenerator: unmatched data error (low value 1.0462 at 2002.12.31 08:00 and price 1.0454 mismatched)
2010.01.06 15:33:25 TestGenerator: unmatched data error (high value 1.0490 at 2002.12.31 08:00 and price 1.0500 mismatched)
2010.01.06 15:33:18 TestGenerator: unmatched data error (high value 0.9814 at 2002.08.20 00:00 is not reached from the lowest timeframe, high price 0.9811 mismatches)
2010.01.06 15:33:14 TestGenerator: unmatched data error (high value 1.0139 at 2002.07.22 00:00 is not reached from the lowest timeframe, high price 1.0138 mismatches)
2010.01.06 15:32:47 DayBar1 EURUSD,Daily: loaded successfully

What`s wrong?

 
Nail_Saby >>:

Смотреть - это значит использовать для работы.

Подробнее получается так: Например, на счету есть 5000 у.е., переменную Balance ставим =1000, и советник должен работать так, как будто на счету не 5000, а 1000. сложно ли это сделать? И как...

:)

Sure, it's not difficult... Just replace AccountBalance() in the code with Balance

If the EA uses the balance value, for example, for calculation of lots or stops, then it makes no difference - the balance you use will be calculated with the same values

 
splxgf >>:

Самый лучший инструмент этот тот который знаешь и умеешь пользоваться, если уж так не хватает мощей может сменить проц на i7, под линухом тоже не все так просто, если не шаришь лучше забей.

Together with the processor comes a new memory and motherboard... - Consider it a new computer :)

 
granit77 >>:

Поиск проверял. :))

Changed the search and something came up: https://www.mql5.com/ru/forum/115409/page3

что интересное было

железо:
поцессор I7 разогнал 3.6 - 12 гиг озу 
софт:

CENOS 64 + VMWARE 7 + XP32 + MT4 - скорость работы MT4 выше ! ( при прогоне в режиме тестера )
чем если 
WINDOWS 64 + MT4 ( который все равно 32 )


So, in principle, it is worth considering!