I'm, trying to develop a simple indicator, but i can not do it.
I need an indicator to compare the current close and the close of 10 bars ago.
if I write this simple code the indicator does not work.
if (Close [0] > Close [10])
{
Plot0.Set(1);
}
else
{
Plot0.Set(0);
}
but if i write this simply trading system the system works ok.
if (Close[0] > Close[10])
{
EnterLong(DefaultQuantity, "");
}
if (Close[0] < Close[10])
{
EnterShort(DefaultQuantity, "");
}
I am doing something badly ?, i need to develope the indicator...
Thanks very much.
Comment