You need to describe the algorithm procedure for the Counter-Order Strategy (something like a Martingale Strategy, but not quite). - page 8

 
Remark.
The mathematical model of trading is not natural for stock markets.
All because what makes it different from all the analogies of all sorts of games, from which all these ideas have come, is that there is no linear position decoupling in the markets, no decoupling at all.
Imagine you open a firm, hire a really cool accountant, and there's no income.
It's a "market", it doesn't matter what prices you put on your goods, it matters how you sell them, when and to whom?
The analogy should somehow suggest it.
How, when and to whom you sell, it does not matter at what prices, it does not matter what we expect: the physics of trade.
 
profit.support:
Remark.
The mathematical model of trading is not natural for stock markets.
All because what makes it different from all the analogies of all sorts of games, from which all these ideas have come, is that there is no linear position decoupling in markets, there is no decoupling at all.
Imagine you open a firm, hire a really cool accountant, and there's no income.
It's a "market", it doesn't matter what prices you put on your goods, it matters how you sell them, when and to whom?
The analogy should somehow suggest it.
How, when and to whom to sell, it doesn't matter what prices we expect: the physics of trade.

I absolutely agree. I think good EAs are the ones that solve problems as they arise)))

This EA is made up of a set of functions and scripts based on video tutorials from TradeLikeAPro site))))

I would not have thought of it myself - there are too many different parameter functions and programming rules. I'm trying to translate MQL5 code in general, I'm m afraid I have some abstract examples and I am not following the official tutorials.

 

Last minor update:

Fixed non-critical bug in Emergensy Closure function

Added option to check the deposit, leverage and Lots values for compliance with trading requirements

Implemented auto-selection of lots for an emergency order opening during drawdowns

Slight revision of the user manual in this regard.


Despite everything, the Expert Advisor has shown a lower return of 60 to 210 p.a. according to tests on the history of quotes from March to June 2017.

Be careful when using the advisor in real trading - read the user manual.

There may be changes in the code as part of optimization or on various small things, in this case there will be additional information.

If you find an error, please let me know.


10/07/2017 Fixed an error in the advisor's profit fixing message.

EA files on Yandex Disk.

https://yadi.sk/d/MyYzRSja3JQVWK

BLACKJACK&HOOKERS.rar
BLACKJACK&HOOKERS.rar
  • yadi.sk
Посмотреть и скачать с Яндекс.Диска
 

24.01.2018Fixed non-critical error in sending an email.

Please update EA for those who downloaded it.

If anyone is testing it on a demo account, please advise if any other errors will pop up.

 
geratdc:

24.01.2018Fixed non-critical error in sending an email.

Please update EA for those who downloaded it.

If anyone is testing on a demo account, please post, maybe some other errors will pop up.

I want to know if you got banned. I looked through your profile and there's nothing. Where do I find out?
Found out I can read your strategy. If you click on it, it opens and Ctr+ can be zoomed in.

Consider the case when price describes a sinusoid with an amplitude of +-50 p i.e. channel 100 p.
The price goes up and in the middle of the channel your Expert Advisor orders a BUY. If it reaches +60 points, it closes in the plus position. But the price went up 50 points and then went down.

Here we need to remind you what a Breakeven is. When the order reaches + we put a stop loss on the buy line.
Then, when the price moves negatively, the order will close at 0 without making a loss. In this case, your Buy would have closed at 0, while you have it going to -.

When -30 p, your algorithm opens a Sell order. The price has gone further down by 20 p (from the start -50 p in total, already the bottom of the channel) and went up.
When the price comes to the starting point, the first position is 0 p and the second position is 30 p. The second sell -30 p, the third Buy is opened. The price is the same as the first one.
Then you calculate the sum of three positions. But the first and the second ideally give -30 points. So it is easier to count the third one as 30 points.
Now the price goes to the upper border of the channel by 50 points. The total value is 50-30 = +20 points. Or the first one +50, the second one +50, the third one -80 and the total +20 points.
But if it goes down into the channel, it will be -80. Therefore, earlier your robot will close at -60 points.
You also mentioned something about reserve to close at zero. When the reserve is used, it is not very clear.

And now to improve 1) Breakeven. We opened Buy, the price went upwards and went downwards. We close at 0. And immediately - why wait 30 pips - we open a Sell. We will have 30 points more profit. But the price went down and came back - we close at 0. And again we open Buy. The algorithm has become breakeven.

And now 2) profit of 50%. The price went up. Profit 50 points and the price went down. When the profit is halved on this order and there is only 50% left we close it.
And immediately Sell. And till the bottom of the channel - 75 points. We will get our +60 points.
And since the bottom of the channel - let's wait for the fight. And when the price goes up and passes 20 pips, we will buy. And to the upper 80 pts and we will get +60 pts more.

And now 3) wait If the amplitude of the channel is below 100 pts - wait.

And now 4) the trend is your trend. If the speed of price movement is high - you can see by the slope of all MAs - go with the trend + Breakeven + 50% + wait.

The forum is full of ideas about the level of support - this is the bottom of the channel, and the level of resistance - this is the top of the channel. There are a lot of indicators of these levels.

 
My tester for some reason only opens one order and that's it.
 
NightTrader My tester, for some reason only one order opens and that's it.
Did you make a profit or a loss?
 
NightTrader:
As for me the tester for some reason only opens one order and that's it.

Is it solved? Or is the problem still there? No problems were observed during tests in MT4. I have no information about the demo-tests, so please share if you have any results from the demo-test or from real trading.

 
STARIJ:

I advise to optimise the EA for the time being - reduce it by using parameterised functions. To eliminate the sending of messages on each occasion, to make it 2 times a day. For example, at 11 a.m. and at 5 p.m. The shorter the text of the Expert Advisor is, the easier it is to redo.

I have added and removed some trifles there. For example, I deleted a lot of code about entering depending on MaPeriod.

Pips works poorly on $100 with 0.01 lot - i.e. i set 10 pips (i.e. i specify 1 in settings) TakeProfit and in theory advisor should increase it 10 times like on 5 digits, but advisor closes with 1 pip. I don't know, maybe my MT is not supported anymore (it's glitchy) or this code should be pulled from OnInit to Ontick. But when I look at results, I see that TakeProfit is calculated correctly, i.e., multiplication is going, but first trades were closed with Take without multiplication... And the second problem is that I'm losing 10 pips in 0.01 lot because the commission is charged 0.05, or 0.01 earned, 0.05 paid and the resulting loss is $0.04, so I have to put not less than 50 pips to stop the expert at zero. Is it so? Pips Trading is OK if I use higher lot size. However, I can hardly use 100$ deposit even with 1:500 leverage - the Expert Advisor falters because of drawdowns. That is all I have observed so far.


Let there be messages, especially this one: "The Expert Advisor has taken profit andclosed positions" )))) - It is a mini holiday for every trader. And to warn about the opening of an emergency lot - then let him run to the PC, monitor the thriller and make a decision. The only thing they have no messages about is opening of an order - to inform about it I think is sacred. I updated the code yesterday, but in principle everything is the same, I checked the numbers are the same everywhere. I'm just trying to understand user logic, it's more convenient with messages as it seems...


If I'm a beginner, but real traders really don't need those messages, may be I'm just a beginner and not really need them?

We have to make the final version, sign off on the job and forget about this EA. I'm bored and start digging in the Expert Advisor's code, and every time I "improve" it. That's why the final version should be defined, put a quality mark and the whole thing will go up in smoke.

 

Added advisor update.

1. Added autolot for risk takers, including pips trading :)

2. Slight optimization of the program code due to what has happened.

3. edited the user manual.

4. New tests from April till April for the last year (it was hard)

5. Previous version of the Expert Advisor is saved as OLD VERSION

6. Added easyTrader - easy Expert Advisor for 1 order trading on MetaTrader 4 (based on BJH)

You can always find source / modified EA files on Yandex Disk at

https://yadi.sk/d/MyYzRSja3JQVWK


This Expert Advisorhas no real trading experience in theForexmarket!


Please remember that the market is unpredictable and your settings obtained by testing on the quotes history can not promise a future profit.


We thank users of the MQL5 Communitywebsite for their active participation in solving various aspects of algorithmic trading. Although this EA has a primitive strategy for trading in the Forex market, it can still be useful due to the functionality gained over time and the open source code.


Thank you for your attention! We wish you successful trading with ALGO_BLACKJACK&HOOKERS!




BLACKJACK&HOOKERS.rar
BLACKJACK&HOOKERS.rar
  • yadi.sk
Посмотреть и скачать с Яндекс.Диска