Weekend evening - page 55

 

Good evening!)

Vladimir! Maybe you tried to make such an Expert Advisor (to set the total Take Profit from the second trade) in the deposit currency, you can do it in pips, it doesn't matter. (We are talking about martingale).

1) Suppose we have a buy trade on magic 1 with take profit 100 pips

2. Then we have a new buy order with magic number 2 and so on. i.e. we have a net of orders with different magic numbers and all on buy, but I have not found a program which would recalculate and set them automatically the total take profit.

We are specifically discussing separation of buy and sell orders separately, i.e. all buy orders will be closed by Take Profit only; if there are sell orders, they will not be closed unless their Take Profit is taken). (One instrument)

3 And the most important and interesting moment is that the first order has a TakeProfit of 100 points (Even if we set this TakeProfit manually or by an Expert Advisor, it doesn't matter) but as the grid starts to work starting from the second order there is no sense to keep these one hundred points, it means that our total profit is 10 points for example, just to close all orders quicker. This means that starting from the second one-way trade our Take Profit for the total profit will be 10 points.

4 Of course, we can add there the commission for the calculation, but not necessarily.

5 In other words, I have not found such an Expert Advisor that would set Take Profit with values from the second order and only for Buy or Sell orders.

The point is that deals can be set by different EAs with different wizards and at different times as we want them to be combined by a common TakeProfit. This takeprofit calculation will start working from the second unidirectional order.

6 If you do not have such an expert in your arsenal, maybe you can write it)))

 
ai1111:

Good evening!)

Vladimir! Maybe you tried to make such an Expert Advisor (to set the total Take Profit from the second trade) in the deposit currency, you can do it in pips, it doesn't matter. (We are talking about martingale).

1) Suppose we have a buy trade on magic 1 with take profit 100 pips

2. Then we have a new buy order with magic number 2 and so on. i.e. we have a net of orders with different magic numbers and all on buy, but I have not found a program which would recalculate and set them automatically the total take profit.

We are specifically discussing separation of buy and sell orders separately, i.e. all buy orders will be closed by Take Profit only; if there are sell orders, they will not be closed unless their Take Profit is taken). (One instrument)

3 And the most important and interesting moment is that the first order has a TakeProfit of 100 points (Even if we set this TakeProfit manually or by an Expert Advisor, it doesn't matter) but as the grid starts to work starting from the second order there is no sense to keep these one hundred points, it means that our total profit is 10 points for example, just to close all orders quicker. This means that starting from the second one-way trade our Take Profit for the total profit will be 10 points.

4 Of course, we can add there the commission for the calculation, but not necessarily.

5 In other words, I have not found such an Expert Advisor that would set Take Profit with values from the second order and only for Buy or Sell orders.

The point is that deals can be set by different EAs with different wizards and at different times which should be combined by Take Profit. This takeprofit calculation will start working from the second unidirectional order.

If you do not have such an EA in your arsenal, maybe you can write one?)

I don't see the logic. You want to have 10 pips, but the first position already has 100 pips. The question is: Why do you need a grid?

 
Vladimir Karputov:

I don't see the logic. You want to have 10 pips, but the first position already has 100 pips. The question is: why is there a grid?

Vladimir, (I think you've misunderstood me) the first position does not have 100 pips, while the take profit is already set at 100 pips.

i.e. we entered a trade and wanted to take a 100 pips loss but we didn't get it right. this situation happens very often. this happens not only in 100 pips trades but also in 500 pips and 1000 pips trades.

Let's say

we entered into a deal set take profit thousand pips but the deal went against us and failed minus 1000 pips we switched martingale that is, we got a grid of two orders between them 1000 pips they both let 0.1 lot.

So! there is no point in holding the first losing trade and catch a swap (and wait until it comes out in the plus and rise from the second 1500 points) its easier to close on a pullback of the second even with small gains and even in total zero as it is the first trade may in a month or two and do not come out.

This can be used in short-term deals of 20 pips with the grid of 20-30 pips EUR/USD.

The idea is to exit a losing trade quicker; at that these rollbacks (arrows) are momentary and you cannot catch them yourself and keep track of them; moreover you get sick of it changing Take Profit all the time. That is why I suggest starting from the second trade to make another take profit, to close loss-making positions quicker.

Besides, as I already told you, the idea is to connect unidirectional orders with different magicians with one take profit!

I think you still have not checked the settings of the Expert Advisor that I sent you in my PM, I will attach a screenshot here All deals are in the plus, not a single losing deal.

With respect.

Files:
5.jpg  316 kb
 
Vladimir Karputov:

I don't see the logic. You want to have 10 pips, but the first position already has 100 pips. The question is: Why do you need a grid?

I have attached a picture to make it clearer.

Files:
2.jpg  292 kb
 
ai1111:

I have attached a picture to make it clearer.

If the final Take Profit will be lower than the current price of any BUY position - you cannot set such Take Profit. In general: the idea of one Take Profit or Stop Loss for multiple positions has limitations and is not always applicable.

 
Vladimir Karputov:

If the final Take Profit will be lower than the current price of any BUY position - such Take Profit should not be set. In general: the idea of one Take Profit or Stop Loss for multiple positions has limitations and is not always applicable.

You got me wrong.

It is clear that Take Profit should not be set at once with the first order, ie below it (it will be called a stop loss). But when the second trade will be included, total Take Profit can be set and I suggest to do. Ie (three actions) put

1 the first trade 2 below it put the second 3 set a common take profit

I propose to set a regular take profit for a grid of unidirectional orders but its peculiarity is that it will start to workI don't have anything special to do with it. Such takeprofits are set by all programs (And you've made many such takeprofits) and all this is acceptable the only difference is that it will start working from the second trade and not from the first. And it will consider and close all one-directional orders irrespective of their magik, i.e. its magik will be = O. In this case you can do it in the deposit currency.

Files:
1.jpg  306 kb
 
ai1111:

You got me wrong.

It is clear that takeprofit cannot be put together with the first trade i.e. below it (it will be called stoploss). But when the second trade will be included general takeprofit can be put that I suggest to do. Ie (three actions) put

1 the first trade 2 below it put the second 3 set a common take profit

I propose to set a regular take profit for a grid of unidirectional orders but its peculiarity is that it will start to workI don't have anything special to do with it. Such takeprofits are set by all programs (And you've made many such takeprofits) and all this is acceptable the only difference is that it will start working only from the second trade and not from the first. And it will consider and close all orders in the same direction regardless of their magic number, i.e. its magic number will be=O. In this case you can do it in the deposit currency.

Have I understood correctly?


 
Vladimir Karputov:

Did I get that right?


As I understand it from your picture, yes you understand me correctly, i.e. the meaning is the same. (Usual overall Take Profit, but from the second unidirectional trade it changes the distance - "parameter").

That is, it has two different take profit parameters (of course take profit will always be one).

1) the first parameter, when there is only one trade, let's assume Take Profit of 200 points - call it "single"(the first Take Profit (for a single trade) can be absent in this Expert Advisor since it is not necessary as it is mainly set by another one)

2) the second parameterwhen there are two or more trades - let's call it "common" - suppose it is 10 points for the total profit (in other words, when this common take profit is applied it will have different parameters and they will differ from "single" one if it is in this EA)

Take Profit is always the same, but there are two different parameters, for a single trade its own parameter and for common one-directional trades its own parameter, and that's logical!)

This way it's faster to get out of a drawdown.

 
ai1111:

As I understand it from your picture, yes you understand me correctly, i.e. the meaning is the same. (Usual general take profit, but starting from the second unidirectional trade it changes the distance - "parameter").

That is, it has two different take profit parameters (of course there will always be one take profit ).

1) the first parameter, when there is only one trade, let's assume Take Profit of 200 points - call it "single"(the first Take Profit (for a single trade) can be absent in this Expert Advisor since it is not necessary as it is mainly set by another one)

2) the second parameterwhen there are two or more trades - let's call it "common" - suppose it is 10 points for the total profit (in other words, when this common take profit is applied it will have different parameters and they will differ from "single" one if it is in this EA)

Take Profit is always the same, but there are two different parameters, for a single trade its own parameter and for common one-directional trades its own parameter, and that's logical!)

It's just faster to get out of a drawdown.

Here it is:

NetPrice TakeProfit:

An Expert Advisor Utility

The Expert Advisor works on the current symbol, but it does not take into account any Magic Number. Its job is to track when there is MORE than one position in any direction, and then it calculates a position price for each direction. The calculated price is added (for BUY) 'Take Profit' or subtracted (for SELL)'Take Profit' - the resulting price is calculated Take Profit for all positions in one direction.

To make it easier to understand how the code works, the Expert Advisor has built-in functionality especially for the 'Visual Testing' mode - you can open three positions, each at a set time and with a set volume.

    NetPrice TakeProfit

    Figure 1: NetPrice TakeProfit

    NetPrice TakeProfit
    NetPrice TakeProfit
    • www.mql5.com
    Советник-утилита - выставляет общий тейк профит для позиций BUY и SELL
     
    Vladimir Karputov:

    Here:

    NetPrice TakeProfit:

    Expert Advisor Utility

    It works on the current symbol, but does not take into account any Magic Number. Its job is to track when there is MORE than one position in any direction, and then it calculates a position price for each direction. The calculated price is added (for BUY) 'Take Profit' or subtracted (for SELL)'Take Profit' - the resulting price is calculated Take Profit for all positions in one direction.

    To make it easier to understand how the code works, the Expert Advisor has built-in functionality especially for the 'Visual Testing' mode - you can open three positions, each at a set time and with a set volume.


      Figure 1: NetPrice TakeProfit

      Thank you! I will check everything tomorrow and report back.

      Reason: