Author: Copyright 2020, MrBrooklin
Price Data Components
Series array that contains open time of each bar
Miscellaneous
It issuies visual alerts to the screen
0 Views
0 Downloads
0 Favorites
New_bar
ÿþ//+------------------------------------------------------------------+

//|                                                      New_bar.mq5 |

//|                                       Copyright 2020, MrBrooklin |

//|                         https://www.mql5.com/ru/users/mrbrooklin |

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

#property copyright   "Copyright 2020, MrBrooklin"

#property link        "https://www.mql5.com/ru/users/mrbrooklin"

#property description "@>AB0O DC=:F8O, >?@545;ONI0O ?>O2;5=85 =>2>3> 10@0 =0 ;N1>< B09<D@59<5."

#property description "K?>;=5=0 2 2845 A>25B=8:0. 0 3@0D8:5 2K2>48B A>>1I5=85 2 >:=5 ;5@B0."

#property version   "1.00"

/* @>AB0O DC=:F8O >?@545;O5B ?>O2;5=85 =>2>3> 10@0 =0 ;N1>< B09<D@59<5.

   K?>;=5=0 2 2845 A>25B=8:0. 0 3@0D8:5 2K2>48B A>>1I5=85 2 >:=5 ;5@B0. */

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

//| Expert tick function                                             |

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

void OnTick()

  {

   static datetime Old_Time=0; //AB0@>5 2@5<O

   datetime Time_Open_Bar=iTime(_Symbol,_Period,0); //2@5<O >B:@KB8O 10@0

   if(Old_Time!=Time_Open_Bar) //5A;8 AB0@>5 2@5<O =5 @02=> 2@5<5=8 >B:@KB8O 10@0

     {

      //2AB028< ;N1CN DC=:F8N, =0?@8<5@, Alert() 8 2K2545< B5:CI55 2@5<O B>@3>2>3> A5@25@0

      Alert("#@0! >O28;AO =>2K9 10@!",TimeTradeServer());

     }

   Old_Time=Time_Open_Bar; //7=0G8B MB> =>2K9 10@.

  }

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

Comments

Markdown supported. Formatting help

Markdown Formatting Guide

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Link [title](https://www.example.com)
Image ![alt text](image.jpg)
Code `code`
Code Block ```
code block
```
Quote > blockquote
Unordered List - Item 1
- Item 2
Ordered List 1. First item
2. Second item
Horizontal Rule ---