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

 
alsu >>:

в реале на быстром рынке первый тик не обязательно 1

Just loop it until the order is sent and that's it

 
sanyooooook >>:

дык зациклить пока ордер не отправится и делов-то

If a tick has arrived and volume = 2, how do you know if the order has already been sent or not? Still have to remember if the bar has already been processed, i.e. do what I have in the example.

 
alsu >>:

если пришел тик и объем = 2, откуда знаешь, отправил уже ордер или нет? Все равно придется запоминать, обработан ли уже данный бар, т.е. делать то, что у меня в примере.

Give me an example of a scheme that didn't work and I'll believe you

 
sanyooooook >>:

покажите пример когда данная схема не сработала и я Вам поверю

Example: At the moment of the first tick of a new bar the processing of the last tick of the previous bar is not finished yet. As a result, on the next tick that comes to the start we are guaranteed to get Volume>1

 
alsu >>:

Пример: в момент прихода первого тика нового бара еще не закончена обработка последнего тика предыдущего. В результате на следующем тике, который попадет в start гарантированно получаем Volume>1

Some are processed, others are processed quickly enough

 

Hello


I wrote a small, simple EA and there is one problem. When tested on the history it opens deals perfectly, but when tested on a demo account it did not open a single deal (although under the terms it should have opened). In the journal there are a lot of messages of this type Old tick USDJPY30 89.54000/89.59000. If you can explain the reason for this, thank you very much.

 
Please advise how to implement this: if a pending order closed at profit 2 times in a row, i.e. if the last two orders closed at profit, then the next order should be opened with fewer lots. How to get info about closing the last orders?
 
Slawa >>:

Здравствуйте


Написал маленький, простой советник и есть одна проблема. При тестировании на истории он отлично открывает сделки, а при тестировании на демо счете не открыл ни одну сделку (хотя по условиях должен был открыть). В журнале выбивает куча сообщений вот такого типа Old tick USDJPY30 89.54000/89.59000. Если сможете объяснить причину этого то огромное Вам спасибо.

bring your order opening function here.

 
just-me >>:
Подскажите, как реализовать: если отложеный ордер закрылся с профитом 2 раза подряд, т.е. если два последних ордера зкрылись с профитом, то нужно что б следующий ордер открывался с меньшим количеством лотов. Как получить инфо про закрытие последних ордеров?
Basically, you can search for orders in the history and sort them, then find out the last two closes. But you have to go through all orders in the history twice.

Use OrderHistoryTotal(), MODE_HISTORY, OrderCloseTime()>0, OrderProfit()

Another option - so as not to scan the history twice - is to remember the tickers of orders which have opened, and then determine their profit.

 
just-me >>:
Подскажите, как реализовать: если отложеный ордер закрылся с профитом 2 раза подряд, т.е. если два последних ордера зкрылись с профитом, то нужно что б следующий ордер открывался с меньшим количеством лотов. Как получить инфо про закрытие последних ордеров?

How is the order closed? Stop Loss or OrderClose()?

Reason: