Frankie

Retrieve Value from MT4

4 posts in this topic

#1 ·  Posted

Dear all,

I'm a newbie just 2 day coding, trying to find a way to retrieve indicator value from MT4 (such as MA, Stochastic, etc.) to trigger autoit condition. I have a question list here:

1. Is it possible to use MA 3 > MA4 (Red>Yellow), I keep searching but couldn't find retrieve option.

2. my optional idea is using color, but just don't know what kind of condition to start. It doesn't make sense.

3. any other options?

Thank you very much all 
 

ABASS.png

Share this post


Link to post
Share on other sites



#2 ·  Posted

@Frankie, welcome to AutoIt and to the forum.

be aware that AutoIt users do not necessarily know what MT4 is, or any of the other terms you mention. you are pretty much leaving us guessing what program you are trying to interact with, which is a key question here.

so:

1) what is the program you are trying to interact with?

2) does this program have a custom action you can define when a dataset matches some condition?

3) is the dataset present in any form other than a chart (e.g. in a file)?

4) is this real-time, or are you analyzing the dataset in retrospect?

help us help you, give us something to work with.

 

1 person likes this

Share this post


Link to post
Share on other sites

#3 ·  Posted

20 hours ago, orbs said:

@Frankie, welcome to AutoIt and to the forum.

be aware that AutoIt users do not necessarily know what MT4 is, or any of the other terms you mention. you are pretty much leaving us guessing what program you are trying to interact with, which is a key question here.

so:

1) what is the program you are trying to interact with?

2) does this program have a custom action you can define when a dataset matches some condition?

3) is the dataset present in any form other than a chart (e.g. in a file)?

4) is this real-time, or are you analyzing the dataset in retrospect?

help us help you, give us something to work with.

 

Thank you very much @orbs
I am sorry that did not defined well the term. Just too hurry to post and did not intend to make everyone confused. So here is the answers:
1)  It is MT4 Meta Trader which popular among Forex trading users. (Link https://www.metatrader4.com/ )
2) It contains MQL language which is very similar to C and C++ , They use open, High, Low, Close price of the security to calculate average value says Moving Average (in the picture is in Red and Yellow color). Therefore, the Close price , for example, will be used to calculate the Moving Average price by a tool called indicator name Moving Average and etc. The indicator is attached in the MT4 application, in this sense I try to compare two value of Moving Average(MA) such as MA 3 periods > MA 5 periods send a trigger in Autoit to do something like clicking a certain place on my screen. To answer your question, I think they could add some sound alert when condition is met.
3. It does have .txt file but only Open, High, Low, Close price. This mean that no MA value.
4. It is real-time data

your all recommendations are valuable for me, Thank you in advance.

Share this post


Link to post
Share on other sites

#4 ·  Posted

@Frankie,

i see MQL has a very impressive range of functions, as well as an API. there must be something in there that does what you need, as it seems quite a common requirement (to my common sense, at least). you may want to ask that question in the MQL forum (here or here).

using pixel color detection is prone to issues. i would recommend against it, unless there is really no alternative. usually there is.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now