Quite a few issues in there. Here is some stuff to get you started:
/* RDN compatibility by Jack Dowsun */ //+---------------------------+ //| Expert Cross Framework | //+---------------------------+ #property copyright "Jack Dowson" #property link "http:0123456789.com" // User Input extern double Lots = 0.1; extern int Interval=1; extern int myCCIs=30; // 5 days extern int myCCIl=150; // 25 days // Global scope double barmove0 = 0; double barmove1 = 0; int itv = 0; double Poin; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //|------------------------------------------------------------------| int init() { //Checking for unconvetional Point digits number if (Point == 0.00001) Poin = 0.0001; //5 digits else if (Point == 0.001) Poin = 0.01; //3 digits else Poin = Point; //Normal itv=Interval; return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { bool found=false; bool rising=true; bool falling=true; bool cross=true; double cCIs; double cCIm; double cCIf; int cnt=; // give it a value or remove the = sign... but you don't use this variable anyway? // Error checking if(AccountFreeMargin()<(1000*Lots)) {Print("-----NO MONEY"); return(0);} if(Bars<100) {Print("-----NO BARS "); return(0);} if(barmove0==Open[0] && barmove1==Open[1]) { return(0);} // bars moved, update current position barmove0=Open[0]; barmove1=Open[1]; // interval (bar) counter itv+; // do you want to add 1 to the value of itv? If so, the correct syntax is itv++ // get CCI based on OPEN cCIs=iCCI(Symbol(),0,125,PRICE_OPEN,0); cCIm=iCCI(Symbol(),0, 25,PRICE_OPEN,0); cCIf=iCCI(Symbol(),0, 5,PRICE_OPEN,0); // is it crossing zero up or down if (cCIm<=0 && cCIs>=0 && cCIf>0) { rising=true; cross=true; Print("Rising Cross");} if (cCIm>=0 && cCIs<=0 && cCIf<0) {falling=true; cross=true; Print("Falling Cross");} // open orders based on cross if (cross) 0 ; // this does nothing { // this probably shouldn't be here, and is causing your compile issues return;() // this should read return(0); } //---------------------------------------------------+
/*
RDN compatibility by Jack Dowsun
*/
//+---------------------------+
//| Expert Cross Framework |
//+---------------------------+
#property copyright "Jack Dowsun"
#property link "http:123456789.com"
// User Input
extern double Lots = 0.1;
extern int Interval=1;
extern int myCCIs=30; // 5 days
extern int myCCIl=150; // 25 days
// Global scope
double barmove0 = 0;
double barmove1 = 0;
int itv = 0;
double Poin;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//|------------------------------------------------------------------|
int init()
{
//Checking for unconvetional Point digits number
if (Point == 0.00001) Poin = 0.0001; //5 digits
else if (Point == 0.001) Poin = 0.01; //3 digits
else Poin = Point; //Normal
itv=Interval;
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
bool found=false;
bool rising=true;
bool falling=true;
bool cross=true;
double cCIs;
double cCIm;
double cCIf;
// Error checking
if(AccountFreeMargin()<(1000*Lots)) {Print("-----NO MONEY"); return(0);}
if(Bars<100) {Print("-----NO BARS "); return(0);}
if(barmove0==Open[0] && barmove1==Open[1]) { return(0);}
// bars moved, update current position
barmove0=Open[0];
barmove1=Open[1];
// interval (bar) counter
itv++;
// get CCI based on OPEN
cCIs=iCCI(Symbol(),0,125,PRICE_OPEN,0);
cCIm=iCCI(Symbol(),0, 25,PRICE_OPEN,0);
cCIf=iCCI(Symbol(),0, 5,PRICE_OPEN,0);
// is it crossing zero up or down
if (cCIm<=0 && cCIs>=0 && cCIf>0) { rising=true; cross=true; Print("Rising Cross");}
if (cCIm>=0 && cCIs<=0 && cCIf<0) {falling=true; cross=true; Print("Falling Cross");}
// open orders based on cross
if (cross) 0 ;
{
// Open new order based on trend direction of cross
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,cCIm<=0 && cCIs>=0 && cCIf>0,16384,0,Green);
if(ticket>0)
ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,cCIm>=0 && cCIs<=0 && cCIf<0,16384,0,Red);
if(ticket>0)
//---------------------------------------------------+
I make a few changes but its make the same mistake when i compile it
You're posting incomplete code, so I'm not entirely sure what you expect.
Also, please use the SRC button on the toolbar when you post code.
You also might find this link and this link useful.
/* RDN compatibility by Jack Dowsun */ //+---------------------------+ //| Expert Cross Framework | //+---------------------------+ #property copyright "Jack Dowsun" #property link "http:123456789.com" // User Input extern double Lots = 0.1; extern int Interval=1; extern int myCCIs=30; // 5 days extern int myCCIl=150; // 25 days // Global scope double barmove0 = 0; double barmove1 = 0; int itv = 0; double Poin; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //|------------------------------------------------------------------| int init() { //Checking for unconvetional Point digits number if (Point == 0.00001) Poin = 0.0001; //5 digits else if (Point == 0.001) Poin = 0.01; //3 digits else Poin = Point; //Normal itv=Interval; return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { bool found=false; bool rising=true; bool falling=true; bool cross=true; double cCIs; double cCIm; double cCIf; // Error checking if(AccountFreeMargin()<(1000*Lots)) {Print("-----NO MONEY"); return(0);} if(Bars<100) {Print("-----NO BARS "); return(0);} if(barmove0==Open[0] && barmove1==Open[1]) { return(0);} // bars moved, update current position barmove0=Open[0]; barmove1=Open[1]; // interval (bar) counter itv++; // get CCI based on OPEN cCIs=iCCI(Symbol(),0,125,PRICE_OPEN,0); cCIm=iCCI(Symbol(),0, 25,PRICE_OPEN,0); cCIf=iCCI(Symbol(),0, 5,PRICE_OPEN,0); // is it crossing zero up or down if (cCIm<=0 && cCIs>=0 && cCIf>0) { rising=true; cross=true; Print("Rising Cross");} if (cCIm>=0 && cCIs<=0 && cCIf<0) {falling=true; cross=true; Print("Falling Cross");} // open orders based on cross if (cross) 0 ; // what are you trying to do here? { // Open new order based on trend direction of cross ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,cCIm<=0 && cCIs>=0 && cCIf>0,16384,0,Green); // you haven't declared what ticket is if(ticket>0) // what are you trying to do here? ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,cCIm>=0 && cCIs<=0 && cCIf<0,16384,0,Red); if(ticket>0) // and again here // where does this if statement finish? // where does start() finish? //---------------------------------------------------+
int start() { //WHERE IS THE CLOSING BRACKET FOR THIS bool found=false; bool rising=true; bool falling=true; bool cross=true; double cCIs; double cCIm; double cCIf; // Error checking if(AccountFreeMargin()<(1000*Lots)) {Print("-----NO MONEY"); return(0);} if(Bars<100) {Print("-----NO BARS "); return(0);} if(barmove0==Open[0] && barmove1==Open[1]) { return(0);} // bars moved, update current position barmove0=Open[0]; barmove1=Open[1]; // interval (bar) counter itv++; // get CCI based on OPEN cCIs=iCCI(Symbol(),0,125,PRICE_OPEN,0); cCIm=iCCI(Symbol(),0, 25,PRICE_OPEN,0); cCIf=iCCI(Symbol(),0, 5,PRICE_OPEN,0); // is it crossing zero up or down if (cCIm<=0 && cCIs>=0 && cCIf>0) { rising=true; cross=true; Print("Rising Cross");} if (cCIm>=0 && cCIs<=0 && cCIf<0) {falling=true; cross=true; Print("Falling Cross");} // open orders based on cross if (cross) 0 ; { //WHERE IS THE CLOSING BRACKET FOR THIS // Open new order based on trend direction of cross ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,cCIm<=0 && cCIs>=0 && cCIf>0,16384,0,Green); if(ticket>0) ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,cCIm>=0 && cCIs<=0 && cCIf<0,16384,0,Red); if(ticket>0) // if(ticket>0) what??????
Play video | Please edit your post. For large amounts of code, attach it. |
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
//---------------------------------------------------+
Its make two errors when im compile it
'}' - unexpected end of program RDN EXPERT 105.mq4 92 5
'{' - unbalanced parentheses RDN EXPERT 105.mq4 53 12