I will write an advisor free of charge - page 151

 
Ivan:

Well then please transfer these changes to the version

Knock-knock Indicator Ver 4

so that everything is in one version

Put it out there so there is no confusion.
 
Александр:
This is justified by experience. TP and SL cannot be the main way out. Another thing is level, high, low in months, weeks, days. Well, TP and SL do not work. Make your Expert Advisor without TP, SL, and when it is ready, attach TP, SL. Thus, you will gain 2-3%. For example. The EA fulfills the conditions for closing a position. We modify the order and change the TP by a few points.

At this level only the order that would go further in the profit direction would open - you would save on spread (because a losing order would not open, so you would not have to pay for it).

 
Александр:
Put it out there so there's no confusion.

latest version

 
Ivan:

latest version

As amended.

 
it's all been there...
 
This question is a little off topic, but still, how do I make a regular mt4 alert pop up in a window?
 
Ivan:
This question is a little off topic, but still, how can I make a regular mt4 alert pop up in a window?

Alert

Displays a dialog box containing user data.

voidAlert(
argument,// first value
...// subsequent values
);

Parameters

argument

[in] Any values, separated by commas. To split the output into multiple lines, use the line feed characters "\r\n". The number of parameters cannot exceed 64.

Returned value

No return value.

Note

Arrays cannot be passed to Alert(). Arrays must be output element by element. Data of type double is output with 8 decimal digits after the point, data of type float is output with 5 decimal digits after the point. To output real numbers with a different precision or in scientific format, use DoubleToString().

Data of the bool type is printed as "true" or "false". Dates are printed as YYYY.MM.DD HH:MI:SS. To output the date in another format, use the TimeToString() function. The data of the color type are output either as a string R,G,B or as a colour name, if this colour is present in the colour set.

When working in the strategy tester, the Alert() function is not executed.

See also

Comment(), Print().

For example.

Alert(" Уровень превышен = ",iVolume(NULL, 0, 0),  " пара -> ", Symbol(),"  ", Period());
 
working conditions for the Expert Advisor

1.itself does not trade all trades manually (buy and sell)

2. entering the market --- places a take and a trailing order ( should be adjustable) and simultaneously pending in the opposite direction 2-3 times more (should be adjustable) if the deal closed in + then the pending order is removed .

The pending order has an exposed take in minimum + (possibility to adjust)

3. when the pending order triggers --- another pending order is placed on the level of 1 order (i.e. total must be equal)

4. if the price returns and a lock is formed --- all the take-ins are deleted.

5 at opening any part of the lock a pending on volume equal to this part is opened. on movement in 15 -20 points (to regulate) i.e. if I open buy then the pending on buy and on a contrary.
 

Good day, Dear Programmers.

This idea has been sitting in my head for a long time. I tried to do it manually, but I get confused. I am sure there is no such algorithm anywhere in trading (point 3).

1. The Expert Advisor opens orders at each breakdown of a candle High - Buy, Low - Sell.

2. TP is equal to one ATR.

3. After the order is closed on the TP, the Expert Advisor takes the most unprofitable order and 30% of the TP of the closed order (to be printed in the variable data of the Expert Advisor)

Trawl the TP of the losing order into the negative zone (following the principle of first taking then giving up a profit percentage)

and thus it leads the loss-making order to its closing with a loss. Then it finds the most unprofitable order again and continues to modify it until it is closed with a loss.

In every such series, we will get at least 60% profit with swap and commissions taken into account.


I hope for your understanding.

 
Ivan:
This question is a little off topic, but still, how do I make a regular alert from mt4 pop up in a window?

The usual Alert just pops up in the usual window! What do you mean by that? Explain further

Reason: