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

 
eugggy:
Hello. Could you please advise how to implement the following idea: for example, there are several variants of criteria for opening a position, say, with Stochastic = 20, 80 and 50, and each variant must correspond to its own variant of closing criteria. Through arrays or something else, I just don't want to resort to them because of a couple of values. I will write the code myself, can you explain the general principles in more details? Thanks in advance.

Further to what granit77 said .

I use many strategies in my EA on different timeframes.

If we do not know what is the difference between the market and the real one we will have to wait for the arrival of the new one.

The system is as follows:

51 = M5 TF, strategy 1, main position,
510 = M5 TF, strategy 1, pending order
511 = M5 TF, strategy 1, share 1
512 = M5 TF, strategy 1, share 2 ... and so on... The only difference between the shares is the market entry criteria.

52 = TF M5, strategy 2, main position
520 = TF M5, strategy 2, pending order
521 = TF M5, strategy 2, share 1 ... etc.

151 = TF M15, strategy 1, main
1510 = TF M15, strategy 1, pending
1511 = TF M15, strategy 1, share 1

152 = TF M15, strategy 2

... And so on in the same vein... I hope the point is clear. Thus, by setting positions opened by different strategies at different TFs I assign unique magics and am able to sort them, add them up, consider them, change them and do a lot of other things using only one magician for a certain group of orders/positions at once. It is also possible to distinguish them within one group by types OP_BUY, OP_SELL, and others...

I think it will not be superfluous for someone... :)

 

TestGenerator: no history data 'EURUSD60'


How can I fix this thing? I downloaded the history both ways, it still writes.

 

First I decided to play the old Expert Advisor in the tester, I have a record of its work for each preset, for example, before with these presets in 2009 there were 180 deals, but now the tester shows 5! Where could 175 trades have gone? No errors in the log, I have downloaded the history both ways. I have tried different timeframes, different versions, different timeframes.

Now there are no errors at all in the log - 0 trades in all EAs, it is the euro pound.

On eurobucks gives in a log such things: 2010.06.26 19:15:45 TestGenerator: unmatched data error (volume limit 1964 at 2009.12.31 18:00 exceeded)

Anyway I don't know what it is, mystical.

 
Please help me with OrderSelect(ticket,SELECT_BY_TICKET) function;

=========

Am I right in saying that:

П.1. The first order opened always has a ticket number of 1.

When we close the first order, and open the second order, its ticket will also be 1.

And when we close that second order, and open the third, it will again have a ticket number of 1.

P.2 If I open, let's say, 5 consecutive orders, their ticket numbers will be 1, 2, 3, 4 and 5, respectively.

=========

Do I understand it correctly?

 
Oper:
Please help me with OrderSelect(ticket,SELECT_BY_TICKET) function;

=========

Am I right in saying that:

П.1. The first order opened always has a ticket number of 1.

When we close the first order, and open the second, its ticket will also be 1.

And when we close this second order and open a third, it will again have a ticket number 1.

P.2 If you open, say, 5 orders one after the other, their ticket numbers will be 1, 2, 3, 4 and 5 respectively.

=========

Do I get it right?

Read the help better
 
Oper:
Do I understand it correctly?
Please answer the question: "What is a ticket?"
 

Помогите,плиз, разобраться с функцией OrderSelect(ticket,SELECT_BY_TICKET);
=========
Прав ли я в том, что:
П.1. Первый открытый ордер всегда имеет номер тикета 1.
Когда мы закрываем первый ордер, и открываем второй, то его тикет тоже будет 1.
А когда закрываем этот второй ордер, и открываем третий, он опять же будет иметь номер тикета 1.
П.2. Если открыть последовательно, допустим,5 ордеров, то номера их тикетов будут, соответственно, 1,2,3,4 и 5.
=========
Я правильно понимаю?

In the tester, the orders get the ticket number sequentially, the first order is opened - it gets ticket number 1, whether it is closed or not, the second order gets ticket number 2, etc.
 
ToLik_SRGV:
The ticket number in the tester is obtained sequentially, the first order is opened - it gets ticket number 1, whether it is closed or not, the second order gets ticket number 2, etc.

He is not asking specifically about the tester. He is interested in the very concept of a ticket and the logic of assigning that thing to an order.
 
drknn:

He's not asking specifically about the ticket. He is interested in the concept of the ticket itself and the logic of assigning this thing to the order.

I guess I didn't quite understand.
In the tester, as I wrote, in order, but in real life, the ticket number is assigned to the order by the DC server.

From your example:

OrderSelect(ticket,SELECT_BY_TICKET);

In order to search for an order in this way, you need to save this very ticket beforehand, it is returned by OrderSend(...) function.
 

Evening riddles from metha:

I imported quotes in the quote archive, it says in 1 minute: Database: 0 / 3665972, the window is empty - what can this mean ?

When I open standalone EURUSD,M1 chart- it shows large letters: "Pending Update" - what can it mean ?

Running test - TestGenerator: no history data 'EURUSD1'

Reason: