RTC_Receiver

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

//|                                                 RTC_Receiver.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 - Receiver Template"

#property description "RECEIVER from one MT5- or MT4-account."

#property description "Leave as 'input' parameters that could be changing only and set fixed values to others."



#include "Types.mqh"



#define INPUT_PARAMS

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

//| 1. COMMON Settings                                               |

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

ENUM_RTC_MODE inp_runMode

   = RTC_MODE_RECEIVER;                      // - 1.1. Run as

input string inp_startSenderName = "";       // - 1.2. Sender name

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



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

//| 2. RECEIVER Settings                                             |

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

ENUM_RTC_VOLUME_CONVERSION_TYPE inp_conversionType

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

double inp_conversionRatio = 1.0;            // - - 2.1.1 Ratio

ENUM_RTC_COPY_TYPE inp_copyType

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

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

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

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

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

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

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

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

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



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

//| 3. FILTER Settings for RECEIVER                                  |

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

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

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

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



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

//| 4. PROTECTING Settings                                           |

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

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



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

//| 5. TECNICAL Settings                                             |

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

ENUM_RTC_UPDATE_MODE inp_updateMode

   = RTC_UPDATE_MODE_TIMER_200;              // - 5.1. Update on



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

//| 6. EXP Settings                                                  |

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

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

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

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



#include "RealTradeCopyBase.mqh"

Comments