You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Another function has been added. Just need to check it in real time in the terminal.
this version is so - In the Tester Playing
Not a bad function, I'll tell you. It goes here and there, takes its profits and doesn't give a shit.
But the code needs some tweaking. It's working fine.
I tried it on a real account, I wanted a small profit from two open positions. I had entered 160 in the settings, I thought it would close the biggest minus position, but no, it closed
I tried to close the one that got 160 in profits and closed both positions, and I'm a sucker. It turns out that I have to calculate from the first open position, adding the minus one.
#property version "1.017"
I have only found out how to use this function correctly on the fifth day. Now it closes on the total profit on one pair of all Buy or Sell
Not a bad function, I tell you. Here and there, it takes its profits and doesn't give a rat's ass
But the code needs some fine tuning - everything seems to work fine that way
I cannot create a code for this function to work in one terminal. I want to try it on 4 terminals, I don't know what will come of it
Can't create code to make this function work In one terminal. I want to try it on 4 terminals, I don't know what will come out of it
All these 4 terminals - did not give any result. And in general, this function from Loss - I can't write the code.
But I have long ago created such logic of work, only with Horizontal Lines. It remains to think up what would multiply the lot
Picture 1
We set a Horizontal line at the top
set a Horizontal line at the bottom
as soon as the price touches these lines, the position will be opened and Horizontal lines will be set
these -
and from these Horizontal Lines will open a position and put the first Horizontal Lines - and so it will repeat until the price is able to reach them
figure 2
Here is closed - set in the settings, the Profit
figure 3
---------------------------------------------
when it reaches a profit of 200 on the pair - it will close the position
figure 4
reached 200 and closed all positions on buy or sell - because you can open in both directions and each side has its own, profit or loss
- now when it reaches the Horizontal line, it opens a position - but you can manually move them
figure 5
The function increases the lot, from a loss .
thanks to this manhttps://www.mql5.com/ru/forum/107406#comment_3018721
Igor Kim
#property version "1.018"
added possibility, to increase the lot size of the loss in currency
--------------------------------
lot increase in action. It is only necessary to pick up an amount in settings, 4 levels - the last amount, more than 2000 will open lot 0.08
in the picture from these lines, open position, and also can be set in the settings trawl these lines
in place of 0 set distance= 0;// Obj: Trailing Stop (distance from price to object, in pips)
----------------------------ВАЖНО!
The trailing stop should be set so that when the signal triggers, the line jumps further away from the bar, otherwise the signal will be triggered repeatedly.
Here is the situation - when trawling a Horizontal line and bouncing back to the same bar when the command is triggered
----------------------------------
For the Horizontal line not to be repeated, set 0 = 20;// Obj: Step of the grid, points("0" -> false)
at zero, it will execute the command and be deleted
The function increases the lot, from a loss .
thanks to this manhttps://www.mql5.com/ru/forum/107406#comment_3018721
Igor Kim
I tested this function today with Horizontal line for a loss (as the price went in a wrong direction, meets a horizontal line on its way, from it opens a position and the line jumps further away, by a given distance, the loss increases and the next time it hits the horizontal line, the lot will open with an increase).
I'm stunned. - This logic, pulls everything to the plus side. I wonder how much one can sell such a miracle for!
----------------------------------------- here is another example - the price goes against me. this is the first picture, i will show the second one as it works.
figure 1
Figure 2
Figure 3
To understand how it all works
There are buttons in the Utility (BUY and SELL), they do all the commands that Horizontal Lines do - you can just look it up in the tester to see how it works .
Configuring the Buttons ----------------
Horizontal Lines setup --------------------
Here are commands that can be executed --------------------------------
Profit function
------------ Profit is not common - BUY has its own profit SELL has its own profit (for example you have two positions open one inbuy and another insell in the settings you want to earn 100, so until each of them takes a 100.) In addition, each pair has a different profit, each must take a 100 (if you are working with multiple pairs - for each pair, you must separately set the utility)
Важно!!! правильно настроить , открытии лота (До убытка валюте)
There are two losses on the pair - the total loss and (buy and sell, each of them has its own loss)
Here, the calculation is carried out in the loss ofbuy your loss fromsell your
Slight correction - for the Horizontal line to react faster to the signal.
There was a situation - the price touched, crossed the Horizontal line, but did not trigger.
#property version "1.019"
Trying out a new function . The calendar gives a signal, a command can be selected from the signal
Still need to think about what other commands are needed for the calendar.
I've already got these.
in the picture installed Utility, this is figure 1. the second will be with the executed command (Horizontal lines at a given distance)
Picture 1