[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 11

 

Greetings! In the tester there is a mode "By opening prices(quick method on formed bars...). Is it possible to manually pass through the bars?

Or is there a program needed?

 

Hi all!

So, my first practical work (literally the first in my life in MQL)

I attach the Expert Advisor (or rather a partial EA).

The aim is to check the following hypothesis: "if the high of the candle is broken, the price will go further than it will reverse and break the low".

The result

Bidstop = previous candlestick's high + delta + spread

Sl = previous candlestick's low + delta

Tp = sl*(user multiplier)

It is vice versa for sell.

Tf is universal.

There is a problem with order deletion. The simplest expression does not work so far. I do not understand what the issue is.

In December I started digging what is needed for this EA. At first I thought it would be enough just to determine high and low and respectively open at high or low + delta and close there. I wrote it, it worked in the tester by opening prices, I put it on the demo and it started to run one order every two or three seconds! I got distracted just for a few seconds and he opened me 10 or so buystops and the same number of sellstops! I haven't laughed like that in a long time, I was under the table! I'd written a virus that can drain a deposit in a matter of minutes! I read it and realized that I lacked a block to process a new bar. I found it somewhere on the Internet. Then I saw that it was much easier to use in MT4 in MA, it was generally processed by one line, but I don't care about it. I have processed the new bar and cured it from the "virus" :-)). Then I fixed multiplier for tp. Then I have found how people protect my order if it is within the stop level. I attached this thing too. I do not know if it works. I`ve been trying to find the mechanism of deleting opposite order, if TP is triggered and not deleting it, if SL is triggered. I added an expression, but it doesn't seem to work. It deletes an order, but it deletes it after God knows how many bars I set! But I have not thought about it. I was interested in how I could add MA MA to my EA. Now if the price is above the MA, I have created a bypass and if it is below the MA, I have created a sellstop and it does not lose even though I have already lost profit sometimes (on the daily chart)!

Please comment on what is wrong and what is right. (In the sense of my programming training, not in the sense of trading strategies :-))). Thanks in advance for the comments and advice.

And a question. How to make opposite order be deleted only when TP triggering? And it should open as many positions as there will be initial conditions for opening (i.e. how many candlesticks in a row will be broken, and how many times should I fill them, as it actually happens at the moment). I know there are quite simple scripts to delete either all orders, or the last one, or by ticket number, but how do I identify the order which was opposite to a profitable one and leave the other ones, when I don't know beforehand how many positions have been opened and how many orders have been already opened before and after the profitable one?

Files:
bbo7_1.zip  2 kb
 

Hello, can you advise or even help to make up an algorithm one.

The idea is for the EA to open/close orders at regular intervals, e.g. 9 hours, over, say, 5 days. We do not consider weekends; we start a new cycle in a new week.

Since there is no integer 9 hours in 5 days, at the end of this 5-day period we will have 3 hours left and we would like to consider them in opening and closing of orders as well.

How should I deal with a situation, if I will have a period not 5 days and say 8 days, there will be a weekend, how should I deal with it in a cycle, i.e. from the beginning of a year.

In general, please help, I am something with this time is quite confused + still have to translate in greenwich.

Thank you.

 
Galion:

Greetings! In the tester there is a mode "By opening prices (quick method on formed bars...). Is it possible to manually pass through the bars?

Or is there a program needed?

The tester is intended for testing Expert Advisors. What does it mean to pass through the bars manually? You can review trades in visual mode. There are developments that allow you to trade manually in test mode.
 
splxgf:
The tester is for testing EAs, what does it mean to go through the bars manually? You can review trades in visual mode. There are developments that allow you to trade manually in testing mode.

If you do not have difficulty, give us a link to the development or in a private message. q: Thank you.
 
Galion:

If not difficult, give me a link to the developments or in person. Thanks.

https://www.mql5.com/ru/articles/1425 - Visualisation testing, manual trading.

 
Roman.:

https://www.mql5.com/ru/articles/1425 - Test visualisation, manual trading.

And if in the tester the Expert Advisor is trading in visual mode, by pausing the run with the Pause button, you can stepwise move by pressing F12.
 

Can you advise me, I use strategy tester, it takes too much disk space, the whole C: is already full, history loading took 15 gigs, how can I clean it up?

Every time I run it on different timeframes, it takes 100mb.

 

Greetings.

Help me write an EA.

Regards.

 
merkulov.artem:

Can you advise me, I use strategy tester, it takes too much space on the disk, the whole C: is already full, history loading took 15 gigs, how to clean it?

Every time I run it through different timeframes it takes about 100 mb.

Who puts programs on the C drive?!

I have to divide my physical drive into several logical drives:

1. For the system. For the system only!!!

2. For the swap file.

3. For programmes.

4. For information. This is where the My Documents folder is located. It must be switched here.

5. For Forex (I have it like this). The history from all MT4 folders lies here. Redirected by symbolic links.

6. Disk for system backup. After a backup it is necessary to copy its content to any other disk.

==========

Thus:

1. You can have a small backup of the system and software disk, which, if necessary, you can restore in 10 minutes, without reinstalling any software or losing any information.

2. The system disk fragments by less than 10% in a year. Defragment less frequently.

3. some protection against viruses. Everything will stand in nonstandard places.

4. Speed of work is somewhat higher. Due to compact system location and absence of system disk and swap file fragmentation.

Reason: