Author: Copyright � 2009, ������� �������
!Writer
1 Views
0 Downloads
0 Favorites
!Writer
//+------------------------------------------------------------------+
//|                                                 SetMainDupel.mq4 |
//|                                Copyright © 2009, Ñåðãååâ Àëåêñåé |
//|                                      mailto: profy.mql@gmail.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009, Ñåðãååâ Àëåêñåé"
#property link      "mailto: profy.mql@gmail.com"

//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int start()
{
	if (!GlobalVariableCheck("DupelSync")) GlobalVariableSet("DupelSync", 0); // ñîçäà¸ì, åñëè íåò
	int n=GlobalVariablesTotal();
	for (int i=0; i<n; i++)
	{
		string name=GlobalVariableName(i);
		string st=StringSubstr(name, 0, 10);
		if (st=="DupelSync_")
		{
			if (name=="DupelSync_"+Symbol()+Period()) GlobalVariableSet(name, 1);
			else GlobalVariableSet(name, -1);
		}
	}
	return(0);
}
//+------------------------------------------------------------------+

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 ---