为了可以自己亲手写EA----学习贴7
预处理程序<>定义常数
#define identifier_value
常数可以是任何类型的,常数在程序中不可更改。
示例:</P>
< >#define ABC 100
#define PI 0.314
#define COMPANY_NAME "MetaQuotes Software Corp."</P>
< >
编译参数定义
#property identifier_value
示例:</P>
< >#property link "http://www.metaquotes.net"
#property copyright "MetaQuotes Software Corp."
#property stacksize 1024</P>
< >以下是所有的参数名称: </P>
< >参数名称</P>
< >类型</P>
< >说明</P>
< >link </P>
< >string </P>
< >设置一个链接到公司网站</P>
< >copyright </P>
< >string </P>
< >公司名称</P>
< >stacksize </P>
< >int </P>
< >堆栈大小</P>
< >indicator_chart_window </P>
< >void </P>
< >显示在走势图窗口</P>
< >indicator_separate_window </P>
< >void </P>
< >显示在新区块</P>
< >indicator_buffers </P>
< >int </P>
< >显示缓存最高8</P>
< >indicator_minimum </P>
< >int </P>
< >图形区间最低点</P>
< >indicator_maximum </P>
< >int </P>
< >图形区间最高点</P>
< >indicator_colorN </P>
< >color </P>
< >第N根线的颜色,最高8根线</P>
< >indicator_levelN </P>
< >double </P>
< >predefined level N for separate window custom indicator</P>
< >show_confirm </P>
< >void </P>
< >当程序执行之前是否经过确认</P>
< >show_inputs </P>
< >void </P>
< >before script run its property sheet appears; disables show_confirm property </P>
<>
嵌入文件
#include
示例:</P>
< >#include </P>
< >#include "file_name"
示例:</P>
< >#include "mylib.h"</P>
< >
引入函数或其他模块
#import "file_name"
func1();
func2();
#import
示例:</P>
< >#import "user32.dll"
int MessageBoxA(int hWnd,string lpText,string lpCaption,
int uType);
int MessageBoxExA(int hWnd,string lpText,string lpCaption,
int uType,int wLanguageId);
#import "melib.ex4"
#import "gdi32.dll"
int GetDC(int hWnd);
int ReleaseDC(int hWnd,int hDC);
#import</P>
< > </P> 鉴定完毕.! 小生对楼主之仰慕如滔滔江水连绵不绝,海枯石烂,天崩地裂,永不变心. 我的啦嘿嘿 我帮你 喝喝 现在越做月亏啊 我在顶贴~!~ 感谢分享 回复补血~~~~~ 看看,看看。谢谢。你要发,我也要发。