Is it possible to use indicator data from OnCalculate function in EA? MQL5

 
I want to use indicator data for my automated trading. but I dont know how to do it. (mql5)
OnCalculate does just "calculate" and cannot be used in EA or It can.

Thank you for your answer in advance.
 
イベント処理

OnCalculateは、インジケータでのみ呼び出されますので、

EAの場合は、OnTickで処理をすると良いと思います。

Documentation on MQL5: Event Handling
Documentation on MQL5: Event Handling
  • www.mql5.com
The MQL5 language provides handling of certain predefined events. The functions for handling these events should be defined in an MQL5 program: function name, return type, a set of parameters (if any) and their types should strictly correspond to the description of an event handling function. The client terminal event handler uses the return...
 

EA に function を組み込みたいということではなく、インジケーターのデータを利用したいということでは?

それならiCustomを使えます。

https://www.mql5.com/en/docs/indicators/icustom

組み込みにした方が動作は軽くなりますので、できればその方がいいと思います。


Documentation on MQL5: Technical Indicators / iCustom
Documentation on MQL5: Technical Indicators / iCustom
  • www.mql5.com
[in]  Custom indicator name. If the name starts with the reverse slash '\', the EX5 indicator file is searched for relative to the MQL5\Indicators indicator root directory. Thus, when calling FirstIndicator"...), the indicator is downloaded as MQL5\Indicators\FirstIndicator.ex5. If the path contains no file, the error 4802...
理由: