You need to make an indicator that is displayed as SMA (average) on the quote chart.
The main code of the indicator will be in a C++DLL
Please help me with a sample of the short code of the indicator in MQL5 and passing it to the DLL close as a double.
The main DLL code is presented in the article on this site, you need to finish it so that an array appears in it, then it is passed back to the indicator and then displayed on the chart.
No more than 5 participants. When the indicator is ready, I will send a copy to those who helped.
?
algotrade
//---
int ArSize;
ArSize = ArraySize(price);
for(int i=0;i<ArraySize(price);i++) NormalisedpriceBuffer[i]=price[i];
//--- return value of prev_calculated for next call
PlotIndexSetDouble(0,PLOT_EMPTY_VALUE,NormalisedpriceBuffer[]);
}
//+------------------------------------------------------------------+
This error appears (where square brackets are italicized)
']' - expression expected Quantum1.mq5 47 62
Thank you.p. s. 10 minutes ago it was compiled a little with other changes, now it is not compiled yet… I can’t figure out how to display the buffer (NormalisedpriceBuffer[]), this is an array, the loop must be done to display pointwise ?
laryx
There is also an error in the code-array is not an array of values, but a single value. And it is assigned to it as to an array…
Does it compile without errors ?
artmedia70
You have the same array to display this:
NormalisedpriceBuffer[]
and write the data to array[]
algotrade
There are no physical and mathematical functions, but the MetaTrader, in my opinion, is the best terminal that allows you to connect a DLL and not be limited in functionality, for example, when using the GPU for calculations, … etc. And in the MetaTrader, a ready-made “non-pirated” testet…
laryx
I wonder what is there for such terrible bells and whistles that you need a DLL. What is not present in MQL ?