convert simple metatrader ea to to ctrader

Created at 22 Jun 2019
GI

giovanni_bruno

Joined 21.06.2019

Status

Open


Budget

30.00 USD


Payment Method

via  Freelancer

Job Description

#import "c:\EURUSD.dll"   
   int set_bid1(int);
   int set_ask1(int);
#import
extern int sleep=10;
string Pair1="EURUSD";//Cross1 
string suf,shorName;
int init()
{
  EventSetMillisecondTimer(sleep);
  if (StringLen(Symbol())>6){  string suf=StringSubstr(Symbol(), 6, StringLen(Symbol()));} 
  return(0);
}
void OnTimer()
  {
	if(!IsDllsAllowed())Alert(" Enable DLL ");  
/* 
 datetime ExpireTime=D'2019.06.27';
  if(TimeCurrent()>=ExpireTime)
  {
      ObjectsDeleteAll(ChartID(),0);
      Comment("EA has been expired, please contact bfxsuarl@gmail.com ");
      return;
  }
   */   
      Comment("Working..."+Hour()+":"+Minute()+":"+Seconds());
      RefreshRates();      
      set_bid1(MarketInfo(Pair1+suf,MODE_BID)/MarketInfo(Pair1+suf,MODE_POINT));
      set_ask1(MarketInfo(Pair1+suf,MODE_ASK)/MarketInfo(Pair1+suf,MODE_POINT));
      set_time(TimeGMT());   
   return(0);
}

script send quote pair selected to .dll

Comments
Log in to add a comment.
No comments found.