Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 266

 

Here you go, Artem:

Don't spit up, and if you do, don't forget to step back :)

(popular teaching wisdom)

 
Do you guys have a version of the martingale EA that opens a position in either direction with a stop loss and take profit of 20 pips, if the position played, then opens in the same direction, if not - it opens in the opposite direction with the same stop loss and take profit, but the position has doubled, and so opens in different directions every time until the winner. If you know such a person, give me a link please.
 
There is one on the Alpari forum called Cheburashka.
 
Leo59:


Actually, I started to learn programming using the code of Vladislav Goshkov's indicator as an example. I drew that indicator with De-Mark's support and resistance rays. There were such lines there:
ObjectMove(buff_str, 1, UpBT[0], UpP[0]);
ObjectMove(buff_str, 0, UpBT[1], UpP[1]);
Got it. Looked at it in the tester and saw how it worked. It draws rays by fractals but it looks into the past, not into the future... )))). I started to ask questions and it worked out! Respect to Vladislav!!!!
I came across the Kovalev textbook later. I wish I could come across more answers to questions in this format.




Is it the one that is still on the spider? I think I drew it correctly in the tester too.
 
VladislavVG:

Is that the one you posted on the spider? I think I drew it correctly in the tester too.
That was in 2009, Vladislav. I probably had bad luck and downloaded a version where the indexes in the arrays were mixed up and swapped places. But these are details, little things in life. It happens to everybody from time to time. The most important thing is that the idea was actually implemented! Beautifully realized. THANK YOU !!!!
 
In Kovalev's tutorial, in the section "Custom Terminal() function" I read:
"We should separately note that the analysis of closed market and deleted pending orders (execution of OrderSelect() function with the MODE_HISTORY parameter) is not performed.
The information on the closed and deleted orders is not usually used in expert trades. Information on closed and pending orders represents the history of the trading account.
This information can be used, for example, to create charts showing the dynamics of investments and actual trading results,
but it cannot be helpful in making new trading decisions.
Technically, the accounting of this part of orders can be done in a similar way, however, this is a separate task, which has nothing to do with trading."
Alas((
 
Leo59:
In the Kovalev's tutorial, in the "Custom Terminal() function" I can read:
"We should separately note that analysis of closed market and deleted pending orders (execution of function OrderSelect() with parameter MODE_HISTORY) is not performed.
The information on the closed and deleted orders is not usually used in expert trades. Information on closed and pending orders represents the history of the trading account.
This information can be used, for example, to create charts showing the dynamics of investments and actual trading results,
but it cannot be helpful in making new trading decisions.
Technically the accounting of this part of the orders can be done in a similar way, however, this is a separate task which has nothing to do with trading."
Alas(


I guess I was too lazy to write a chapter on working with history, so I came up with a reason. Working with the order history is quite a complicated task, it has its own quirks and difficulties. If you do it in a dumb way, you can make a very slow expert.

 
Integer:


I guess I was too lazy to write a chapter on working with history, so I came up with a reason. Working with the order history is quite a complicated task, it has its own quirks and difficulties. If you do it in a dumb way, you can make a very slow Expert Advisor.


Here, Dimitri, for me, speed is not the main thing.

These data are needed for logging in Excel, for further processing of statistics. So, if it slows down in the tester 2-3 times more, still, for the final processing time I will win by an order of magnitude. And this is measured in days. Such a story comes out((.
Therefore, there is no time to "catch fleas". The more so that this version of Expert Advisor is needed only for testing. The light version works on accounts:))).
Maybe there is an example to look at?

 
Leo59:
Maybe there is some example to see?


Everything is the same as with market ones, but instead of OrderSTotal(), OrdersHistoryTotal() is used, and OrderSelect() is OrderSelect(i,SELECT_BY_POS, MODE_HISTORY). If you don't care about the speed, of course... and if you have to provide high speed, you'll have to use all your ingenuity.

The peculiarity is that the orders are sorted by ticket, and the tickets are not always in ascending order. By ticket the history is sorted out on startup, and in the process the orders to be closed are added to the end of the array. The pending orders after their deletion get to the history, but are not saved in it.

 
There's one thing I don't understand. Why do you have to get involved in history?
The Expert Advisor works, the order is closed and the variable has a new value. Why didn't I immediately put this value into the array of these values?

I guess with my brains, I'm just a sausage trader((

Also, on the subject of speed and wit Dimitri.
If you compare the implementation of the same in your performance and in mine, it is the same as comparing the speed of Formula 1 and Zaporozhets, respectively.
So, everything in this world is relative. And this is not flattery to you, but a bitter fact of my incompetence.

I'm going to bed(((

Reason: