Download MetaTrader 5

Can you convert a Custom Indicator to an Expert Advisor?

To add comments, please log in or register
Paul
530
Paul  
I've written a Custom Indicator that does everything I wont it to do. Discovered that you can't open and close trades through a Custom Indicator. Keep getting error 4055. Attempted to convert Custom Indicator to Expert Advisor, Advisor won't run. Does anyone know how I can conert a Custom Indicator to an Expert Advisor?
nunungsubarja
147
nunungsubarja  
Yellowbeard:
I've written a Custom Indicator that does everything I wont it to do. Discovered that you can't open and close trades through a Custom Indicator. Keep getting error 4055. Attempted to convert Custom Indicator to Expert Advisor, Advisor won't run. Does anyone know how I can conert a Custom Indicator to an Expert Advisor?

Give a name specify your Indicator,Construct an EA then u can call your Indicator with iCustom

fbj
1047
fbj  

To fully integrate indicator code into an Expert you will need care... the following link is to the concluding article of a series.

Transferring an Indicator Code into an Expert Advisor Code. Conclusion

Paul
530
Paul  
nunungsubarja wrote >>

Give a name specify your Indicator,Construct an EA then u can call your Indicator with iCustom

Could you give an example? The name of my indicator is, Custom Indicator F. All of the conditions for opening and closing trades are determined in the indicator. I added the functions for executing the trades, but found out that you can't execute them from an Custom Indicator.

Should I create an Expert adviser to handle the OrderOpen(), OrderSend functions?

How do I call the indicator, which makes the decisions as to buying and selling, into the EA, so that the EA can make the decisions and execute the trades?

Thanks!

fbj
1047
fbj  

Consider reading the The MQL Programming Book.....! The actions you have already done show that this book and other related articles on this site - are very much needing reading by you. Got to put the work in to get the answers, yes?

The answers are massively straight forwards. The book gives examples, the link I posted shows you 100% of the HOWTO's.

Go for it friend! Is all their waiting to be discovered.

Enjoy the trip

Paul
530
Paul  
fbj wrote >>

Consider reading the The MQL Programming Book.....! The actions you have already done show that this book and other related articles on this site - are very much needing reading by you. Got to put the work in to get the answers, yes?

The answers are massively straight forwards. The book gives examples, the link I posted shows you 100% of the HOWTO's.

Go for it friend! Is all their waiting to be discovered.

Enjoy the trip

Sorry! I didn't notice the link. My mind is going in circles!

Thanks!

siraj
13
siraj  
Yellowbeard:
I've written a Custom Indicator that does everything I wont it to do. Discovered that you can't open and close trades through a Custom Indicator. Keep getting error 4055. Attempted to convert Custom Indicator to Expert Advisor, Advisor won't run. Does anyone know how I can conert a Custom Indicator to an Expert Advisor?


Hi,

I can make the expert advisor as per your indicator's signal. But for that i will charge $500. If you are agree with $500 then contact me and i will make the EA for you with your indicator. 

Simon Gniadkowski
Moderator
18058
Simon Gniadkowski  
smartsiraj:


Hi,

I can make the expert advisor as per your indicator's signal. But for that i will charge $500. If you are agree with $500 then contact me and i will make the EA for you with your indicator. 

You are almost 4 years too late . . .

 

Perhaps you missed this when you registered . . .

Look here: https://www.mql5.com/en/users/register

It says . . . "4. Posting of advertising messages is forbidden. "


Try it once more and you will be BANNED. 

Reza Rahman
21
Reza Rahman  

Dear sir,

I have an Indicator mq4.I want to convert EA.If anybody help me and convert it EA.

The EA has: a)When show Blue dot it open Buy order b) when show red dot its open sel order c) TP and SL (Customize)

d) Trailing stop (Customize) when order running profit its start Trailing stop as I set (Customize)

Thanks a lot.

Here I have attach the indicator.

Please send me: rezazyx@gmail.com

Files:
whroeder1
17122
whroeder1  

Reza Rahman: I have an Indicator mq4.I want to convert EA.

  1. Don't try do that. There are no buffers, no IndicatorCounted() or prev_calculated. No way to know if older bars have changed or been added (history update.)

    Just get the value of the indicator into the EA and do what you want with it. You should encapsulate your iCustom calls to make your code self-documenting.

  2. You have only four choices: We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using SRC) and the nature of your problem.
To add comments, please log in or register