IEasyLanguagePrice* pELObj-> CloseMD[data1]; ERROR

Questions about MultiCharts and user contributed studies.
mqsymth
Posts: 3
Joined: 25 Oct 2013

IEasyLanguagePrice* pELObj-> CloseMD[data1]; ERROR

Postby mqsymth » 23 Jan 2020

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?

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

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

Postby TJ » 23 Jan 2020

Please see post #1 & post #2.
viewtopic.php?t=11713

User avatar
Svetlana MultiCharts
Posts: 645
Joined: 19 Oct 2017
Has thanked: 3 times
Been thanked: 163 times

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

Postby Svetlana MultiCharts » 29 Jan 2020

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.


Return to “MultiCharts”