Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Nextbar - MetaTrader 5 Expert | MT5 EA Download - MetaTrader 5 Resources

author EAcpu | 2 reads | 0 comments |

Nextbar - expert for MetaTrader 5

Nextbar - expert for MetaTrader 5

Idea comes from : screenwriter

MQL5 code author : Balabashka Kong

The Expert Advisor operates only when the bar appears (opens a position and checks the possibility of closing it). The tracking function runs on every price move (checks the possibility of trailing stop loss).

The opening volume equals a lot . Stop Loss , Take Profit and Trailing Stop can be disabled by setting the appropriate parameter to "0.0".

The EA compares the closing price of bar 1 with the closing price of the signal bar ( the signal bar value cannot be less than 2, otherwise it will be regarded as an error and the EA will be uninstalled). The difference between the closing prices of these two bars should be greater than the shortest distance .

Another limitation: the signal is generated when there are no open positions.

When to signal use reversesignal =false:

If useInverseSignal =true, the generated signal is inverted.

The position lifetime is also checked when a new bar appears: if the position's lifetime bar is reached, the position will be closed.

Example of how signal reversal affects EURUSD, H1:

Nextbar - expert for MetaTrader 5

Nextbar - expert for MetaTrader 5


Attachment download

📎 nextbar.mq5 (36.41 KB)

Source: MQL5 #21774

Verification code Refresh