작업 종료됨
명시
I need the six attached indicators converted to a class so they can be used inside of another program
- Create a class called CIndicator
- The class should have the means to load
- Open
- High
- Low
- Close
- Spread
- TickVolume
For a specified currency pair and date range one time. For instance in the constructor or a Load function is fine as well
- Create a function in the class for each indicator using the body of the OnCalculate()
- Each function should have the ability to accept array ref to replace the buffers currently being filled by the OnCalculate of the indicators.
- Each function should also have the ability to accept whatever parameters are defined in the Input parameters of the indicators
#define SUCCESS 0 class CIndicator { public: template<typename T> int X1(T &buffer1[], T &buffer2[]) { // Here place the code from the OnCalculate function from the attached indicator return(SUCCESS) }
The intended use of this class will be something like
// Buffer Arrays double b1[], b2[], b3[] // Class Declaration CIndicator cIndicator("EURUSD",PERIOD_H1,D'2019.01.01 00:00:00', D'2019.01.02 23:23:59'); // Function Call cIndicator.X1(b1,b2,b3); for(int i=0;i < ArraySize(b1); i++) { // do stuff }