Page 1 of 1

IEasyLanguagePrice* pELObj-> CloseMD[data1]; ERROR

Posted: Jan 23 2020
by mqsymth
I have defined in C++ code.

IEasyLanguagePrice* pELCLOSE= pELObj-> CloseMD[data1];
double dPrc[5000], int ntotsamp;

ntotsamp=1000;
.................
Later in code

for (i=0; i<ntotsamp; i++) {
dPrc=pELCLOSE->CloseMD[data1]->AsDouble;
}

There are 2260 daily bars on the chart.

I am only able to get close prices from 0 to 6, and MC gives me an error.

MaxBarsBack is set at "Auto-Detect"

Why can't I get all ntotsamp prices?

Re: IEasyLanguagePrice* pELObj-> CloseMD[data1]; ERROR

Posted: Jan 23 2020
by TJ
Please see post #1 & post #2.
viewtopic.php?t=11713

Re: IEasyLanguagePrice* pELObj-> CloseMD[data1]; ERROR

Posted: Jan 29 2020
by Svetlana MultiCharts
Hello, mqsymth,

In complex cases, MaxBarsBack set to Auto-Detect can cause errors, as MultiCharts cannot know what your dll does. You can add in your EasyLanguage script an explicit reference to the earliest bar, for example:
value1 = close[1000];
Then Auto-Detect should work correctly.