Trabajo finalizado
Tarea técnica
MT4 EA Template
I need a template for MT4 EA with the following features.
—————————
Input paramenters:
- currency (es. EUR/USD)
- timeframe (can be different from the chart where EA is attached)
- max loss per trade ($)
- min profit per trade ($)
- default_tp (pips)
- default_sl (pips)
- pips to activate trailing
- trailing_step (pips)
- trailing_active (boolean)
- buy_flag (if 0 do not send buy orders)
- sell_flag (if 0 do not send sell orders)
- max number of buy order open at the same time
- max number of sell order open at the same time
- order magic number
—————————
Function (must be executed at every tick)
- open_order_up (boolean function; if true opens a buy order; input parameter: order magic number)
I will complete the boolean conditions; just set a dummy one.
Main function must include the code to send buy order.
- open_order_down (boolean function; if true opens a sell order; input parameter: order magic number)
I will complete the boolean conditions; just set a dummy one.
Main function must include the code to send buy order.
- close_all_buy_order (boolean function; closes all buy orders; input parameter: order magic number)
- close_all_sell_order (boolean function; closes all sell orders; input parameter: order magic number)
Main function must include the code to close all orders.
- open_buy_orders_total_profit ($; calculate total profit of open buy orders)
- sell_orders_total_profit ($; calculate total profit of open sell orders)
—————————
Variables (must start from 0 when EA is initialized and be updated during EA execution; must be shown as a label on the terminal graph when EA is attached to a chart)
- buy_total_profit (can be <0)
- sell_total_profit (can be <0)
- number_order_buy_win
- number_order_buy
- number_order_sell_win
- number_order_sell
—————————
Source code must be delivered.
Code must be clean and readable, fully commented
EA will be tested with dummy buy/sell conditions