The idea of ​​the trading system is as follows: Enter orders using a Moving Avarage in H1. Indicators used: Moving Average Set in the input panel Trading signals Sell ​​signal: If the bar closes over the “Open Price 1” “Open price 1” calculated as the value of the MA (period defined in the input panel) + “deviation” + 1/2 “Slipage” EMA 9 < EMA 20 (true or false in the input panel) Buy signal: If the bar closes below the “Open Price 2” “Open price 2” calculated as the value of the MA (period defined in the input panel) - “deviation” - 1/2 “Slipage” EMA 9 > EMA 20 (true or false in the input panel) Positions open: Through pending sell and buy orders, open when a new H1 bar emerges. The Expert Advisor is to be tested using Open prices, so there is no need to add functions for disabling operations inside the bar. The “opening price of sell orders” = “Open price 1” - “distance from the price for pending orders”. The “opening price” of buy orders = “Open price 2” + “distance from the price for pending orders”. Lotsize = (1% Equity / “Risk_percentage”/ “Lot”) “Risk_percentage” and “Lot” set in the input panel. Position closing after triggering by Take Profit — a Take Profit level is set at a fixed distance from the open price when the order is set, specified in pips. The value is set in the input panel, optimisable. By StopLoss - a StopLoss level is set at a fixed distance from the open price when the order is set, specified in pips. The value is set in the input panel, optimisable. At opposite signals : If the order started and TP and SL levels have not been reached, positions are closed at opposite signals. When the new H1 emerges if the gain is equal to the “Takeprofit percentage” set in the input panel. BreakEven and TrailingStop must start immediately, not every bar opening. Un-triggered orders are deleted Buy orders are deleted at Sell signals, and Sell orders are deleted at Buy signals at the starting of a new bar. Anyway orders are deleted at the end “stop_time” in the input panel. Position management TrailngStop and/or Breakeven set in the input panel: INPUT PANEL: copyright Valentina Di Felice Magic number (selectable) Max orders (selectable) from 1 to infinite Tf ——- Time-frame for analyse TimeFrame (selectable) from 5 minutes to 1 month Moving Average Settings Period (Selectable) from 0 to infinite (standard 9) Method (selectable - Simple- Exponential etc etc) - ( standard Exponentional) Price (Selectable) - Close, Open etc etc (standard - Close) EMA9_20_option EMA9_20 (true or false) Devot ——- Distance from MA to open Deviation (selectable) from 0 to infinite Agr - Minimum distance between orders in aggressive trading Min-step (selectable) from 0 to infinite De ——- Distance from the price for pending orders Delta (Selectable) from 0 to infinite Work Time —— ***** Trade Time ***** Use_work_time (true or false) Start_time 00:00 Stop_time 00:00 Type _o ——- Type order , pending stop/limit orders Use_market_orders (true - false) Pending_Stop_Orders (true - false) Pending_Limit_Orders (true - false) Kl - Delta multiplication factor for Limit Orders koeff_limit_orders (0.0 to infinite) (standard 1.0) MM_SL_TP —— **** Money Management***** Lot = 0.01 (selectable) from 0 to infinite Risk_percentage = 0.05 (selectable) from 0 to infinite Use_opposite_signal_to_exit (true or false) StopLoss (selectable) from 0 to infinite, 0 = no SL Take_Profit (seletable) from 0 to infinite, 0 = no TP BreakEven ——- ****Break Even**** use_break_even (true or false) breakEven_level (selectable) from 0 to infinite BreakEven_size (selectable) from 0 to infinite Trailing ——- ******* Trailing Stop ******** use_trailing_stop (true or false) TrailingStart (selectable) from 0 to infinite TrailingStep (selectable) from 0 to infinite Other settings *****Other Settings***** Slippage (selectable) from 0 to infinite