← К каталогу
Исходный код · ID 4527

Trade Levels

#1 trade levels (black).mq4
Вы автор или правообладатель?

Сообщите нам, если считаете, что материал размещён без разрешения.

Краткий обзор

О программе

Это пользовательский индикатор для MetaTrader 4, который отображает на графике уровни и метки, связанные с исполненными ордерами по текущему символу. Индикатор рисует линии и подписи для точек входа (EP), среднего уровня открытых позиций (AV), а также уровней тейк-профита (TP) и стоп-лосса (SL). Дополнительно выводятся метки прибыли/убытка (PL) как для открытых, так и для закрытых частей сделок.

Все данные о сделках берутся автоматически из ордеров MT4; ручной ввод цены или объёма не предусмотрен, кроме возможности задать пробные значения TP и SL для наглядности. Пользователь может выбрать отображение открытых и закрытых сделок одновременно, а также указать, в каких единицах показывать объёмы: микролоты, минилоты или полные лоты.

Для закрытых сделок доступен выбор периода отображения: либо простое число минут назад от текущего времени, либо точные даты и время начала и окончания. Закрытые сделки можно показывать как одной группой с одной меткой PL, так и отдельными группами с собственными метками. Настройки цвета и размера точек позволяют адаптировать внешний вид индикатора под светлую или тёмную тему графика.

Индикатор имеет переключатель включения/выключения без удаления с графика, а также ограничение по максимальному таймфрейму, выше которого отображение автоматически отключается. Для корректной работы точек на графике рекомендуется отключить опцию «график на переднем плане» в свойствах графика.

Настройки программы

НастройкаОписание
Indicator_On Включает или выключает отображение индикатора без удаления с графика.
Show_Micro_Mini_Full_123 Выбор единиц отображения объёмов: 1 — микролоты, 2 — минилоты, 3 — полные лоты.
Show_Open_Trades Включает отображение открытых сделок.
Show_Closed_Trades Включает отображение закрытых сделок.
Show_in_PL_Labels Разделительный заголовок для группы настроек меток прибыли/убытка; не влияет на отображение.
__OnlyPercent Если включено, в метках прибыли/убытка показывается только процент от баланса счёта.
___Comissions_Adjustment Учитывать комиссии при расчёте отображаемой прибыли/убытка.
___Swaps_Adjustment Учитывать свопы при расчёте отображаемой прибыли/убытка.
Show_for_Open_Trades______ Разделительный заголовок для группы настроек открытых сделок; не влияет на отображение.
__EP_Labels Включает отображение текстовых меток уровней входа.
__EP_Price_Dots Включает отображение точек на ценах входа.
__EP_PL_Lines Включает отображение соединительных линий между точками входа и текущей ценой для открытых сделок.
___Subordinate_PL_Lines Отображать соединительные линии открытых сделок на заднем плане графика.
__Full_EP_Level_lines Если включено, линии уровней входа отображаются на всю ширину графика, иначе — коротким фрагментом.
__Full_AV_Level_lines Если включено, линия среднего уровня отображается на всю ширину графика, иначе — коротким фрагментом.
__Full_SL_Level_lines Если включено, линия стоп-лосса отображается на всю ширину графика, иначе — коротким фрагментом.
__Full_TP_Level_lines Если включено, линия тейк-профита отображается на всю ширину графика, иначе — коротким фрагментом.
__Trial_SL Пробное значение стоп-лосса для отображения на графике; при ненулевом значении заменяет значение из ордера.
__Trial_TP Пробное значение тейк-профита для отображения на графике; при ненулевом значении заменяет значение из ордера.
__PL_Label_At_Chart_Right Размещает метку прибыли/убытка открытых сделок в правом нижнем углу основного графика.
__PL_Label_In_Subwindow_1 Размещает метку прибыли/убытка открытых сделок в правом верхнем углу первого подокна.
Show_for_Closed_Trades_____ Разделительный заголовок для группы настроек закрытых сделок; не влияет на отображение.
__Price_Dots Включает отображение точек на ценах входа и выхода для закрытых сделок.
__Price_Lines Включает отображение соединительных линий между точками входа и выхода для закрытых сделок.
___Subordinate_Lines Отображать соединительные линии закрытых сделок на заднем плане графика.
__Simple_Lookback_Time_Span Количество минут назад от текущего времени для отображения закрытых сделок.
___Lookback_Exact_Start_Time Точная дата и время начала периода отображения закрытых сделок в формате yyyy.mm.dd hh:mm.
___Lookback_Exact_End_Time Точная дата и время окончания периода отображения закрытых сделок в формате yyyy.mm.dd hh:mm.
____Reset_via_Copy_Paste Строка-шаблон для сброса полей точного времени в состояние по умолчанию через копирование и вставку.
__Show_Separate_Trade_Groups Если включено, закрытые сделки отображаются отдельными группами с собственными метками PL.
___Min_Minutes_Btwn_Groups Минимальный интервал в минутах между группами закрытых сделок для их раздельного отображения.
___PL_Label_1_Adjust_Height Смещение по высоте для метки PL первой группы закрытых сделок.
___PL_Label_2_Adjust_Height Смещение по высоте для метки PL второй группы закрытых сделок.
___PL_Label_3_Adjust_Height Смещение по высоте для метки PL третьей группы закрытых сделок.
___PL_Label_4_Adjust_Height Смещение по высоте для метки PL четвёртой группы закрытых сделок.
___PL_Label_5_Adjust_Height Смещение по высоте для метки PL пятой группы закрытых сделок.
Display_Colors______________ Разделительный заголовок для группы настроек цвета; не влияет на отображение.
EP_Level_Label Цвет текстовой метки уровня входа.
EP_Level_Line Цвет линии уровня входа.
AV_Level_Label Цвет текстовой метки среднего уровня открытых позиций.
AV_Level_Line Цвет линии среднего уровня открытых позиций.
SL_Level_Label Цвет текстовой метки уровня стоп-лосса.
SL_Level_Line Цвет линии уровня стоп-лосса.
TP_Level_Label Цвет текстовой метки уровня тейк-профита.
TP_Level_Line Цвет линии уровня тейк-профита.
EP_Dot_Long Цвет точки входа для длинной позиции.
EP_Dot_Short Цвет точки входа для короткой позиции.
EP_Dot_Center Цвет центральной точки на цене входа открытой сделки.
EP_Dot_Closed Цвет внешнего кольца точки входа для закрытой сделки.
CP_Dot_Center Цвет центральной точки на цене закрытия сделки.
CP_Dot_Closed Цвет внешнего кольца точки на цене закрытия сделки.
Dot_Size_12345 Выбор размера точек на графике от 1 до 5.
PL_Line_Trade_Positive Цвет соединительной линии для сделки с прибылью.
PL_Line_Trade_Negative Цвет соединительной линии для сделки с убытком.
PL_Label_Background Цвет фона меток прибыли/убытка.
PL_Label_Text_Positive Цвет текста метки прибыли/убытка при положительном результате.
PL_Label_Text_Negative Цвет текста метки прибыли/убытка при отрицательном результате.
Display_TF_Limitation________ Разделительный заголовок для группы настроек ограничения по таймфрейму; не влияет на отображение.
Display_Max_TF Максимальный таймфрейм в минутах, при превышении которого индикатор не отображается.
TF_Choices Строка со списком доступных значений таймфреймов, используемая как подсказка.
Получить полный код

Поиск по коду файла

#property strict
/*---------------------------------------------------------------------------------------------
User Notes:

This Trade Levels indicator is coded to run on MT4 Build 600+.  It shows labeled lines on the
chart for trade entries (EP), at the average level of the entries (AV), and at the levels
selected to take profit (TP) and stop loss (SL).  And it displays Profit/Loss (PL) labels for
the open parts of the trade and for the closed parts of the trade.  Everything is based on
MT4 orders executed.  Summaries of the features are as follows.  Details are further below.

Displaying EP Levels -
   You can select to show EP Levels lines and labels.  The Level lines span the chart to the
   current candle, followed by the Level labels which include the EP number, price and
   quantity of units of the lot type input.  If you display the labels for the EP Level lines,
   the AV, TP and SL lines will shift to the right to maintain good visibility.  You can show
   the EP Level line a full line,or as a short mini-line or "tab".

Displaying Price Dots and Lines -
   For open trades you can show lines connecting the EPs to the current appropriate bid/ask
   price, color coded to represent if the trade is in profit or loss.  You can show at each
   entry price a Dot color coded to represent if the trade is long or short.  When the trade
   is closed the Dot is ringed with the color selected for closed trade rings.  This enables
   you to easily see, if a number of trade components remain active but some have been closed,
   which are the closed ones and which remain open.  The input "Dot_Size_12345" provides 5 Dot
   sizes to select from.

Displaying the AV Line -
   For open trades an AV Line is displayed.  It shows the rounded off average price for all
   open orders (even if varying in size), the number of open orders (separate EP events), and
   the number of open units of the type input.  You can show the AV Level line as a full line,
   or as a short mini-line or "tab".

Displaying TP and SL Lines -
   For open trades the TP and SL lines associated with the MT4 orders are displayed.  You can
   override these values by putting other values into the External Inputs.  You might do this
   to temporarily to help you decide the values to place with your MT4 orders.  An asterisk
   appears in the TP and SL labels when you are displaying your override values as a reminder
   they are not the values derived from the MT4 orders.  You can show the TP/SL Level line as
   full line, or as a short mini-line or "tab".  The pips displayed at TP/SL are the rounded
   off total pips of all the open units of your EPs of the type unit selected.  When the TP/SL
   is reached and the trade closes, the closed trade P/L might display differently from what
   the open trade PL label showed due to the rounding of the final average price which can
   involve some units closing at different, and sometimes better prices than intended.

Displaying Open Trade PL Label -
   For open trades the PL Label can be displayed in the lower left or right corner of the main
   chart window, or in the upper right corner of the first subwindow.  The label shows the
   number of discrete EPs made, the total number of open units of the size input, the average
   pips PL for each of these open units, and the total pips PL for these units.  You can also
   include monies PL and the percentage of account PL in the label.  The label text changes
   colors between green and red for profit/loss in pips, not in monies.  You can have a green
   text label with a few pips profit, but still be down in monies due to commissions/swaps.
   Be advised that the MT4 account "Profit" shown under the MT4 "Trade" tab might or might not
   already include adjustments for any commissions and/or swaps. Some brokers show "Profit"
   as gross profit (before any adjustments) and some show this as net, or partial net profit
   (after all, or after some adjustments).  You will have to delve into this on your own.
   This indicator will display the gross profit as "Monies".  You can then adjust by setting
   the External Inputs to adjust "Monies" for commissions and/or swaps.  Remember, swaps can
   be either a positive or a negative value.

Displaying a Closed Trade -
   You must specify the number of minutes backwards from current time within which you wish to
   display all closed trades.  There are two way to do this:
   1. The simple way is to input the number of minutes to "__Simple_Lookback_Time_Span", which
      by default is already set for one hour, an input of "60" minutes.
   2. The exacting method is to set the year/month/day/hour/minutes for the start or end, or
      both the start and end of the period for which you want closed trades to display.  This
      method takes precedence over any value entered for the "__Simple_Lookback_Time_Span".
      These start/end inputs must be in their default state (yyyy.mm.dd hh:mm) for the simple
      method to work.  You can copy & paste the "yyyy.mm.dd hh:mm" (provided in the External
      Inputs) to these start/end inputs to return them to their default state.

   All the trades closed within the set time span will be displayed.  You can display them
   either of two ways:
   1. Show all trades as one group of trades with one PL label:
      To do this, set "__Show_Separate_Trade_Groups" to "false" (it is "true" by default).
   2. Show all trades as separately grouped with each group having a PL label:
      To do this, set "__Show_Separate_Trade_Groups" to "true".  You must also define how to
      separate the groups.  This is done by specifying a minimum time span between the last
      closed trade of one group and the first closed trade of the next following group.  Of
      all the groups to be shown, the time span to use is the for the two groups with the
      shortest time between those close events.  Specify the time in minutes.  Use a number
      of minutes slightly less than that minimum time span.

   Using the same inputs selected for Open trades, the Closed trades can be shown with Price
   Dots at entries and closes with connecting lines colored to show if closed with profit or
   loss.  As with the open trade PL label, the PL Label for the closed trades displays the 
   number of EPs closed, the total number of closed units of the type you input, the average 
   pips PL for the unit type, and the total pips PL for the unit type.  You can also include 
   monies PL and account percent PL, both with or without including commissions and/or swaps.

   PL Labels will appear above or below the last close price of a trade unit in the trade
   group, based on whether the unit was closed below or above its' entry price.  You can
   raise or lower the PL label by increasing or decreasing the default "30" input provided.
   There are five label height inputs allowing adjustment of PL labels for up to five separate
   trade groups.  The sequence 1-2-3-5-5 starts with the oldest trade first.  If more than
   five separate trade groups are to be shown, the oldest five can be adjusted and the more
   recent ones will have the same height as the first/oldest trade shown.  So it is better to
   limit the display of closed trades to no more than five, and best to just show one closed
   trade group at a time.

Selecting the Unit Type Input -
   The External Inputs start with "Show_Micro_Mini_Full_123" to input the unit type number
   that will determine how the units traded and the pips involved are displayed:
      1. Select "1":  Displays are in terms of micro-lots and micro-lot pips ($0.10 MOL).
      2. Select "2":  Displays are in terms of mini-lots and mini-lot pips ($1.00 MOL).
      3. Select "3":  Displays are in terms of full lots and full lot pips ($10.00 MOL).

   For example, if you input "3" for standard lots, but make an entry of a half lot
   (5 mini-lots), and price moves in your favor 10 pips, then your gain is 5 standard lot
   pips, not 10.  As another example, if you input "1" for micro-lots but make a entry of
   one mini-lot (equivalent to 10 micro-lots), and price moves 10 pips in your favor, then
   your gain is 100 micro-lot pips, not 10.

   Protecting your privacy is another feature of the unit type input.  For example, suppose
   there are three traders:
      1. This trader makes a single micro-lot trade and selects unit type "1".
      2. This trader makes a single mini-lot trade and selects unit type "2".
      3. This trader makes a single full lot trade and selects unit type "3".
   Due to the unit types selected, the three charts will display identical data, all being
   based on "1" unit traded of the unit type selected.  Anyone viewing all three charts
   will see nothing that identifies the actual unit type being traded, only that "1" unit
   has been traded. Units displayed can only be viewed as generic units because they are not
   revealed as being based on micro, mini or full lots traded.  The only way a viewer of the
   chart can know the unit type of the units shown is for the user to select to display
   PL monies in the PL Labels for open and closed trades.  Without this information, a
   viewer cannot know if units are lots with $10 pips, or mini-lots with $1.00 pips, or
   micro-lots with $0.10 pips (MOL, depending on each forex pair).

Setting Time Frames for Display of Indicator -
   The indicator can be turned on/off without removing it from the chart.  Also, you can
   select a chart TF above which this indicator will automatically not display.

Chart Properties Settings -
   For this indicator to properly display Chart properties/Common tab/chart on foreground
   must be uncheck!  If checked, then MT4 candles are on top of, and can partially or
   totally obscure the Price Dots drawn by this indicator.

                                                                    - Traderathome, 05-30-2015
-----------------------------------------------------------------------------------------------
Acknowlegements:

St3ve -        For intiating the change from manually filled datum to an MT4 orders driven
               product.  This was a milestone influence and effort, which transitioned the
               indicator from a enhancement for educational charts into a tool for traders.

qFish -        For generously devoting his time and programming skills to overhaul the core
               code of this indicator that handles the retrieval of MT4 orders for open and
               closed trades, to expand the "lookback" feature that identifies the closed
               trades to display, and to provide other indispensable features to this very
               sophisitcated and complex indicator.

traderathome - For initating the Trade Levels indicator as an aid to presenting clear trade
               charts for educational purposes, and for tailoring the upgrades to maintain
               an easy to use, eye appealing product.

----------------------------------------------------------------------------------------------
Suggested Settings:           White Chart        Black Chart

EP_Level_Label                MediumBlue         C'094,150,253'
EP_Level_Line_                MediumBlue         C'064,133,208'
AV_Level_Label                DarkOrchid         C'205,072,238'
AV_Level_Line                 DarkOrchid         MediumOrchid
SL_Level_Label                C'213,000,000'     C'250,053,048'
SL_Level_Line                 C'052,160,101'     C'226,035,035'
TP_Level_Label                C'040,123,078'     C'046,186,046'
TP_Level_Line                 C'040,123,078'     C'015,168,084'
EP_Dot_Long                   C'008,084,223'     C'028,199,255'
EP_Dot_Short                  C'232,000,000'     C'255,128,128'
EP_Dot_Center                 White              Black
EP_Dot_Closed                 Black              White
CP_Dot_Center                 Yellow             Black
CP_Dot_Closed                 Black              Yellow
PL_Line_Trade_Positive        CornflowerBlue     C'028,199,255'
PL_Line_Trade_Negative        Salmon             C'255,128,128'
PL_Label_Background           C'255,255,185'     C'226,231,150'
PL_Label_Text_Positive        C'040,123,078'     C'040,123,078'
PL_Label_Text_Negative        C'213,000,000'     C'213,000,000'

---------------------------------------------------------------------------------------------*/

#property indicator_chart_window

extern bool    Indicator_On                  = true;
extern int     Show_Micro_Mini_Full_123      = 1;
extern bool    Show_Open_Trades              = true;
extern bool    Show_Closed_Trades            = true;

extern string  Show_in_PL_Labels             = "";
extern bool    __PL_as_Percent_of_Account    = false;
extern bool    __OnlyPercent                 = true;
extern bool    ___Comissions_Adjustment      = true;
extern bool    ___Swaps_Adjustment           = true;

extern string  Show_for_Open_Trades______    = "";
extern bool    __EP_Labels                   = true;
extern bool    __EP_Price_Dots               = true;
extern bool    __EP_PL_Lines                 = true;
extern bool    ___Subordinate_PL_Lines       = false;
extern bool    __Full_EP_Level_lines         = false;
extern bool    __Full_AV_Level_lines         = false;
extern bool    __Full_SL_Level_lines         = false;
extern bool    __Full_TP_Level_lines         = false;
extern double  __Trial_SL                    = 0;
extern double  __Trial_TP                    = 0;
extern bool    __PL_Label_At_Chart_Right     = true;
extern bool    __PL_Label_In_Subwindow_1     = true;

extern string  Show_for_Closed_Trades_____   = "";
extern bool    __Price_Dots                  = true;
extern bool    __Price_Lines                 = true;
extern bool    ___Subordinate_Lines          = false;
extern int     __Simple_Lookback_Time_Span   = 60;
extern string  ___Lookback_Exact_Start_Time  = "yyyy.mm.dd hh:mm";
extern string  ___Lookback_Exact_End_Time    = "yyyy.mm.dd hh:mm";
extern string  ____Reset_via_Copy_Paste      = "yyyy.mm.dd hh:mm";
extern bool    __Show_Separate_Trade_Groups  = false;
extern int     ___Min_Minutes_Btwn_Groups    = 60;
extern int     ___PL_Label_1_Adjust_Height   = 30;
extern int     ___PL_Label_2_Adjust_Height   = 30;
extern int     ___PL_Label_3_Adjust_Height   = 30;
extern int     ___PL_Label_4_Adjust_Height   = 30;
extern int     ___PL_Label_5_Adjust_Height   = 30;

extern string  Display_Colors______________  = "";
extern color   EP_Level_Label                = C'094,150,253';
extern color   EP_Level_Line                 = C'064,133,208';
extern color   AV_Level_Label                = C'205,072,238';
extern color   AV_Level_Line                 = MediumOrchid;
extern color   SL_Level_Label                = C'250,053,048';
extern color   SL_Level_Line                 = C'226,035,035';
extern color   TP_Level_Label                = C'046,186,046';
extern color   TP_Level_Line                 = C'015,168,084';
extern color   EP_Dot_Long                   = C'028,199,255';
extern color   EP_Dot_Short                  = C'255,128,128';
extern color   EP_Dot_Center                 = Black;
extern color   EP_Dot_Closed                 = White;
extern color   CP_Dot_Center                 = Black;
extern color   CP_Dot_Closed                 = Yellow;
extern int     Dot_Size_12345                = 2;
extern color   PL_Line_Trade_Positive        = C'028,199,255';
extern color   PL_Line_Trade_Negative        = C'255,128,128';
extern color   PL_Label_Background           = C'226,231,150';
extern color   PL_Label_Text_Positive        = C'040,123,078';
extern color   PL_Label_Text_Negative        = C'213,000,000';

extern string  Display_TF_Limitation________ = "";
extern int     Display_Max_TF                = 1440;
extern string  TF_Choices                    = "1-5-15-30-60-240-1440-10080-43200";

bool     Deinitialized;
int      ordersTotal          = -1; //-1 = indy start and guarantees drawing at least once
double   Poin;                      //defined in init() to accommodate varying Point digits
string   Label_Style          = "Arial Narrow";
int      Label_Size           = 8;
string   Label_Style2         = "Courier New";
int      Label_Size2          = 9;
int      Chart_Scale;
datetime T0,T1,T2,T3,Ts,Ts1,Ts2,Tf,Tf1,Tf2;
int      cnr,W;
int      Price_Dot_Center_Size, Price_Dot_Normal_Size, Price_Dot_Ring_Size;
int      openEPs, orderType;
double   openMicroLots;
double   openTotalPips;
double   openProfit;
double   openComm,openSwap;
double   openSize;
double   openAvgPips;
double   openAvgPrice;
double   tpPrice,slPrice;
string   LOTstr,side;

int deinit()
{
   int obj_total= ObjectsTotal();
   for(int k= obj_total; k>=0; k--)
   {
      string name= ObjectName(k);
      if(StringSubstr(name,0,7)=="[Trade]") {ObjectDelete(name);}
   }
   return(0);

}

int init()
{
      // код доступен только после оплаты
   }

int start()
{
      // код доступен только после оплаты
   }

bool selectOpenFirstOrder()
{
   bool selected = false;

   for(int i=0; i<OrdersTotal(); i++)
   {
      if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
      {
         if(Symbol()==OrderSymbol() && (OrderType()==OP_BUY || OrderType()==OP_SELL)
         && OrderCloseTime()==0)
         {
            selected = true;
            tpPrice = OrderTakeProfit();
            slPrice = OrderStopLoss();
            orderType = OrderType();
            break;
         }
      }
   }

   return(selected);
}

void applyChartScale()
{

   T0=Time[0]; //all lines (anchor point)
   if(Chart_Scale == 0)
   {
      T1=Time[0]+(Period()*60*14);
      T2=Time[0]+(Period()*60*110);
      T3=Time[0]+(Period()*60*14);
      Ts= Time[0]+(Period()*60*15);
      Tf= Time[0]+(Period()*60*26);
      Ts2= Time[0]+(Period()*60*114);
      Tf2= Time[0]+(Period()*60*127);
   }
   else if(Chart_Scale == 1)
   {
      T1=Time[0]+(Period()*60*7);
      T2=Time[0]+(Period()*60*55);
      T3=Time[0]+(Period()*60*7);
      Ts= Time[0]+(Period()*60*7);
      Tf= Time[0]+(Period()*60*13);
      Ts2= Time[0]+(Period()*60*57);
      Tf2= Time[0]+(Period()*60*65);
   }
   else if(Chart_Scale == 2)
   {
      T1=Time[0]+(Period()*60*5);
      T2=Time[0]+(Period()*60*29);
      T3=Time[0]+(Period()*60*5);
      Ts= Time[0]+(Period()*60*5);
      Tf= Time[0]+(Period()*60*8);
      Ts2= Time[0]+(Period()*60*30);
      Tf2= Time[0]+(Period()*60*34);
   }
   else if(Chart_Scale == 3)
   {
      T1=Time[0]+(Period()*60*3);
      T2=Time[0]+(Period()*60*15);
      T3=Time[0]+(Period()*60*3);
      Ts= Time[0]+(Period()*60*3);
      Tf= Time[0]+(Period()*60*5);
      Ts2= Time[0]+(Period()*60*15);
      Tf2= Time[0]+(Period()*60*18);
   }
   else if(Chart_Scale == 4)
   {
      T1=Time[0]+(Period()*60*2);
      T2=Time[0]+(Period()*60*8);
      T3=Time[0]+(Period()*60*2);
      Ts= Time[0]+(Period()*60*2);
      Tf= Time[0]+(Period()*60*3);
      Ts2= Time[0]+(Period()*60*8);
      Tf2= Time[0]+(Period()*60*9);
   }
   else if(Chart_Scale == 5)
   {
      T1=Time[0]+(Period()*60*2);
      T2=Time[0]+(Period()*60*5);
      T3=Time[0]+(Period()*60*2);
      Ts= Time[0]+(Period()*60*2);
      Tf= Time[0]+(Period()*60*3);
      Ts2= Time[0]+(Period()*60*5);
      Tf2= Time[0]+(Period()*60*6);
   }

   return;
}

void drawOpenTradeEPs()
{
   openEPs = 0;
   string EPstr;
   int epNum = 1;

   for(int i=0; i<OrdersTotal(); i++)
   {
      if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
      {
         if(Symbol()==OrderSymbol() && (OrderType()==OP_BUY || OrderType()==OP_SELL))
         {

            if(OrderType()==OP_BUY) {side = " Long ";}
            else  {side = " Short";}

            double lots = 100* OrderLots();
            string size;
            if(Show_Micro_Mini_Full_123 == 1)
            {
               size = DoubleToStr(lots,2);
            }
            else if(Show_Micro_Mini_Full_123 == 2)
            {
               size = DoubleToStr(lots/10,2);
            }
            else if(Show_Micro_Mini_Full_123 == 3)
            {
               size = DoubleToStr(lots/100,2);
            }
            size = strRepeat("0",6-StringLen(size))+size;

            double openPrice = OrderOpenPrice();
            string zeroPad = ternaryStr(epNum<10,"0","");

            if(__EP_Labels)
            {
               int R = true;
               string epLine = StringConcatenate("[Trade] EP ",zeroPad,epNum," Level Line");
               if(__Full_EP_Level_lines)
       

Показано первые 50% кода (символов: 33307)

Открыть по тарифу

Купите тариф с пакетом открытий или войдите, если тариф уже есть. Открытый файл останется в вашем кабинете навсегда.

Разовая покупка файла

На этой странице откроется полный исходный код файла вместо ознакомительного фрагмента.

Чтобы оформить заказ, введите email и перейдите к оплате.

Стоимость полного кода
3 330,70₽ ≈ $40.71