Doubt about creating new indicator on the indicators.c file!!

Posted By: Oligon

Doubt about creating new indicator on the indicators.c file!! - 11/09/17 09:07

Hello everyone, I have been trying to create a custom zigzag indicator in the indicators.c file. I also included the name reference for the function on the functions.h file.

However, when I try to test it from a new script, the message "Undefined function called!" appears.

Does anyone know what else do I need to do in order to be able to call my new indicator from a new script??

Thanks!!
Posted By: Brax

Re: Doubt about creating new indicator on the indicators.c file!! - 11/09/17 12:43

Hi.

I just created my own advindicators.c in "Include" directory and link it in my scripts with #include <advindicators.c>.

This way you donīt mess the original files.
Posted By: jcl

Re: Doubt about creating new indicator on the indicators.c file!! - 11/09/17 15:20

Yes, indicators.c is for studying the source only. Adding code in that file has no effect.
Posted By: Oligon

Re: Doubt about creating new indicator on the indicators.c file!! - 11/10/17 23:44

Thank you so much @brax and @jcl!! This was really helpful, however I'm getting an error message saying: "'function' undeclared identifier".

I'm probably missing something important here, that message appears when I call the function from a new script and I have included the #include <test.c> statement.
Posted By: jcl

Re: Doubt about creating new indicator on the indicators.c file!! - 11/11/17 11:56

You must also include <default.c> before. It is only automatically included when nothing else is included.
Posted By: Oligon

Re: Doubt about creating new indicator on the indicators.c file!! - 11/18/17 14:08

Thanks for your help! That worked like a charm laugh
© 2024 lite-C Forums