![]()
If this is your first time visiting the MD programs page, please read the text on my profile .
Description of work
At the intersection of the main and signal lines of the Stochastic Oscillator indicator, the Expert Advisor opens a position, sets a virtual stoploss and takeprofit. The intersection is analyzed on a closed candle. When a signal to open a position appears, if there is a position in the market that was opened by the Expert Advisor, then the signal is ignored, i.e. only one position can be opened.
Features of work
The Expert Advisor is designed for hedging type accounts. It works on the instrument on which it is installed. If the terminal was restarted for some reason, the Expert Advisor will restore its data. It is not recommended to change the settings while the program is running, if you need to change the settings you need to remove the program from the chart and install it again with the new settings.
Condition for opening a Buy position
The intersection of the lines of the Stochastic Oscillator indicator is in the oversold zone.
Condition for opening a Sell position
The intersection of the lines of the Stochastic Oscillator indicator is in the overbought zone.
Conditions for closing a position
Stoploss or takeprofit crossing.
Expert advisor settings
General settings
Magic - to determine the deals that the Expert Advisor has opened
Timeframe - timeframe on which the Expert Advisor is looking for entry signals
Money management settings
Fixed volume - fixed volume, lots
Auto volume - auto volume, calculated by the formula lot = deposit * Auto volume / 100, perc (0 - not used)
Risk per deal - risk per deal, percent (0 - not used)
Volume increase mode - volume increase mode, volume increase after a loss or after a profit
Volume multiplier - position volume multiplier with increasing volume, coeff (0 - not used)
Additional volume - position additional volume with increasing volume, lots (0 - not used)
Number of deals to increase the volume - number of deals to increase the volume, pcs (0 - not used)
Number of deals with increased volume to reset to the initial volume - number of deals with increased volume to reset to the initial volume, pcs (0 - not used)
Number of deals with repeated volume - number of deals with repeated volume, pcs (0 - not used)
Position closing settings
StopLoss - distance to loss limit, points
StopLoss using ATR - distance to the loss limit calculated by the Average True Range indicator, coeff (0 - not used)
TakeProfit - distance to profit taking, points
TakeProfit using ATR - distance to profit taking calculated by the Average True Range indicator, coeff (0 - not used)
TakeProfit relative to StopLoss - distance to profit taking calculated in relation to stoploss, coeff (0 - not used)
Breakeven settings
Breakeven activation - distance to breakeven activation, points (0 - not used)
Breakeven activation using ATR - distance to breakeven activation calculated by the Average True Range indicator, coeff (0 - not used)
Trading time settings
Use time - use trading time
Start time - start time, hours
End time - end time, hours
Trading Stop Settings
Profit - when the value is reached, the Expert Advisor closes the position and is removed from the chart, the deposit currency (0 - not used)
Loss - when the value is reached, the Expert Advisor closes the position and is removed from the chart (must be a negative value), the deposit currency (0 - not used)
Stochastic Oscillator indicator settings
The settings of the Stochastic Oscillator indicator are standard, as in the MetaTrader 5 terminal.
Average True Range indicator settings
The settings of the Average True Range indicator are standard, as in the MetaTrader 5 terminal.
The default settings do not guarantee a profit, so the Expert Advisor needs to be optimized before work. If you have any questions about the settings of the adviser, then write to me in private messages.
In the future, I will expand the functionality of the Expert Advisor, so in order not to miss updates, subscribe to the channel here on the site ( https://www.mql5.com/en/channels/mql_development_en ), or to the telegram channel ( https://t.me/mql_development_en ).
Good luck to all.