How to set TAKE PROFIT negative?

 

Friends, I have a robot that I bought on the internet and they placed a TAKE PROFIT above the entry price. But if you try to do that using MT4 it doesn't allow it. How do they do it? In addition to the example in the attached image. The sixth order. It is a SELL order. And its selling price was 0.98064. And look at the T/P value. He placed the TP above the entry price. If you try to do this through MT4 an error is generated. How is it possible?

I am using the average price technique and I would like my EA to put TAKE PROFIT on all orders, but in some situations they will close at a loss. And so this robot I bought works. But I am not able to reproduce in my own EA.


Princípios gerais - Operações comerciais - Ajuda para o MetaTrader 5
Princípios gerais - Operações comerciais - Ajuda para o MetaTrader 5
  • www.metatrader5.com
Antes de começar a estudar as funções da plataforma, você deve compreender claramente todos os termos e funç...
 

You show a screenshot of a mobile terminal, but the mobile terminal cannot run EAs (robots). So, how exactly are you running this EA?

For a buy order, the take profit is usually above the price. I cannot see why you would not be able to do it, unless it violates the broker's Stops level.

For a sell order, obviously you can't place the take profit above the current price, only below it. If the price however, goes against the sell position, then obviously a Take profit below the current price but above the opening price is possible.

 

The TP has to be above the entry price when you place the order, but then the price can go down, way below your entry price. You can still place a TP as long as it is above the current price, regardless your original entry price. Let's see it:

  • Current price: 1.00250
  • Buy order entry: 1.00250
  • Take-Profit: 1.00500

Now, imagine the price falls way down. You can still place the TP above it and below your entry price. Yes, it's a loss, but you do that to accept a loss. It's still called Take-Profit since it's above the price (in this buy example):

  • Current price: 1.00010
  • Buy order open price: 1.00250
  • New Take-Profit: 1.00100

Translated into coding for your EA, you just have to modify the order and set a new TP. Just make sure it's above the current price.


Regards.


EDIT: Actually if the price goes up, and you decide to move the TP and put it way up, you can now place a Stop-Loss to lock in some profit. If you think about it, the Stop-Loss is above your open price. It's the same principle but with the Stop-Loss. Think in terms of price and then think above it or below it when you want a TP and/or SL, depending on the type of operation.
 

Unfortunately you did not understand my explanations. I knew it would be difficult, because what they do is something I can't imagine how they're doing. But I will try to explain again.

FIRST QUESTION: I am running my bot on my AMAZON VPS on my MT4 DESKTOP. Im just show for you SCREENSHOT from the account.

Check the SCREENSHOT AGAIN... SIXTH ORDER in screenshot please.

For a sell order, I would like you to explain to me how this is possible. Because to place a T/P, the metatrader only accepts at the same BREAKEVEN opening price or at a lower price, since the open order was SELL. If it was a BUY it would obviously be the other way around.

What magic did they do?
 
phantoxe #: Unfortunately you did not understand my explanations. I knew it would be difficult, because what they do is something I can't imagine how they're doing. But I will try to explain again. FIRST QUESTION: I am running my bot on my AMAZON VPS on my MT4 DESKTOP. Im just show for you SCREENSHOT from the account. Check the SCREENSHOT AGAIN... SIXTH ORDER in screenshot please.

I understood your question and gave you the answer but you overlooked it (see below).

There was no magic! It simply let the position go against itself and then set the T/P the same way as normal, based on the current price (during an adverse excursion, like a trailing take-profit), just as I explained ...

"For a sell order, obviously you can't place the take profit above the current price, only below it. If the price however, goes against the sell position, then obviously a Take profit below the current price but above the opening price is possible. "

 

Sorry you still haven't noticed that he has placed the TAKE PROFIT ABOVE the SELL order entry price.

 
phantoxe #:

Sorry you still haven't noticed that he has placed the TAKE PROFIT ABOVE the SELL order entry price.

Everybody has noticed that, and we've given you a full explanation on why that is possible.

 
phantoxe #: Sorry you still haven't noticed that he has placed the TAKE PROFIT ABOVE the SELL order entry price.

Did I not highlight my own text where I state "above the opening price"?

Both I and Carlos have explained it, in different words, and his explanation even had examples to follow.

Please take more notice yourself!

 

By the way, if you consult the log files (Experts and Journal) on your VPS where the MT4 terminal is running, you should see what happened and when the take-profit was set and what the current price was at the time.

That should help you understand what we are saying here and also prove the point.

Reason: