expert advisor still outputing Alerts and print when deleted.

 

Hi,

I've created my first expert advisor. I have also created some simple test experts to see how they run. For example I created an EA that count the number of new quotes coming through and prints this number each time in the experts window as well as in the alert.

My problem is, when I remove this "tester" EA from the chart, it still seems to be printing on the EA window and alerting me of the tick counts. Why is it doing this? I also then deleted the EA entirely from the experts directory and it still does this.

It is annoying since it clogs up the print window and alert window and I cannot "see" how the real EA is performing (whether it entered a position or not).

I'm probably doing something stupid, as not used to this.

thanks in advance,

Gerry.

 

You have one running on another chart (probably hidden or minimized.)

If you've deleted the .ex4 then close/reopen the terminal. it won't be able to load it.

 

Thanks WHRoeder,


You were right. Problem was I had a bundle of chart windows open. I deleted them all, and also deleted the .ex4 of expert advisors i didn't want and now nothing appears on the experts messages.

All is good. Thanks for your help.


best,


G.
 
14967057:

Thanks WHRoeder,


You were right. Problem was I had a bundle of chart windows open. I deleted them all, and also deleted the .ex4 of expert advisors i didn't want and now nothing appears on the experts messages.

All is good. Thanks for your help.


best,


G.


Hi WHRoeder,

I have another problem. I have succesfully created an EA that I have attached to EurUsd chart. It runs successfully on the strategy tester taking a bunch of trades but when I run it on the live (demo) account it will not work. It returns the

error "error 130" which I understand to mean the stop or target is too tight. The function "MarketInfo(Symb,MODE_STOPLEVEL)" returns the number 30 which is the minimum number of points (5th decimal of price on EurUsd) below the Bid which the stop price must be.


The ordersend function I am using is more than that and I varied this value to all different supposedly valid stop levels and the same error is returned each time.

Here is an example of ordersend function which doesn't work (it works on the strategy tester but not on live demo account) :

ticket_buy = OrderSend(Symb,OP_BUY,0.1,Ask,20,  Ask - 100*Point , Ask + 100*Point,"Pivot trade long",tradeCountL,82800,Green);

The stop here is Ask - 100*Point which I would assume is valid.

I don't see why it should work on the Strategy Tester yet not work on live account as surely the same rules apply for both.

Basically nomatter what I change "100" to above still returns an error. I tried 1000, and same erroneous result!


any thoughts much appreciated,

G.

PS the account size is about £5000

 
14967057:


Hi WHRoeder,

I have another problem. I have succesfully created an EA that I have attached to EurUsd chart. It runs successfully on the strategy tester taking a bunch of trades but when I run it on the live (demo) account it will not work. It returns the

error "error 130" which I understand to mean the stop or target is too tight. The function "MarketInfo(Symb,MODE_STOPLEVEL)" returns the number 30 which is the minimum number of points (5th decimal of price on EurUsd) below the Bid which the stop price must be.


Is your Broker an ECN Broker ?  ECN
 
RaptorUK:

Is your Broker an ECN Broker ?  ECN

Hi Raptor,


No, well I have another demo account for ECN but not concerned about it (yet). The broker I am using is GoMarkets... a market maker I suppose.


G.

 
14967057:

Hi Raptor,

No, well I have another demo account for ECN but not concerned about it (yet). The broker I am using is GoMarkets... a market maker I suppose.

G.

You need to make sure your trades comply with what is written here in regard to SL & TP,  and Entry for pending orders:  Requirements and Limitations in Making Trades
 

Your expiration date is 82800, which mean 82800 seconds or 23 minutes. It should be 23 minutes from now or  TimeCurrent() + 82800. 

But I don;t think GOMarket accepting expiration date, so actually it should be = zero. 

 

Hi Raptor and phi.nuts,



I realised, given what you said Raptor that ECN's don't allow non-zero stop and target values in their order function (I assume so). So I realised this is my problem here. I tried replaced with zero values and it worked.

I then used the OrderModify function to add a stop and target so it works good (well I'm sure it should). Phi, thanks for that as well. The ordersend still works though when I still have the 82800 value present there for order expiration

even though it has no purpose for me!

Another thing is, is it possible to retrieve prices of another currency pair than the one where the EA is attached? I mean, I have an EA on EurUsd 60 min chart but I'd like to know say the EurGBP price.

Is it possible to pull such information within the EA attached to the EURUSD chart?


Thanks both,


G



 
14967057:


Another thing is, is it possible to retrieve prices of another currency pair than the one where the EA is attached? I mean, I have an EA on EurUsd 60 min chart but I'd like to know say the EurGBP price.

Is it possible to pull such information within the EA attached to the EURUSD chart?


Yes . . .  for Bid and Ask you can use the MarketInfo() function with MODE_BID & MODE_ASK  for bar information you can use iOpen(), iClose(), iHigh() & iLow()  
 

Thanks again Raptor...exactly what I needed!


G

Reason: