RealTradeCopy

Author: Copyright 2022, Yuriy Bykov
0 Views
0 Downloads
0 Favorites
RealTradeCopy
ÿþ//+------------------------------------------------------------------+

//|                                                RealTradeCopy.mq5 |

//|                                      Copyright 2022, Yuriy Bykov |

//|                     https://www.mql5.com/ru/market/product/73910 |

//|                     https://www.mql5.com/ru/market/product/73913 |

//+------------------------------------------------------------------+

#property copyright "Copyright 2022, Yuriy Bykov"

#property description "Real Trade Copy - "

#property description "just trade copier from one MT5- or MT4-account"

#property description "to one another MT5-account or MT4-account."

#ifdef __MQL4__

#property link      "https://www.mql5.com/ru/market/product/73910"

#endif

#ifdef __MQL5__

#property link      "https://www.mql5.com/ru/market/product/73913"

#endif

#property version   "1.58"



#include "Types.mqh"



#define INPUT_PARAMS

//+------------------------------------------------------------------+

//| 1. COMMON Settings                                               |

//+------------------------------------------------------------------+

input string section1 = "";                  // 1. COMMON Settings

input ENUM_RTC_MODE inp_runMode

   = RTC_MODE_SENDER;                        // - 1.1. Run as

input string inp_startSenderName

   = "account";                              // - 1.2. Sender name

input string inp_allowedSymbols = "";        // - 1.3. Symbols, separated by ';'



//+------------------------------------------------------------------+

//| 2. RECEIVER Settings                                             |

//+------------------------------------------------------------------+

input string section2 = "";                  // 2. RECEIVER Settings

input ENUM_RTC_VOLUME_CONVERSION_TYPE inp_conversionType

   = RTC_VOLUME_CONVERSION_TYPE_CALC_BLR;    // - 2.1. How calculate volumes on receiver (R_vol)?

input double inp_conversionRatio = 1.0;      // - - 2.1.1 Ratio

input ENUM_RTC_COPY_TYPE inp_copyType

   = RTC_COPY_TYPE_VOLUMES;                  // - 2.2. What will be copied?

input bool inp_reopenManualyClosed = true;   // - 2.3. Reopen manualy closed positions

input bool inp_allowManualTrading = false;   // - 2.4. Allow manual or other EA trading

input bool inp_useDeltas = false;            // - 2.5. Open Pending Orders (PO) instead Positions

input string inp_strDeltas = "";             // - - 2.5.1. Price delta for PO

input string inp_strSLs = "";                // - - 2.5.2. Stop Loss for PO

input string inp_strTPs = "";                // - - 2.5.3. Take Profit for PO

input string inp_strExpirations = "";        // - - 2.5.4. Time for reopen PO

input ulong inp_magicN = 651628001;          // - 2.5. Magic Number for positions and orders



//+------------------------------------------------------------------+

//| 3. FILTER Settings for RECEIVER                                  |

//+------------------------------------------------------------------+

input string section3 = "";                  // 3. FILTER Settings for RECEIVER

input string inp_allowedMagics = "";         // - 3.1. Allowed Magics, separated by ';' or empty for all

//input string inp_disallowedMagics = "";      // - 3.2. Disallowed Magics (?)

//input long inp_maxPositionAge = 0;           // - 3.3. Don't copy Position older than, sec (?)



//+------------------------------------------------------------------+

//| 4. PROTECTING Settings                                           |

//+------------------------------------------------------------------+

input string section4 = "";                  // 4. PROTECTING Settings (recommend use default)

input double inp_minMargin = 100;            // - 4.1. Minimal Margin for open new Positions



//+------------------------------------------------------------------+

//| 5. TECNICAL Settings                                             |

//+------------------------------------------------------------------+

input string section5 = "";                  // 5. TECNICAL Settings (recommend use default)

input ENUM_RTC_UPDATE_MODE inp_updateMode

   = RTC_UPDATE_MODE_TIMER_200;              // - 5.1. Update on



//+------------------------------------------------------------------+

//| 6. EXP Settings                                                  |

//+------------------------------------------------------------------+

input string section6 = "";                  // 6. EXP Settings (use if you know what you do)

input long inp_minIntervalBetweenOrders = 0; // - 6.1. Min time interval between orders, sec (H)

input double inp_minOrderVolume = 0;         // - 6.2. Min one order's volume, 0 - unlimited (H)

input double inp_maxOrderVolume = 0;         // - 6.3. Max one order's volume, 0 - unlimited (H)



#include "RealTradeCopyBase.mqh"

Comments