New Martin is an EA that opens two opposite positions when it starts. ProcessOnTradeTransaction. When Take Profit triggered, it opens a position (ONE) in the same direction. Intersection of two indicators Moving Average (Moving Average, MA, "Mashki") - this is a signal to open a larger lot position.
At the start we open two oppositely directed positions.
Then we wait for the TakeProfit triggering (OnTradeTransaction processing):
if a BUY position has been closed - then we open (now only one) BUY position
if a SELL position was closed, it means we open (now only one) SELL position.
We have a losing position.
Try to fight it this way: wait for the moving average (MA) crossing
and open a position in the same direction as the losing position, but with a larger lot.
The balance increases, but the funds do not.
The chosen method is as follows: in the input parameters there is a percentage value of lagging behind the balance ("Loss persent"). It is calculated as:
As you can see, there are no pair closes, if equity lags behind the balance by a certain percentage, we simply close all positions and start over: two positions...
New Martin is an EA that opens two opposite positions when it starts. ProcessOnTradeTransaction. When Take Profit triggered, it opens a position (ONE) in the same direction. Intersection of two indicators Moving Average (Moving Average, MA, "Mashki") - this is a signal to open a larger lot position.
At the start we open two oppositely directed positions.
Then we wait for the TakeProfit triggering (OnTradeTransaction processing):
if a BUY position has been closed - then we open (now only one) BUY position
if a SELL position was closed, it means we open (now only one) SELL position.
We have a losing position.
Try to fight it this way: wait for the moving average (MA) crossing
and open a position in the same direction as the losing position, but with a larger lot.
The balance increases, but the funds do not.
The chosen method is as follows: in the input parameters there is a percentage value of lagging behind the balance ("Loss persent"). It is calculated as:
As you see no paired closes - if funds lag behind the balance by a certain percentage - simply close all positions and start again: two positions...
Last request:
Please do a test over the last year or two with an initial deposit of $100 and post a picture in the thread.
The method chosen is as follows: in the input parameters there is a percentage of funds lagging behind the balance ("Loss persent"). It is calculated as:
As you see, there are no pair closures - if funds lag behind the balance by a certain percentage, simply close all positions and start over: two positions...
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
In the log:
Core 1 tester stopped because OnInit failed
***
So you are working on a netting account. And you need to open a hedge account:The MetaTrader 5 trading platform has got hedging.
***
By the way, if I just dumped to data folder from program - EA is not seen. Only if you compile the editor, then he saw
That's right, you have to compile. And you don't need to dump anything anywhere:
Need to throw in the kodobase already 😉. What do you call it? New Martin?
damn Martin
)
You should already be throwing in a kodobase 😉. What do you call it? New Martin?
damn Martin
)
No swear words or dirty words! Anyway, calledNew Martin(need to wait for publication).
Have you implemented something of your own? Your own ideas, developments
Vladimir, does the Expert Advisor fully comply with the TOR in the topic? Everything is clear, everything has been implemented?
Have you implemented anything of your own? Your ideas, developments
It's easier for me to describe what my code does:
Based on the"Damned Martin"theme.
New Martin is an EA that opens two opposite positions when it starts. ProcessOnTradeTransaction. When Take Profit triggered, it opens a position (ONE) in the same direction. Intersection of two indicators Moving Average (Moving Average, MA, "Mashki") - this is a signal to open a larger lot position.
At the start we open two oppositely directed positions.
Then we wait for the TakeProfit triggering (OnTradeTransaction processing):
We have a losing position.
Try to fight it this way: wait for the moving average (MA) crossing
and open a position in the same direction as the losing position, but with a larger lot.
The balance increases, but the funds do not.
The chosen method is as follows: in the input parameters there is a percentage value of lagging behind the balance ("Loss persent"). It is calculated as:
As you can see, there are no pair closes, if equity lags behind the balance by a certain percentage, we simply close all positions and start over: two positions...
It's easier for me to describe what my code does:
Based on the"Damned Martin"theme.
New Martin is an EA that opens two opposite positions when it starts. ProcessOnTradeTransaction. When Take Profit triggered, it opens a position (ONE) in the same direction. Intersection of two indicators Moving Average (Moving Average, MA, "Mashki") - this is a signal to open a larger lot position.
At the start we open two oppositely directed positions.
Then we wait for the TakeProfit triggering (OnTradeTransaction processing):
We have a losing position.
Try to fight it this way: wait for the moving average (MA) crossing
and open a position in the same direction as the losing position, but with a larger lot.
The balance increases, but the funds do not.
The chosen method is as follows: in the input parameters there is a percentage value of lagging behind the balance ("Loss persent"). It is calculated as:
As you see no paired closes - if funds lag behind the balance by a certain percentage - simply close all positions and start again: two positions...
Please do a test over the last year or two with an initial deposit of $100 and post a picture in the thread.
The balance is increasing, but the funds are not.
The method chosen is as follows: in the input parameters there is a percentage of funds lagging behind the balance ("Loss persent"). It is calculated as:
As you see, there are no pair closures - if funds lag behind the balance by a certain percentage, simply close all positions and start over: two positions...
So you added your own after all.