what I want to do is read in a string from an external file, like
string indicatorLookup = "tdMAs().SMA50UpDown[0]";
then "execute" that code in the a function like
plotBlock(x, indicatorLookup); and have it replace indicatorLookup with tdMAs().SMA50UpDown[0],but as a function, not a string
I basically need "execute a string"
is this possible?
here is the code where I use it.
================================================== =====
protected override void OnBarUpdate()
{
int x = 0;
plotBlock(x, tdMAs().SMA50UpDown[0]); x++;
plotBlock(x, tdHA().HADirection[0]); x++;
plotBlock(x, tdHA().HADirection[0]); x++;
plotBlock(x, tdLRC().insideLRC[0]); x++;
plotBlock(x, tdCycle().KUpDown[0]); x++;
plotBlock(x, tdCycle().DUpDown[0]); x++;
plotBlock(x, tdCycle().SFUpDown[0]); x++;
plotBlock(x, tdCycle().DHighLow[0]); x++;
plotBlock(x, tdCycle().KHighLow[0]); x++;
plotBlock(x, tdMOM().MOMUpDown[0]); x++;
plotBlock(x, tdMOM().MOMUpDown[0]); x++;
plotBlock(x, tdOBVM().OBVUpDown[0]); x++;
plotBlock(x, tdCMF().CMFUpDown[0]); x++;
plotBlock(x, tdOBVM().OBVAboveSignal[0]); x++;
}
private void plotBlock(int x, int status)
{
if(Convert.ToInt16(scoreArray[Convert.ToInt16(chartPeriod),x]) > 0)
{
Values[x][0] = arrayLength - x;
GetDotColor(x, status);
}
}

Comment