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

 
geratdc:

OK. Foundthe MetaEditor and the manual there too .

Thanks for the support.OK, I'm off to the underground, I'll try to program.


Good luck, there's a debugger there, you'll need it very much, look in the help. Start with a script, it's easier that way.
 
geratdc:

OK. Foundthe MetaEditor and the manual there too .

Thanks for the support.OK, I'm off to the underground, I'll try to program.

I like that urge. If you need any help, feel free to get in touch.
 
Alexey Volchanskiy:


If I knew how, I would have done it long time ago )). But not by levels.

I use the rate of price change to determine the amount of a counter-order. But that's not for manual trading, and you seem to have it. There is a lot of manual counting going on here. Mine is for a robot.


I missed it. Of course, I would have to develop a complete trading robot that would start trading by itself. At the moment the only idea of the algorithm is its general meaning, the description to be chosen is free of creativity. At present I am studying Cheburashka where there are some code elements that can be used and interesting theme in general.
 
Dmitry Fedoseev:
Try searching for the phrases: cheburashka, stop flip, stop reverse, stop reverse


Yes, here's a ready-made program. It reverses a position after a trailing stop is triggered but my programmer uses only price movement but the algorithm is similar. I do not quite understand this principle of trailing.

Anyway, the wheel has already been invented, which of course is to be expected, but I have to invent it anyway...

FREE to give away isn't there.

Thanks for the valuable tip!

 
Alexey Volchanskiy:

Good luck, there's a debugger, you'll find it very useful, look in the help. Start with a script, it's easier that way.

At first I didn't understand what you mean, today there were just scripts, just something similar that may come in handy for implementing my algorithm in the code. I had to install MT4 because MT5 is not mature enough yet intellectually. I have decided to use МТ5 (for those who have not mastered it yet)) Well, I`ve tried to make a step-by-step move to the seminars but I still have not understood many things - it`s normal for a beginner, some ideas are on my mind but I do not know how to make codes (thinking of algorithm and output of its description sequence) I`ve got only half of the lesson and I`ve got to MT5 :))))) I`ve tried to buy it myself but I`ve found it too late and I don`t know how to use it. As far as I understand it's like in mathematics - one and the same problem can be solved by different variants. That's why a library of tools in your mind is important. Otherwise, it can be a function, but you don't know it, and who is to blame? From this and the difficulty of independent work so I'm in no hurry to code my own blackjack. I don't have much time to develop my own, so I'm not hurrying to make my own blackjack. I had some ideas about lots :))) Maybe there is a topic on the forum about trap hunters in the form of Expert Advisors with special scripts. I'll let you know when something new comes up.
 

This TASK will become relevant afterALGO_BLACKJACK&HOOKERS will be described in basic form, first in MQL4, and if successful, I will start describing the TASK in MQL5.

Trade Parameters 1 lot Leverage 1:100 Deposit 1000 USD.

I do not know, that it is possible to operate on a real account without a leverage?

So, here is the technical task:

Three indicators for entry in the transaction (Mouving Average (100) + Fibonacci levels (on which timeframe to rely on a mystery, the question remains open) + market volatility level (if over an hour chart has passed more than 100 points, the indicator gives a signal). The Expert Advisor opens buy or sell orders if all three signals from the indicators are present.

2. ALGO_BLACKJACK& HOOKERS is an automatic and logically closed algorithm with the LockHunter element from the grid advisor, a trailing stop and the tactics of setting counter-orders when the market moves against an open position. A completed cycle of the algorithm has 2 probabilities of a fixed loss and 3 probabilities of a conditionally unlimited profit. Counter-orders are opened without increasing the lot size.

Multicurrency Expert Advisor - the ability to simultaneously work with at least 10 volatile instruments. If simultaneous use of several instruments is not possible - switch to a new chart per minute, analyze indicators, analyze the availability of orders for the open instrument, and then work according to the algorithm. When positions close in profit or loss, we again analyze the indicators and if not, we again per-minute shift the charts and check the indicators and if there is a market entry, the Expert Advisor will work with the instrument accompanying the open position. It goes like this.

4. Around the clock work on a remote server, to be fully independent of the home PC - pay rent.

5. SMS notification at the first error in the log for the day, and by e-mail log and standard report every trading day.

*Trailing stop - genius invention of programmers, insatiable for profit size and pulling a stop loss at a step given in pips.

**LockHunter - an intelligent function from the grid advisor, namely to close losing and profitable positions on an instrument if there is enough profit on open profitable positions to cover the amount of losses on the losing instrument positions, as well as swaps and commissions on them as of every Friday an hour before swaps and commissions are charged.

If LockHunter will not show itself well then marginalize it to ruthless Friday script - one hour before swaps and commissions it completely closes suspended positions to release free margin and 100% use of the deposit for a new trade on Monday. After the script works out, the Expert Advisor stops working until midday on Monday to allow the market to settle after waking up from the weekend. For the rest of the period there is round-the-clock work. If simultaneous operation of all instruments is impossible, this means that the script works out the closing of losing and "stuck" orders an hour before swaps and commissions are charged on Friday, after switching the chart over every minute and following analysis of the availability of orders for a symbol. Taking into account the closedness of the algorithm, the prevailing amount of profitable outcomes, trailing stops and free margin to open new positions as a result of the Trap Hunter's work, this policy can justify itself.

So far this is a result of information I gathered from the video tutorials. Half of the video course in MQL4 is now behind us. Of course, there will be some changes, but this is the idea so far.

I am waiting for your comments. What is possible and what is impossible.

Files:
 

ALGO_BLACKJACK&HOOKERS is ready!

The basic version is ready for your attention. From here on, you can train it on your own. It's a bit risky mechanics, but with daily monitoring you can release free margin by forcibly closing bad positions and everything will be fine, I think. LockHunter is already there (analog of the "Grid" EA function). I hope to add trailing profit. Let's see how our pirate likes it.

I have tested it a little. I have hardly found a way to configure it with small deposit of $2,000. Otherwise he'll lose everything on forex. All in all, he's a cocky little fella. Please, let me know if you cheat him and make him work with microposits like 500 or 1 000 dollars. That's it.

So, I am now a cool programmer too, right?))) Thanks for the support everyone.

Study the new guy.

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

I put the robot on a demo account with 25 000$, but there are delays in order opening (ECN type) but the robot does not want to trade. Some kind of alerts. I do not know what I am missing.


I've been giving him a task to monitor up to three orders only. I don't know why I'm still here and I'm not sure what to do with them. And then he opens them all at once. Perhaps, we should have done something with the counter in a loop so that it would calm down and monitor them after 3 orders instead of buying up the entire market)). I thought I didn't have to bother with it after the tester, but it turned out this way)))) I think everything is just beginning.


The spread of EURUSD on my demo account is about 24 points. I gave my robot a slippage of 30. I even opened one order for him)), my robot didn't pay any attention to it. :(


This is the alerts of the robot but it seems to be clean.

Алерты.rar
Алерты.rar
  • yadi.sk
Посмотреть и скачать с Яндекс.Диска
 

I have corrected myself, I apologise - I mixed up the file names - I called it a mini-maxi and a maxi-mini. That's why the robot did not open orders, the lot was small according to trading conditions. I have moved the files again. My robot is very active in trading. I hope my demo deposits will survive till tomorrow morning)). Good luck.

I would like to ask you to copy the robot for yourself. There are two versions of it - one for 1 lot and the other for mini accounts like $2000, because I have very active robot and I could not teach it at $1000. I would not be able to teach my robot to work with such a code. I messed up somewhere. As usual)))

 

I forgot something else - I understood that the robot should be configured for a specific currency pair, as I managed to do it with EURUSD for 1 lot and USDCHF for the mini version - it trades with a smaller lot.

This mini version, as well as the regular one, has an external variable of double Takeprofit type - well, sometimes besides the takeprofit lot size and step I had to change this variable type from double to int and it had an effect. In addition to this external variable TakeProfit there is also a conversion to 3-5 digit quotes - pay attention to the same double TakeProfit - I think this variable is "digitized" in mini version and marked with //. So, it's also one of the tricky elements of robot's settings - switching on and off the // - comment mark. Well, if you test the robot "as is" and try to set up these two variables in such a tricky way, then the robot will do better or worse in the test, you'll notice this immediately and figure out what's what I think.

That's all. I've told you everything I know. Of course, the code is very simple and I have already found a fault - the robot does not lead three orders but buys up the market and makes risks. I cannot fix it immediately, just keep it in mind. The robot should have a loop with counter most likely, but I'm not a programmer like you yet))))) to cope with it. In general, the robot is "as is" - test, fix bugs if not too lazy and complement our pirate :) I would be grateful if you could share the new modification, at least so that the robot would work out a strict algorithm and would not open other orders after three open ones, otherwise it opens positions until there is enough free margin for that, and when the slump on the chart is not sufficient and gives up... StopLoss should be added to it... In general, I will continue to think slowly. I also need either a counter or limit the level of free margin, for example 50% - in case of market drawdown and even then, if the deposit is small... It won't help, depending on what kind of drawdown. I saw a drawdown in the market (on the tester's history) of 18 000 points in some chart - and the pirate could not cope with $2 000 of deposit even when I activated the tester's optimization parameters, those parameters do not exist in the robot by default - it is a simple tool that works according to the algorithm and earns $ 2 000 in the tester for rare instruments.

Reason: