//+------------------------------------------------------------------+ //| tf-S1-T2-M4.mq5 | //| Thorsten Fischer Copyright 2019-2020 | //| https://mql5.tfsystem.de | //+------------------------------------------------------------------+ #property copyright "Thorsten Fischer Copyright 2019-2020" #property link "https://mql5.tfsystem.de" #property version "1.00" //+------------------------------------------------------------------+ //| Include | //+------------------------------------------------------------------+ #include //--- available signals #include //--- available trailing #include //--- available money management #include //+------------------------------------------------------------------+ //| Inputs | //+------------------------------------------------------------------+ //--- inputs for expert input string Expert_Title ="tf-S1-T2-M4"; // Document name ulong Expert_MagicNumber =32058; // bool Expert_EveryTick =false; // //--- inputs for main signal input int Signal_ThresholdOpen =10; // Signal threshold value to open [0...100] input int Signal_ThresholdClose =10; // Signal threshold value to close [0...100] input double Signal_PriceLevel =0.0; // Price level to execute a deal input double Signal_StopLevel =50.0; // Stop Loss level (in points) input double Signal_TakeLevel =50.0; // Take Profit level (in points) input int Signal_Expiration =4; // Expiration of pending orders (in bars) input int Signal_MA_PeriodMA =85; // Moving Average(85,0,...) Period of averaging input int Signal_MA_Shift =0; // Moving Average(85,0,...) Time shift input ENUM_MA_METHOD Signal_MA_Method =MODE_SMA; // Moving Average(85,0,...) Method of averaging input ENUM_APPLIED_PRICE Signal_MA_Applied =PRICE_CLOSE; // Moving Average(85,0,...) Prices series input double Signal_MA_Weight =1.0; // Moving Average(85,0,...) Weight [0...1.0] //--- inputs for trailing input int Trailing_FixedPips_StopLevel =20; // Stop Loss trailing level (in points) input int Trailing_FixedPips_ProfitLevel=30; // Take Profit trailing level (in points) //+------------------------------------------------------------------+ //| Global expert object | //+------------------------------------------------------------------+ CExpert ExtExpert; //+------------------------------------------------------------------+ //| Initialization function of the expert | //+------------------------------------------------------------------+ int OnInit() { //Print("Test = (m_patterns_usage&(((int)1)<