I will write an advisor free of charge - page 136

 

Hello Gentlemen!

How do I make an OrderClose if the price moves in the opposite direction?

 
Сергей Дыбленко:

Hello Gentlemen!

How do I make an OrderClose if the price moves in the opposite direction?

What does it mean that price has reversed? How do you determine this?
 
Сергей Дыбленко:

Hello Gentlemen!

How do I make an OrderClose if the price has turned in the opposite direction?

Stop Loss or Trawl.

- Here's the Expert Advisor you have - only here I added a trawl

Files:
EXPStdScore.mq4  23 kb
StdScore.mq4  39 kb
 

Hi all!

Most buy-stop, sell-stop, stop loss or take profit orders are placed on high or low candlesticks with an indentation for insurance set by a trader.

Please write the following scripts for MT5 (or suggest if you already have them):

1) a script to set a buy-stop(sell-stop) on the high(low) candle to which the script is applied, specifying the following parameters in the window: lot, the offset from high(low) candle (points), stop loss (points), take profit (points);

2) a script to modify a stop loss on a high(low) candle with the indent from the high(low) candle(s) specified in the window of parameters,

e.g. using the following algorithm:

we throw the script on the chart,

it sets the graphical object "text",

magnetize the "text" to the necessary high (low)

select the necessary stop loss on the chart,

move it and it is indented from the "text";

3) a similar script to modify the take profit on a high(low) candle with the indentation of the high(low) candle(s) in the window of parameters.

I have similar ones for MT4, I haven't found any for MT5.

 
alexniko38:

Hi all!

Most buy-stop, sell-stop, stop loss, or take profit orders in price action trading are placed on high, low candles with an indent for insurance, set by the trader.

..............................................

Not available for MT5.

Anything free can be found herehttps://www.mql5.com/ru/code/mt5/scripts

- Who can write your real needs - this is only for mani

MQL5 Code Base: Скрипты
MQL5 Code Base: Скрипты
  • www.mql5.com
Скрипты для MetaTrader 5 с исходными кодами
 
SanAlex:

stop or trawl.

- here's the expert you have - only here I've added a trawl

Thanks Sash! I'll raise a grand on fore half of yours!!!!
 
Is there a floating and not fixed trailing stop in the EA?
 
Сергей Дыбленко:
Is there a floating trailing stop rather than a fixed one?

manually set when the order is clicked, programmed by modifying the stop loss. There is no separate command/function.

 
Valeriy Yastremskiy:

manually set when the order is clicked, programmed by modifying the stop loss. There is no separate command/function.

I'm talking about the Expert Advisor

 
Сергей Дыбленко:

I'm talking about the EA.

In EA, only a modification of Staploss can make a trawl. There is no other way.