Hi there. I am trying to convert a simple Indicator from NT7 to NT8.
This is the NT7 version and it works just fine:
// plot below by replacing 'Close[0]' with your own formula.
if (High[0]>High[6])
{
LongEntry.Set(High[1]-4);
ShortEntry.Set(High[1]-4);
}
else if (Low[0]<Low[6])
{
ShortEntry.Set(Low[1]+4);
LongEntry.Set(Low[1]+4);
}
}
---------------
This version in NT8 does not work:
{
//Add your custom indicator logic here.
if (Bars.GetHigh(0)>Bars.GetHigh(6))
{
LongEntry[0] = (Bars.GetHigh(1)-4);
ShortEntry[0] = (Bars.GetHigh(1)-4);
}
else if (Bars.GetLow(0)<Bars.GetLow(6))
{
ShortEntry[0] = (Bars.GetLow(1)+4);
LongEntry[0] = (Bars.GetLow(1)+4);
}
}
-----------
And this version in NT8 plots, but not correctly:
{
//Add your custom indicator logic here.
if (Bars.GetHigh(256)>Bars.GetHigh(250))
{
LEntry[0] = (Bars.GetHigh(256)-1);
SEntry[0] = (Bars.GetHigh(256)-1);
}
else if (Bars.GetLow(256)<Bars.GetLow(250))
{
SEntry[0] = (Bars.GetLow(256)+1);
LEntry[0] = (Bars.GetLow(256)+1);
}
}
------------
Can someone please help me fix it?
Thank you very much.
Comment