Typically the easiest way would be to design a function first. The function handles all the internal stuff, then outputs the 'result'. Your actual indicator then just calls the function and doesn't do any computational stuff. This way your signal can also easily call the function.
So, take the 'guts' of your indicator and create a new function instead. Most of the code will be identical. You can look at existing functions to understand how input: section is slightly different (define the type of var in each instance). Then the net result is how the function returns the 'answer'. You can see this by examples.
Then modify your indicator code to just call the function. You can use a var: to store the answer from the indicator, then Plot it.
Your strategy (signal) will look very similar to your indicator code.
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.
The following user says Thank You to Big Mike for this post:
by default this is not possible, unless the indicator uses a function that does the necessary calculations and makes the values available for the indicator to plot. Your best bet might be to contact the person that developed the indicator and ask him/her if there is such a function or if he/she can turn the indicator into a function that you can use.
The following user says Thank You to ABCTG for this post: