Errors, bugs, questions - page 817

 
Rosh:

It's probably not possible. Isn't the online version suitable?

This is what I found on the internet on the subject - http://forum.ru-board.com/topic.cgi?forum=62&topic=20907

UPDate More http://forum.ixbt.com/topic.cgi?id=23:39211

Ok, I just sometimes like to try to program on a laptop without access to the network. The question is not critical, it was just a wish :)
 
Renat:
And how outside the loop, if the code is like this?
I meant to count the impact of GetPointer separately. Maybe that's what it takes half the time to do.
 
This is me again with a question. If it is necessary that in the input parameters of the EA a citizen cannot put a negative number, I use type uint, but it is possible to put 0 (zero). I want to make it possible to put a number starting from 1. Is it possible to implement this? Or in general, starting from any arbitrary number.
 
paladin800:
This is me again with a question. If I want that in input parameters of EA I cannot put negative number, I use type uint, but it is possible to put 0 (zero). I want to do so, that it is possible to put a number starting from 1. Is it possible to implement this? Or in general, starting from any arbitrary number.
//| positive integer enum: 1..1000 (without 0)                       |
//+------------------------------------------------------------------+
enum ePInt   //  positive integer enum: 1..1000 (without 0)
  {
   p1=1,// 1
   p2 =    2,     // 2
   p3 =    3,     // 3
   p4 =    4,     // 4
   p5 =    5,     // 5
   p6 =    6,     // 6
   p7 =    7,     // 7
   p8 =    8,     // 8
   p9 =    9,     // 9
   p10 =    10,     // 10
   p11 =    11,     // 11

from here: https://www.mql5.com/ru/code/viewcode/448/10572/eintnumbers.mqh

I thought you were going to....

paladin800:
That's the kind of thing! Thanks for the link, I'll figure it out on my own.

// "I've got all the moves written down!"

:-))))

 
paladin800:
Again I'm asking a question. If it is necessary that in input parameters of the EA the citizen cannot put a negative number, I use type uint, but it is possible to put 0 (zero). I want to do so, that it is possible to put a number starting from 1. Is it possible to implement this? Or in general, starting from any arbitrary number.

It is possible to pass the user and check, if zero then use one, this is for cases when proskie parameter is used.

Or just always add the smallest number to the parameter, of course, it is crooked, but writing enum listing all multimillion values is even more crooked.

 
Urain:

You can stand the user up and put a check, if zero then use one, this is for cases where a proxy parameter is used.

Or just always add the smallest number to the parameter, of course it is crooked, but writing enum listing all multimillion values is even more crooked.

I protest! It's a provocation! :)

--

It's about the capabilities and limitations of the language, not about optimization and common sense in choosing an implementation.

 
MetaDriver:

from here: https://www.mql5.com/ru/code/viewcode/448/10572/eintnumbers.mqh

I thought you were going to.... // "I've got all the moves written down!" ...

:-))))
MetaDriver:

from here: https://www.mql5.com/ru/code/viewcode/448/10572/eintnumbers.mqh

I thought you were going to.... // "I've got all the moves written down!" ...

:-))))
Well yes, yesterday I mastered enum and with this type I will most likely implement my idea. I was just thinking more globally, e.g. I have to enter from 1 to as many as I can.
 

Does anyone use OnTradeTransaction, to determine if an order has been placed?

In the strategy tester, when one trade and 2 orders are sent within 3 ticks, TRADE_TRANSACTION_REQUEST only comes 1, on the last order sent.

QR 0 Trade 05:42:35 2011.10.12 10:00:32 instant buy 0.07 EURUSD at 1.3667 (1.3665 / 1.3667 / 1.3665)
RS 0 Trades 05:42:35 2011.10.12 10:00:32 deal #2 buy 0.07 EURUSD at 1.3667 done (based on order #2)
EN 0 Trade 05:42:35 2011.10.12 10:00:32 deal performed [#2 buy 0.07 EURUSD at 1.3667]
RJ 0 Trade 05:42:35 2011.10.12 10:00:32 order performed buy 0.07 at 1.3667 [#2 buy 0.07 EURUSD at 1.3667]
PH 0 Trade 05:42:35 2011.10.12 10:00:32 sell stop 0.07 EURUSD at 1.3167 (1.3664 / 1.3666 / 1.3664)
MJ 0 Trade 05:42:35 2011.10.12 10:00:32 sell limit 0.07 EURUSD at 1.4167 (1.3665 / 1.3667 / 1.3665)
OP 0 prp4 (EURUSD,M30) 05:42:35 2011.10.12 10:00:32 trans.type==6 OnTradeTransaction
KO 0 prp4 (EURUSD,M30) 05:42:35 2011.10.12 10:00:32 ------------ OnTrade
MI 0 prp4 (EURUSD,M30) 05:42:35 2011.10.12 10:00:32 trans.type==2 OnTradeTransaction
IF 0 prp4 (EURUSD,M30) 05:42:35 2011.10.12 10:00:32 ------------ OnTrade
HQ 0 prp4 (EURUSD,M30) 05:42:35 2011.10.12 10:00:32 trans.type==3 OnTradeTransaction
GM 0 prp4 (EURUSD,M30) 05:42:35 2011.10.12 10:00:32 ------------ OnTrade
GF 0 prp4 (EURUSD,M30) 05:42:35 2011.10.12 10:00:32 trans.type==0 OnTradeTransaction
ME 0 prp4 (EURUSD,M30) 05:42:35 2011.10.12 10:00:32 trans.type==0 OnTradeTransaction
KR 0 prp4 (EURUSD,M30) 05:42:35 2011.10.12 10:00:32 ------------ OnTrade
KJ 0 prp4 (EURUSD,M30) 05:42:35 2011.10.12 10:00:32 trans.type==0 OnTradeTransaction
QH 0 prp4 (EURUSD,M30) 05:42:35 2011.10.12 10:00:32 trans.type==0 OnTradeTransaction
OG 0 prp4 (EURUSD,M30) 05:42:35 2011.10.12 10:00:32 ------------ OnTrade
PR 0 prp4 (EURUSD,M30) 05:42:35 2011.10.12 10:00:32 trans.type==10 OnTradeTransaction
PJ 0 prp4 (EURUSD,M30) 05:42:35 2011.10.12 10:00:32 EnumToString(type)=TRADE_TRANSACTION_REQUEST
PG 0 prp4 (EURUSD,M30) 05:42:35 2011.10.12 10:00:32 ------------trans===
TRADE_TRANSACTION_REQUEST
Symbol:
Deal ticket: 0
Deal type: DEAL_TYPE_BUY
Order ticket: 0
Order type: ORDER_TYPE_BUY
Order state: ORDER_STATE_STARTED
Order time type: ORDER_TIME_GTC
Order expiration: 1970.01.01 00:00
Price: 0
Price trigger: 0
Stop Loss: 0
Take Profit: 0
Volume: 0

FG 0 prp4 (EURUSD,M30) 05:42:35 2011.10.12 10:00:32 ------------request1==
TRADE_ACTION_PENDING
Symbol: EURUSD
Magic Number: 1000
Order ticket: 0
Order type: ORDER_TYPE_SELL_LIMIT
Order filling: ORDER_FILLING_RETURN
Order time type: ORDER_TIME_GTC
Order expiration: 1970.01.01 00:00
Price: 1.4167
Deviation points: 0
Stop Loss: 0
Take Profit: 0
Stop Limit: 0
Volume: 0.07
Comment: tp по BUY

MJ 0 prp4 (EURUSD,M30) 05:42:35 2011.10.12 10:00:32 ------------result1==
Retcode 10009
Request ID: 2
Order ticket: 4
Deal ticket: 0
Volume: 0.07
Price: 0
Ask: 1.3667
Bid: 1.3665
Comment:

 

What about these lines?

OP 0 prp4 (EURUSD,M30) 05:42:35 2011.10.12 10:00:32 trans.type==6 OnTradeTransaction
MI 0 prp4 (EURUSD,M30) 05:42:35 2011.10.12 10:00:32 trans.type==2 OnTradeTransaction
HQ 0 prp4 (EURUSD,M30) 05:42:35 2011.10.12 10:00:32 trans.type==3 OnTradeTransaction

not deciphered?

 
sergeev:

What about these lines?

have you decoded them?

They refer to the first deal, but there should also be TRADE_TRANSACTION_REQUEST answers, and it drops them for some reason. You can only get the basic information what order has been set from here. And there is a question about reliability of this method if at any moment the change of orders may not come.