[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 494

 
Vini писал(а) >>
so no one knows that the next quotes will only be in 40 seconds :)
is there any other option beside the files?
how to open a buy order in delphi?


For example, you can use a looped Expert Advisor that checks the file once per second

 
Vinin >>:


На прием ставится зацикленный эксперт, который проверяет файл с периодичностью раз в секунду например


On the technical side, how much does the CPU load increase when a continuous loop is used?
if for example 5-10 terminals are working simultaneously with such cycles?
 
Necron >>:
Здравствуйте. Вопрос следующий. Как написать: если две прибыльные сделки подряд. С одной прибыльной проблем нет, код приблизительно следующий, а вот как быть если надо именно 2? Заранее всем благодарен.

Put more precise questions "if two profitable trades in a row" the last two, or review as you go through the history of trades?

For the last two trades.

extern int кол_во_сделОк=2;
//жжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжж
int кол_во_сделОк_c_prof=0;

for (int i = 0; i < кол_во_сделОк; i++){
   OrderSelect(i, SELECT_BY_POS, MODE_HISTORY);
   if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic)
   if (OrderProfit() > 0)
   кол_во_сделОк_c_prof++;
}
if(кол_во_сделОк_c_prof==кол_во_сделОк)
трали вали...
 
costy_ >>:

Ставьте более точные вопросы "если две прибыльные сделки подряд" последние две, или просматривать по ходу истории сделок?

Для последних двух сделок.

The last two trades closed. I think your code will work. Thank you.

 
Vini >>:


а с технической стороны сколько примерно увеличеваеться загрузка процесора когда используеться постоянный цикл?
если например будет 5-10 терминалов одновременно работать с такими циклами?

Bet on eurodollar there are enough ticks there, a separate EA controlling start(); other EAs,

Or create "Perpetual loop" function with start() function with multiplicity of Sleep(1000*terminal_number); at the beginning of cycle;

sequence for technical purposes, try also two three terminals simultaneously.

1000 milliseconds fit to the system possibilities.

 
All confused - no way to implement this block:

1. Opening condition

2. Position's opening price (x)

3. Condition: If the current value is higher than the opening price of the position by
40 points (for example), an order to close this position at x + 1 point should open.
When the order triggers, there should be a return to point 1, followed by a run on points 2, 3, etc.

Specifically the third part of it.

Please explain how to do it correctly. Thanks in advance!

 
Lim1 >>:
Весь запутался - никак не получается реализовать вот такой вот блок:
Объясните пожалуйста как это правильно сделать. Заранее спасибо!

//жжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжж
//настройки
 double     Lots              =  1;
 int        Slippage          =  5;
 int        SL          =  40;
 int        TP          =  0;
 int        MagicNumber          =  01458700;
 int        больше_цены_открытия =  40;
//жжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжж
//Условия трали вали...
 if(bye?)
   OrderSend(Symbol(), OP_BUY,  Lots,  NormalizeDouble(Ask,Digits), Slippage,  SL, TP, NULL, MagicNumber, 0, Blue);
 if(sell?)     
   OrderSend(Symbol(), OP_SELL, Lots,  NormalizeDouble(Bid,Digits), Slippage,  SL, TP, NULL, MagicNumber, 0, Red);
//жжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжж
//листаем открытые ордера и при профите больше или равно "больше_цены_открытия" в валюте депозита
   for(int i = 0; i < OrdersTotal(); i++){
      if(OrderSelect(i, SELECT_BY_POS,MODE_TRADES ) == false) continue;
      if(OrderSymbol() != Symbol()) continue;
      if(OrderMagicNumber() != MagicNumber) continue;
      if(OrderProfit( ) >= больше_цены_открытия){
        if(OrderType() == OP_SELL)
        OrderClose(OrderTicket(), OrderLots(), NormalizeDouble(Ask,Digits), Slippage, Red);
        if(OrderType() == OP_BUY)
        OrderClose(OrderTicket(), OrderLots(), NormalizeDouble(Bid,Digits), Slippage, Blue);
      }
   }
//жжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжж

//жжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжж
//настройки
 double     Lots              =  1;
 int        Slippage          =  5;
 int        SL          =  40;
 int        TP          =  0;
 int        MagicNumber          =  01458700;
 int        больше_цены_открытия =  40;
//жжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжж
//Условия трали вали...
 if(bye?)
   OrderSend(Symbol(), OP_BUY,  Lots,  NormalizeDouble(Ask,Digits), Slippage,  SL, TP, NULL, MagicNumber, 0, Blue);
 if(sell?)     
   OrderSend(Symbol(), OP_SELL, Lots,  NormalizeDouble(Bid,Digits), Slippage,  SL, TP, NULL, MagicNumber, 0, Red);
//жжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжж
//листаем открытые ордера и 
   for(int i = 0; i < OrdersTotal(); i++){
      if(OrderSelect(i, SELECT_BY_POS,MODE_TRADES ) == false) continue;
      if(OrderSymbol() != Symbol()) continue;
      if(OrderMagicNumber() != MagicNumber) continue;
      if(OrderType() == OP_SELL)
       if(OrderOpenPrice( )-Close[0]  >= больше_цены_открытия*Point)
        OrderClose(OrderTicket(), OrderLots(), NormalizeDouble(Ask,Digits), Slippage, Red);
      if(OrderType() == OP_BUY)
       if(Close[0]-OrderOpenPrice( ) >= больше_цены_открытия*Point)
        OrderClose(OrderTicket(), OrderLots(), NormalizeDouble(Bid,Digits), Slippage, Blue);
      
   }
//жжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжжж

On the profit side (Option 1), it is easier.

 
Good day to all.
Can you guys tell me if the chart name (e.g. EURUSD H1), which is in the upper left corner when the chart window is minimized, can be moved to the right corner?
Why? - I don't see which ones when a lot of charts are open, don't try to open them in cascade.
 
You can, you have to identify the handle of that window and send it a message moving it to your coordinates.But it's not worth the gamble.
 
Does anyone have a script or indicator that shows the trading history (profit and loss) for a specified period of time for a set currency on a chart?
Reason: