The utility is designed for two possible use purposes:
Usage method:
When you run the utility, the default values are configured as follows.
Stops type:
- Default
- Manual
- Automatic
- on/off level moving-Enable / disable the movement of levels with the price. (true)
- when begin move tp/sl levels – The number of points missing to the take profit level. (25 points)
Default settings:
Stops type:
- on/off level moving-Enable / disable the movement of levels with the price. (true)
- when begin move tp/sl levels – The number of points missing to the take profit level. (25 points)
Default settings:
- init SL-Set when opening an order, in points. (200 points)
- init TP-Set when opening an order, in points. (200 points)
- TP after move – New value. It is set after the difference in the levels of the first and third parameters is reached. (100 points)
- SL after move – New value. It is set after the difference in the levels of the first and third parameters is reached. (100 points)
Settings based on automatic levels:
[spoiler title=”Read More…”]
- timeframe – any timeframe
- candles calculation – the number of candles to calculate the levels
The levels are calculated using the following formulas:
Pivot = (high close low)/3 R1 = (2 * Pivot) - low S1 = (2 * Pivot) - high R2 = Pivot (R1 -S1) R3 = high (2* (Pivot - low)) S2 = Pivot - (R1 - S1) S3 = low - (2*(high - Pivot)) H = high L = low U = if the candle is bullish, then close. Otherwise-open D = if the candle is bullish, then open. Otherwise-close
The levels are calculated using the following formulas:
include:
6 parameters that include or exclude specific level types from the result and display
draw:
Draws levels
If in Automatic and Manual mode there are no levels for setting and moving security orders, then the values init SL and init TP are taken
If in Automatic and Manual mode there are no levels for setting and moving security orders, then the values init SL and init TP are taken
- You open a position, immediately set the levels of the first two parameters (100 points stop loss and 100 points take profit).
- When the price moves in the direction of the profit when the value of the profit the difference between the parameters of the init stop loss and move begin when tp/sl levels (100 – 25 = 75 points), there is a shift in levels of take profit and stop loss to the new values after the move take profit and stop loss after move relative to the current price.
- That is, the new values are now equal to 50 and -50 points from the new price.
- You are at breakeven by 25 = (-100 (initial value) 75 (level reached) 50 (new value)) points. The new take profit value is 125 = (75 50).
- Now, if the price continues to move in the direction of profit, after overcoming 100 points (75 25), the protection levels will shift by another 25 points (half of 50 is the new take profit value).
- Thus, your breakeven profit is 50 points, the current price is 100, the take profit value is 150 from the opening of the position.
- After 25 points, the process will repeat and you will get another 25 points to break even.
In Automatic and Manual mode, the new SL and TP values are not configured. The nearest level is taken, or the default values, if there are no levels.
You need to play around with the parameters to accurately select the optimal values for your trading style.
Demo version:
[/spoiler]