Hello. I am developing an EA that must work in more than one chart window due to that some part of the program analyzes the trend in one time frame and other part of the program does the same but in other timeframe. The aim is to avoid contradictory trades, because may be that in a 5 minute frame one trend may be upward and in the same pair, but in a frame of 1 hour the trend may be downward. The idea is each program that tells a central program what to do, by setting boolean variables. This central program reads the boolean variables, and based on them take a determined decision.
My question is: it is possible that one program can read the variable of another program? For instance, the program that works in the 5 min timeframe set a boolean var in "V"... and the program that works in the 1H timeframe, reads that value, and takes an action.
If somebody tell me how to do that I will be very grateful.
Betowm
(excuse my bad English)
- About arrays with variable lenghts
- MAX and MIN in a dinamic array
- Working with qoutes of one pair in a chart of another pair
Hi, See Global Variables
Thank you very much ydrol. You are great !! Another question: Where I have to declare that globalvariable ? because I have the EA code spread in different charts windows, each one with its own code. In what of them I have to write that globalvariable? Thank you in advance.
Right now I get to read. Thank you !!!
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register