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

JS-MA-Day - MetaTrader 5 Expert | Forex Indicator Download - MT4/MT5 Resources

author EAcpu | 5 reads | 0 comments |

Idea from : JS_Sergey .

MQL5 code by : Vladimir Karputov .

The EA is based on the indicator iMA (Moving Average, MA) with time range D1.

You can increase your position (set the parameters " Increase position " to " True "), but be careful when setting the parameters " Closing time " and " Increase time frame ". Example of incorrectly set parameters: You set " off time " to " 23 " and " increase time range " to " PERIOD_H4 ". In this case, the position will not be closed at 23-00, since the candlesticks opened at the following times during H4: 16-00, 20-00 and 00-00, i.e. we cannot be in the range of 23-00 at all. That's why, if you enable " Close time parameter" (value over "-1") " Increase time range ", it's better to choose H1 or lower time range. When adding to a position, it is possible to limit the number of positions (" maximum position ") on the current symbol with the current " magic number ".

Stop Loss, Take Profit and Trailing can be disabled. For this purpose, it is sufficient to set the relevant input to zero.

Position size can be managed in two ways: by trading with a constant lot size (the parameter " Many " is greater than zero, and the parameter " Risk " is zero), or by dynamically calculating the number of lots in percent risk per trade (the parameter " Risk " is greater than zero, and the parameter " Many " is zero).

//--- indicator input

//--- Trade Management


Attachment download

📎 js-ma-day.mq5 (46.48 KB)

Source: MQL5 #16952

Verification code Refresh