Download MetaTrader 5

PLEASE HELP...How To Get Value From Indicator

To add comments, please log in or register
issar_abubakar
44
issar_abubakar  

Hi, may I please get some help with this. The #4x3 semafor alert indicator has been the pride of my trading, it has helped me a lot in getting my trades to the next level, not only with the accurate and fast alerts but also with how clear and simple it is. I would there like to automate my trades through the creation of an expert advisor and hopefully learn a thing or two in the process.

Can you help me be able to retrieve the values of the above indicator when the various circles with different colors appear. I would like to create an EA that takes advantage of this formations and performs a certain action.

I know how to code, but I have not been able to find a way of getting the values from the indicator to the EA.. how do i do it?

The indicator is in mq4 format so you can view the code..

help me, please..

Files:
whroeder1
16102
whroeder1  
issar_abubakar: Can you help me be able to retrieve the values of the above indicator
  1. Help you with what? You haven't stated a problem. learn to code it, or pay (Freelance) someone to code it. 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.
  2. Just get the value of the indicator into the EA and do what you want with it. You should write a self documenting function instead of calling iCustom directly, see Detailed explanation of iCustom - MQL4 forum
issar_abubakar
44
issar_abubakar  
whroeder1:
  1. Help you with what? You haven't stated a problem. learn to code it, or pay (Freelance) someone to code it. 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.
  2. Just get the value of the indicator into the EA and do what you want with it. You should write a self documenting function instead of calling iCustom directly, see Detailed explanation of iCustom - MQL4 forum

Thank you for the fast reply, Well appreciated but I won't lie to you I have been going through and through a list of articles and previously written code, but nothing has clicked for me.

My problem:



I would like the "#4x3 Semaphor indicator to send my Expert Advisor a value which I will then assign to a variable and use this variable to open and close trades based on the type of value received through an if or while statement.

For example if the big yellow sun like shape appears, I would request the indicator i.e double my_value = iCustom(Symbol(),0,"#4X 3 Semafor");

I know that the code is incorrect, that's why I need your help: How do I get the exact value for when the big sun like shape occurs or the small yellow circle, and how will I be able to identify this value from the others. N/B "The others" are marked with a no and a cross while the "small yellow circle" and "sun like shape" are marked with a yes.

i.e what values will I use to represent the occurrence of the shapes - This values will be declared in the EA and compared against the value returned by the indicator

This section of the code is the hardest for me cause this is not a normal indicator and was written by someone else who posted it in forex factory for free use, I am completely blank on the methods on how to call the indicator and get the specific values asked, it was pretty easy to learn how the alerts work in the indicator itself but I guess this is because all the indicators are assigned by functions that are already within the indicator:

For example by my understanding when the big sun appears the indicator checks if the BUFFER "FP_BuferUp[] " of the current candle or time is not set to 0 by the function "countzz", because zero means that the shape didn't appear.

I believe that the reason as to why you have the knowledge today is because you too - took your time to learn, Yes I can hire someone to code this for me but that will only take me down than pull me up cause if any thing goes wrong I won't be able to fix it and will continually lose money.

I hope my problem is interesting enough for you to help me...

Algorithm

1. Call indicator and assign return value to variable

2. Compare variable to a set of predefined values that correspond to the shapes or the instance of the appearance of the shapes.i.e event that occurs when shape forms.

How do I do this?

Meng Yin Teoh
1627
Meng Yin Teoh  
issar_abubakar:

Thank you for the fast reply, Well appreciated but I won't lie to you I have been going through and through a list of articles and previously written code, but nothing has clicked for me.

My problem:



I would like the "#4x3 Semaphor indicator to send my Expert Advisor a value which I will then assign to a variable and use this variable to open and close trades based on the type of value received through an if or while statement.

For example if the big yellow sun like shape appears, I would request the indicator i.e double my_value = iCustom(Symbol(),0,"#4X 3 Semafor");

I know that the code is incorrect, that's why I need your help: How do I get the exact value for when the big sun like shape occurs or the small yellow circle, and how will I be able to identify this value from the others. N/B "The others" are marked with a no and a cross while the "small yellow circle" and "sun like shape" are marked with a yes.

i.e what values will I use to represent the occurrence of the shapes - This values will be declared in the EA and compared against the value returned by the indicator

This section of the code is the hardest for me cause this is not a normal indicator and was written by someone else who posted it in forex factory for free use, I am completely blank on the methods on how to call the indicator and get the specific values asked, it was pretty easy to learn how the alerts work in the indicator itself but I guess this is because all the indicators are assigned by functions that are already within the indicator:

For example by my understanding when the big sun appears the indicator checks if the BUFFER "FP_BuferUp[] " of the current candle or time is not set to 0 by the function "countzz", because zero means that the shape didn't appear.

I believe that the reason as to why you have the knowledge today is because you too - took your time to learn, Yes I can hire someone to code this for me but that will only take me down than pull me up cause if any thing goes wrong I won't be able to fix it and will continually lose money.

I hope my problem is interesting enough for you to help me...

Algorithm

1. Call indicator and assign return value to variable

2. Compare variable to a set of predefined values that correspond to the shapes or the instance of the appearance of the shapes.i.e event that occurs when shape forms.

How do I do this?


https://www.mql5.com/en/docs/indicators/icustom
Documentation on MQL5: Technical Indicators / iCustom
Documentation on MQL5: Technical Indicators / iCustom
  • www.mql5.com
Technical Indicators / iCustom - Reference on algorithmic/automated trading language for MetaTrader 5
To add comments, please log in or register