custom indicator on custom indicator ??

 

so if you have made a custom indicator, and at the end of your code file you have

.

.

.

Buffer[i] = something;

}

return(0);

}


But instead of applying this Buffer[i] on price bars, you want to calculate it on the values of a different iCustom indicator.

How would you do that?

Other_Buffer = iCustom(..);

and then

Buffer[Other_Buffer] = something;

}

return(0);

}

Or do you need to change something else? I can't figure that out..

 
MrH:

so if you have made a custom indicator, and at the end of your code file you have

.

.

.

Buffer[i] = something;

}

return(0);

}


But instead of applying this Buffer[i] on price bars, you want to calculate it on the values of a different iCustom indicator.

How would you do that?

Other_Buffer = iCustom(..);

and then

Buffer[Other_Buffer] = something;

}

return(0);

}

Or do you need to change something else? I can't figure that out..

Hi MrH

I don't think you would use Other_Buffer as the index of Buffer unless it returned an integer suitable for an index (which it may, of course). Otherwise, I think it is perfectly valid to assign a buffer the value of a custom indicator, even if it is within the code of a custom indicator.

One caution, though. Whenever I do too much with custom indicators I seem to slow the calculation down enormously, sometimes so much it appears the computer has crashed when it actually hasn't.

Cheers

Jellybean

 
Jellybean:

Hi MrH

I don't think you would use Other_Buffer as the index of Buffer unless it returned an integer suitable for an index (which it may, of course). Otherwise, I think it is perfectly valid to assign a buffer the value of a custom indicator, even if it is within the code of a custom indicator.

One caution, though. Whenever I do too much with custom indicators I seem to slow the calculation down enormously, sometimes so much it appears the computer has crashed when it actually hasn't.

Cheers

Jellybean



could you maybe post a code example on how you would do this please?