Ask! - page 57

 
codersguru:
Maratha, To locate lesson 2 (And other old lessons) you have to change the option From The-->Last month to Last 2 months in your "Display Options".

I'm sorry... I guess I'm just a bit slow. Where exactly are these display options? I really need to find ALL your lessons from the very beginning. Can ANYONE direct me plz..........

 

Is there a simple way to get a .csv file located in a remote server?

I know how to call it if its located in local filesystem, with Fileopen, but if I put a remote address it wont work.

 

This dll is exactly to do that:

https://www.mql5.com/en/forum/176725

If you call the function first time, the url is addedd to a queue pending to be processed and returns ""

When finally the url is fully downloaded, data is returned instead of empty string.

You must be sure that dll is allowed in your indicator/Ea.

slope:
Is there a simple way to get a .csv file located in a remote server? I know how to call it if its located in local filesystem, with Fileopen, but if I put a remote address it wont work.
 

applying iCustom on iCustom

How to make the indicators ( applying iCustom on iCustom ) for example, using braintrading1sig or braintrading1stop to custom indicator like HMA or T3 MA by easiest? Its problem for editing the indicator braintrading1sig source code to calculate from the value of HMA,T3 MA or another custom MAs, not calculate from the current price bars. Thanks for helping

 

Getting Started

I'm writing my first EA from nearly scratch after successfully making a few mods to an EA found on the web. I'm puzzled by an error statement I get when I run the code through the compiler.

The code is:

//=====================================

int start()

if(OrdersTotal()<1) {

OrderSend(Symbol(),OP_BUY,Lotsi,Ask,slippage,-25*Point,25*Point,0,0,0,Blue);

Clotsi = Lotsi;

return(0);

}

//=====================================

The error message is:

"if" - semicolon expected

//=====================================

I have tried placing a semicolon at several different locations but get the same message. At this point in time I have only one "if" statement in the EA --- more will follow if I get past this point.

I'm it must be something simple, but I can't figure it out from the examples in the manual another info I have found thus far.

Any help you can offer is appreciated.

 

maybe an opening brace, "{", after "start()" ?

 
Raft:
I'm writing my first EA from nearly scratch after successfully making a few mods to an EA found on the web. I'm puzzled by an error statement I get when I run the code through the compiler.

The code is:

//=====================================

int start()

if(OrdersTotal()<1) {

OrderSend(Symbol(),OP_BUY,Lotsi,Ask,slippage,-25*Point,25*Point,0,0,0,Blue);

Clotsi = Lotsi;

return(0);

}

//=====================================

The error message is:

"if" - semicolon expected

//=====================================

I have tried placing a semicolon at several different locations but get the same message. At this point in time I have only one "if" statement in the EA --- more will follow if I get past this point.

I'm it must be something simple, but I can't figure it out from the examples in the manual another info I have found thus far.

Any help you can offer is appreciated.

Post your whole code here, so we can read it and point you the place to put semicolon.

 
ralph.ronnquist:
maybe an opening brace, "{", after "start()" ?

Thanks, ralph.

The opening brace solved the problem.

 

T3 TRIX of MA

I need modification of indicator T3 TRIX to read the value from indicator Moving Averages (iMA). I very expecting for your help

Files:
 

EA is complete but does not run

Ralph & Kalenzo, thanks for your reponse a couple days ago.

I have completed the EA and it clears the compiler with no errors and loads successfully in the stategy tester, but does not produce any results. Any thoughts?

Here is the entire code, but first let me say I have no illusions as whether this EA can produce a profit. I am simply trying to write an EA start to finish get it to run. This EA is a modified version of the Blessing strategy with a d'Alembert money managemenet system instead of the Martingale MM.

extern int Rungsi = 20;

extern int slippage = 5;

extern double Lotsi = 0.1;

extern int stoploss = 25;

extern int takeprofit = 25;

extern string Note1 = "Valid TimeFrames: 1, 5, 15, 30, 60, 240, 1440, 10080, 43200";

int Wcnt = 0;

int Lcnt = 0;

int cnt = 0;

double Clotsi = 0;

double Lucnt = 0;

bool EnableTrading = true;

double PipValue = 0;

string text2 = "";

string text = "";

//+------------------------------------------------------------------+

//+------------------------------------------------------------------+

int init()

{

return(0);

}

//+------------------------------------------------------------------+

int deinit()

{

return(0);

}

//+------------------------------------------------------------------+

int start()

{

if(OrdersTotal()<1){

OrderSend(Symbol(),OP_BUY,Lotsi,Ask,slippage,stoploss,takeprofit,0,0,0,Blue);

Clotsi = Lotsi;

return(0);

}

else

OrderSelect(1,SELECT_BY_POS,MODE_TRADES);

if(Bid >= OrderOpenPrice()+Rungsi*Point){

OrderClose(1,Clotsi,Bid,slippage,Blue);

if(Lcnt==0){

OrderSend(Symbol(),OP_BUY,Lotsi,Ask,slippage,stoploss,takeprofit,0,0,0,Blue);

return(0);

}

else

Wcnt=Wcnt+1;

if(Wcnt==1){

Clotsi=Lcnt;

OrderSend(Symbol(),OP_BUY,Clotsi,Ask,slippage,stoploss,takeprofit,0,0,0,Blue);

Lucnt=0;

return(0);

}

else

Lcnt=0;

Wcnt=0;

OrderSend(Symbol(),OP_BUY,Lotsi,Ask,slippage,stoploss,takeprofit,0,0,0,Blue);

return(0);

}

else

if(Bid <= OrderOpenPrice()-Rungsi*Point){

OrderClose(1,Clotsi,Bid,slippage,Blue);

Lucnt=Lucnt+Clotsi;

Lcnt=Lcnt+1;

OrderSend(Symbol(),OP_BUY,Clotsi,Ask,slippage,stoploss,takeprofit,0,0,0,Blue);

return(0);

}

else

return(0);

}

Reason: