Author: Copyright � 2007, MetaQuotes Software Corp.
PNN_v02
0 Views
0 Downloads
0 Favorites
PNN_v02
//+------------------------------------------------------------------+
//|                                                      PNN_v02.mq4 |
//|                      Copyright © 2007, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2007, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"
//open mode constants
#define READ 1
#define WRITE 2
#define READWRITE 3
//seek mode constants
#define FILE_BEGIN 0
#define FILE_CURRENT 1
#define FILE_END 2

#import "mtguru1.dll"
int    gFileOpen(string file_name,int mode);
bool   gFileWrite(int handle,string data);
bool   gFileClose(int handle);
string gFileRead(int handle,int length=0);
void   gFileSeek(int handle,int offset, int mode);
bool   gFileDelete(string file_name);
int    gFileSize(int handle);
int    SvmTrain(string, string);
int    SvmPredict(string, string, string);
#import

//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   int file = gFileOpen("c:\mt4.log",WRITE); //open the file for read and write , create it if not exist
   string write = "Open Price: " + Open[1] + " - Close Price: " + Close[1];
   gFileWrite(file,write); //write some date
   gFileClose(file); //close the file
//----
   int xx=SvmTrain("c:\heart_scale", "c:\heart_scale.model");   
   Print("SvmTrain: ",xx);     
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----
   
//----
   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 ---