发表于:2011-01-14 06:25只看该作者
2楼
//+------------------------------------------------------------------+
//| sell0.1.mq4 |
//| Copyright ?2004, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2004, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net/"
#include
#include
//+------------------------------------------------------------------+
//| script "trading for all money" |
//+------------------------------------------------------------------+
int start()
{
//----
if(MessageBox("Do you really want to SELL 0.1 "+Symbol()+" at BID price? ",
"Script",MB_YESNO|MB_ICONQUESTION)!=IDYES) return(1);
//----
int ticket=OrderSend(Symbol(),OP_SELL,0.1,Bid,30,0,0
,"expert comment",255,0,CLR_NONE); if(ticket<1) { int error=GetLastError(); Print("Error = ",ErrorDescription(error)); return; } //---- OrderPrint(); return(0); } //+------------------------------------------------------------------+ MT4的脚本代码改改就可以了,再设置一下快捷键可以满足你的要求
,"expert comment",255,0,CLR_NONE); if(ticket<1) { int error=GetLastError(); Print("Error = ",ErrorDescription(error)); return; } //---- OrderPrint(); return(0); } //+------------------------------------------------------------------+ MT4的脚本代码改改就可以了,再设置一下快捷键可以满足你的要求
处理当下的行情!
3楼
太感谢了!可是,我不是很懂,从上面看出开仓好象是需要确认,我这功能不地需要确认,按下就开仓或平仓。F4开多,F5开空F6清仓。而且指定是欧元,当然可以改吧.这个不是自动交易,用处是用来炒单。
韬客社区www.talkfx.co