View Single Post
  #1 (permalink)  
Old 11-30-2005, 08:52 PM
knvsantosh knvsantosh is offline
Member
 
Join Date: Nov 2005
Location: India
Posts: 51
knvsantosh is on a distinguished road
Exclamation Indicator is not working why?

hello traders,
i have one metatrader mq4 script that is buy script i post that script this is not working in metatrader software so tell me what is the problem in that indicator.

Quote:
//+------------------------------------------------------------------+
//| Buy.mq4 |
//| Copyright © 2004, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#include <stdlib.mqh>
#property copyright "Copyright © 2004, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net/"
//+------------------------------------------------------------------+
//| script "trading for all money" |
//+------------------------------------------------------------------+
int start()
{
int ticket;
//----
while(true)
{
ticket=OrderSend(Symbol(),OP_BUY,1.0,Ask,3,Ask-20*Point,0,"expert comment",255,0,CLR_NONE);
if(ticket<=0)
{
int error=GetLastError();
Print("Error = ",ErrorDescription(error));
if(error==134) break; // not enough money
if(error==135) RefreshRates(); // prices changed
break;
}
//---- remove break statement below and take trading for all money
else { OrderPrint(); break; }
//---- 10 seconds wait
Sleep(10000);
}
//----
return(0);
}
//+------------------------------------------------------------------+
this is the script tell me what is the problem in the above script.

regards,
k.n.v.santosh
(keep smiling for ever)
Reply With Quote