try to start the full automated expert advisor

 

Hi guys,


Sorry for my noob question, but I have a problem with Fxcbs - MetaTrader.

I created a Demo account with virtual money, I'm joined to Demo server.

I attached the test MACD_Sample to the chart.

I set allow live trading without manual confirmation.

The EA is not working, it don't sell or buy.

I have the smiley, and I don't know, what is the problem.

If I allow manual confirmation, the trading window is popup, and I can allow the transactions what the EA try to do.

How can I start a totally automated EA?

 

Hi BT

Check the EA log for errors. When the smiley is up it should trade unless there was a trading error. Are you sure there was a valid signal during the period it was supposed to trade?

 
Ruptor:

Hi BT

Check the EA log for errors. When the smiley is up it should trade unless there was a trading error. Are you sure there was a valid signal during the period it was supposed to trade?


Hi,


thanks for your help, I put error handling, and i get ERROR 130 in OrderSend

my commands are:

Sell:

OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Bid+(StopLoss*Point),Bid-TakeProfit*Points,"macd signal sell",16384,0,Red);


Buy:

OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Ask-(StopLoss*Point),Ask+TakeProfit*Points,"macd signal buy",16384,0,Red);



I tried with StopLoss with 10, 100, 1000, 100000 but I always get ERROR 130 :(

The code works in tester, but I get error when i run my EA on the market.


Can u help me, what is the problem?


thanks,

Marton

 

There are many threads on the forum dealing with error 130. Please, please help us to help you by starting to search the forum before posting.


Meanwhile, try changing "Points" to "Point" in your TakeProfit calculations.


Let me know how you get on with that.


CB

 
cloudbreaker:

There are many threads on the forum dealing with error 130. Please, please help us to help you by starting to search the forum before posting.


Meanwhile, try changing "Points" to "Point" in your TakeProfit calculations.


Let me know how you get on with that.


CB

ARGH.. missspelling...


but, I get an another bug
I get points with : Points = MarketInfo (Symbol(), MODE_POINT);

but, I get 0. so my Points = 0 :(

How can I get the correct points?


My init:


int init()
{
Points = MarketInfo (Symbol(), MODE_POINT);
return(0);

}


Thanks for help,


Marton

 

Further to what CB rightly says...


just use the predefined variable Point

unless you use other than default chart - then MarketInfo(<someSymbolPairNameString>,MODE_POINT) is only way.

.

IF you say is zero because that is what you saw when using Print()...

THEN

IF you have a 3,5 digits broker you will not see what point is no matter what method used to get it.

Assumes your ccy pair is non jpy then it will be MODE_POINT=0.00001000

The 4 digits shown are all zeros, yes?

That is what Print() shows. It will not show more unless you tell it to by using DoubleToString()

Print(DoubleToString(Point),Digits);

or

Print(DoubleToString(MarketInfo(Symbol(),MODE_POINT),Digits));



hth

 

Thanks for helps,

but I can't create an order :(

of corse, the error 130 is my enemy


I create a simple program:


int start()
{
int id;
id = OrderSend(Symbol(),OP_BUY, 0.1,Ask,3,NormalizeDouble((Bid-20*Point),Digits),NormalizeDouble((Bid+Point*30),Digits), "My Buy", 9999, 0, Blue );
if ( id == -1 )Alert (GetLastError());
else Print("ID: ",id);
return;
}


I always get lots of ERROR 130 when I attach the EA to a chart.

Can somebody send a working OrderSend example? I checked in the documentation, of corse, it's not working like this :(

Reason: