Author: Copyright � 2008, Nazariy S. (WWer)
Euler
Miscellaneous
It issuies visual alerts to the screen
0 Views
0 Downloads
0 Favorites
Euler
//+------------------------------------------------------------------+
//|                                                        Euler.mq4 |
//|                              Copyright © 2008, Nazariy S. (WWer) |
//|                         E-mail: nazariy@i.ua, skype: nazariy1309 |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2008, Nazariy S. (WWer)"
#property link      "E-mail: nazariy@i.ua, Skype: nazariy1309"


double Factorial(int value)
  {
   if(value<=1) return(1);
   double result=1.0;
   for(;value!=1;value--)
       result*=value;
   return(result);
  }

double getE()
  {
   double e=0.0;
   for(int n=0; n<12; n++)
       e+=1/Factorial(n);
   return(e);
  }

//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int start()
  {
//----
   Alert(DoubleToStr(getE(),8));
//----
   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 ---