Class4_EURCHF_not

Author: Copyright � 2008, MetaQuotes Software Corp.
Class4_EURCHF_not
Miscellaneous
Uses files from the file systemIt writes information to file
0 Views
0 Downloads
0 Favorites
Class4_EURCHF_not
//+------------------------------------------------------------------+
//|                                                       Class1.mq4 |
//|                      Copyright © 2008, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2008, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int start()
  {
//----
   string fn1="Class4_EURCHF_not.txt";
   string s1="";
   string cod1="";
   int max1=3;
   int nrbuy=0;
   int nrsell=0;
   FileDelete(fn1);
   for(int i=0;i<max1;i++)
   {  
     for(int j=0;j<max1;j++)
     {
       for(int k=0;k<max1;k++)
       {
         for(int l=0;l<max1;l++)
         {
           for(int m=0;m<max1;m++)
           {
             if(i==0) nrbuy++;
             if(i==1) nrsell++;           
             if(j==0) nrbuy++;
             if(j==1) nrsell++;             
             if(k==0) nrbuy++;
             if(k==1) nrsell++;             
             if(l==0) nrbuy++;
             if(l==1) nrsell++;             
             if(m==0) nrbuy++;
             if(m==1) nrsell++;           
             cod1=""+i+""+j+""+k+""+l+""+m;
             s1=""+nrbuy+" "+nrsell+" "+i+""+j+""+k+""+l+""+m+"  "+i+"-EURUSD "+j+"-EURCHF "+k+"-EURJPY "+l+"-GBPUSD "+m+"-AUDUSD";
             if((nrbuy==nrsell) || (nrbuy-1==nrsell) || (nrbuy==nrsell-1))
             if((nrbuy!=0))
             if((nrsell!=0))
             if(j==2)
               Write2(fn1,s1);
               
             s1="";
             cod1="";
             nrbuy=0;
             nrsell=0;             
           }  
         }  
       }  
     }  
   }
         
       
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
int Write2(string filename,string str)
{
//Write log file
   
   int handle; 
   handle = FileOpen(filename,FILE_READ|FILE_WRITE|FILE_CSV,"/t");
   FileSeek(handle, 0, SEEK_END);      
   //FileWrite(handle,"" + TimeToStr(CurTime(),TIME_DATE|TIME_SECONDS) + ": " + str);
   FileWrite(handle,str);
   FileClose(handle);
	//Print(str);
}

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