Can indicator data be imported?

 

Hi guys,

I used Java, the Selenium framework and MQL4 to create an EA that can import data from a file inside the experts/file folder to get a trade permission when an other account of mine is making profits.

 //+------------------------------------------------------------------+
// TradeErlaubnis aus Datei einlesen
//+------------------------------------------------------------------+
  
  string getTradeErlaubnis()
  
  {
  int handle;
  string DateiInhalt="";
  handle=FileOpen("TradeErlaubnis.csv", FILE_CSV|FILE_READ);
  if(handle>0)
    {
     DateiInhalt=FileReadString(handle);
     FileClose(handle);
    }
    return (DateiInhalt);
  }

I would also like to use the equity curve of that other account to draw an indicator. But so far I was unable to find a way to do that. Is it true that indicators can only be drawn with price related data from the actual MT4 environment or am I missing something here?

Thank you in advance for your time and best regards from Germany,

Justmyname

 
justmyname: But so far I was unable to find a way to do that. Is it true that indicators can only be drawn with price related data from the actual MT4 environment or am I missing something here?
  1. Indicators on main chart draw lines using price. Indicators on sub-windows draw lines using whatever values they want (one value per bar.) So it is NOT true.
  2. What have you tried? Have you read the values from a file into the buffer(s) once per bar?
  3. You have only three choices: Search for it (unlikely,) learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
 

You can have up to 8 values per bar.

 

In the indicator pane you are only limited on the X-axis, which always represents time. Moreover its step may vary, depending if the main chart contains a candle for the particular period.

BTW, if you are experienced in JAVA, perhaps it is worth considering to start programming right with the beta - Upcoming MetaTrader 4 and MQL4 Upgrades - Big Changes Are Underway. It contains OOP feature, and - though the syntax is different from JAVA - it would be much more convenient for you to start with the beta instead of downgrading your abilities to a plain script.

 

Thank you all for your helpful response. So it can be done.

@WHRoeder: I don't expect anyone to do my work for me. I learn to code it. But I needed to know if it is possible. I did it for the EA, but I was unable to find anything similar for indicators. Sometimes it is hard to find advanced advice, so I asked here, because I know that you guys have done this stuff for yearse and have lots of experience.

@SDC: 8 values per bar is more than I expected. So I could also use more values. Interesting...

@Ovo: time related X-axis is fine, because my data will also be time related (external equity from demo account). I will check out that object oriented beta. I was looking for an MQL4 Eclipse framework solution but couldn't find something appropriate.

@All: I really enjoy the support you give here in this forum. This site is very helpful. I don't ask often, but I read a lot. As one of my teachers said: success leaves clues. I know that you all provide good support for us newbies and sometimes people might be unthankful. I am not. Thank you :-)

Best regards and have a nice day,

Justmyname

 
justmyname:

..I was looking for an MQL4 Eclipse framework solution but couldn't find something appropriate.

Lol, forget about eclipse, inteliJ Idea or netbeans. You will have a notepad-style editor with syntax highlighting, and no parser. They say it has many cool features, though I probably did not reveal them yet :)