craa un EA per mt4 con queste regole: 1) Calculate a 5-bar simple moving average of…
- User
craa un EA per mt4 con queste regole:
-
Calculate a 5-bar simple moving average of closes.
-
Calculate a 15-bar standard deviation of closes.
-
MACD (6, 15, 1)
Long Entry Position
a) Check for a penetration of the middle band from down and Macd is above zero.
b) Buy at the market.
Short Entry Position
a) Check for a penetration of the middle band from the up and MACD is below zero.
b) Sell short at the market.
Exit Order
1)) This is a stop-and-reverse system. We exit a long position and sell short when the short entry is reached, and we exit a short position and go long when the buy entry is reached. Also to exit when the price
-
- Assistant
- User
error: 'PositionsTotal' - function not defined macd.mq4 45 9
- Assistant
I apologize for the oversight. In MQL4, the function
PositionsTotal()does not exist as it does in MQL5. Instead, you will need to use theOrdersTotal()function and loop through orders to determine if there are any open positions. - User
rewrite the entire code please
- Assistant
- User
try with this Setup
-
Calculate a 5-bar simple moving average of closes.
-
Calculate a 15-bar standard deviation of closes.
-
MACD (6, 15, 1)
Long Entry Position
a) Check for a penetration of the middle band of Bollinger Bands from down and Macd is above zero.
b) Buy at the market.
Short Entry Position
a) Check for a penetration of the middle band from the up and MACD is below zero.
b) Sell short at the market.
Exit Order
1)) This is a stop-and-reverse system. We exit a long position and sell short when the short entry is reached, and we exit a short position and go long when the buy entry is reached. Also to exit when the price
Take Profit: 60 pips
-
- Assistant
- User
try to meke this: Setup
-
Calculate a 5-bar simple moving average of closes.
-
BBand 20,2.
-
MACD (6, 15, 1)
Long Entry Position
a) Check for a penetration of the middle band from down and Macd is above zero.
b) Buy at the market.
Short Entry Position
a) Check for a penetration of the middle band from the up and MACD is below zero.
b) Sell short at the market.
Exit Order
1)) This is a stop-and-reverse system. We exit a long position and sell short when the short entry is reached, and we exit a short position and go long when the buy entry is reached. Also to exit when the price
Take Profit: 60 pips EUR/USD stop loss: 30 pips trailing stop: 30pips
-
- Assistant
- User
only one trade per time please
- Assistant
- User
manca la MA a periodi che taglia la middle band delle BBands
- Assistant
- User
'ApplyTrailingStop' - function not defined macd.mq4 99 7
- Assistant
- User
c'è un errore. i trades devono essere aperti solamente quando la SMA 5 taglia la middle band
- Assistant
- User
the exit trades are wrong i think
- Assistant
- User
add a 200SMA filter. if prices are below the 200sma only sells, if above only buys
- Assistant
- User
'Order' - function not defined macd.mq4 97 29 ';' - unexpected token macd.mq4 97 42 'newOrderType' - unexpected token macd.mq4 113 26
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.