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

 
Magiyanka >>:
не получается, не закрывает по времени и всё

Something has gone wrong, I check what I write.

If anything write in private, I can correct your code (no trading strategy, newbies usually worry about it =))).

 

//+------------------------------------------------------------------+
PricelChanneljSDVIG NOT TO,,,,,,,,,,,,,,,,,,,.

I'D LIKE .... SOMETHING LIKE ALIGATOR
//+------------------------------------------------------------------+

 
Lim1 >>:
Спасибо вам costy за скрипт. Вроде работает. Только выдает ошибку 4109 - торговля не разрешена. Неужели на демо-счете нельзя тестировать скрипты и эксперты?
Или дело в другом...

Is the EA allowed to trade in the settings? this is done in the settings and when placed on the chart.

 
Lim1 >>:
Спасибо вам costy за скрипт. Вроде работает. Только выдает ошибку 4109 - торговля не разрешена. Неужели на демо-счете нельзя тестировать скрипты и эксперты?
Или дело в другом...

Service -> Settings -> EA -> Allow EA to trade

 
Djonon >>:

//+------------------------------------------------------------------+
PricelChanneljSDVIG НЕ СОВСЕМ ТО,,,,,,,,,,,,,,,,,,,.

МНЕ БЫ ....ЧТО-ТО ВРОДЕ ALIGATOR
//+------------------------------------------------------------------+

You mean for each line separately?

And displayed in the future?

Files:
 
costy_ писал(а) >>

You mean for each line separately?

And displayed in the future?


KEYWAYS,,,,,,,,,,,,, what-needed-...................THANK YOU.

 
Hello. The question is as follows. How to write: if there are two profitable trades in a row. There is no problem with one profitable trade, the code is approximately as follows, but what to do if it is necessary exactly 2? Thank you all in advance.
for (int i = 0; i < total; i++)
      {
       OrderSelect(i, SELECT_BY_POS, MODE_HISTORY);
        if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic)
          {
            if (OrderProfit() > 0)
             {
               result = Lots;
             } 
            else 
             {
               result = OrderLots() * koeff;
             }
          }
      }
 
Good afternoon

I trade simultaneously on different accounts in different brokerage companies, all trades are identical, I have created a program in Delphi. When I press one button in Delphi program a text file is created and a number 1 is added to it. Each terminal runs an EA that checks the text file at every tick and performs actions if the file contains 1.


Suppose I press the button at 15:55 and number 1 is written to the file. Sometimes I have a new tick only in 20-40 seconds and file will be checked for 1 only in 20-40 seconds. If price is moving very fast then order execution may be delayed for some more time and price may go an extra 5-10 pips. How to make the EA check the file and perform actions not only on new ticks? The terminal should not overload it with cycles or anything else.
 
Vini >>:
Добрый день!

Торгую одновременно на разных счетах в разных ДЦ, везде идентичные сделки, что бы не делать лишних движений создал программу на Делфи, при нажатии одной кнопки в программе на Делфи формируеться текстовый файл и добавляеться в него например цифра 1. На каждом терминале запущен советник, который каждый тик проверяет текстовый файл, и если там стоит 1 то выполняються действия.


Предположим что в 15:55 я нажимаю кнопку в програмке и в файл записываеться цифра 1. До этого за несколько секунд был новый тик и была проверка, так как в файле небыло еденицы то действите не выполнилось, бывает такаие моменты что новый тик может быть только через 20-40 секунд и файл будет проверяться на наличие еденициы только через 20-40 секунд, а если цена резко начнет двигаться то выполнение ордера может занятнуться еще на какое то время и цена может уйти на 5-10 пунктов лишних. Как сделать так что бы советник не только на новых тиках проверял файл и выполнял действия? И приэтом что бы терминал сильно не подгружал циклами или чем либо еще.

(It's quicker to press a button in the programme))

 
so no one knows that the next quote will only be 40 seconds later:)
Is there any other option than files?
how to open a buy order in delphi?
Reason: