Explain the flow of creating an indicator on TradingView using AI
Using AI makes it incredibly easy to create indicators.
Also, on TradingView, many codes from other developers are publicly available, so there are times you’ll want to customize them to your own style as well.
It’s fine if you can have the AI create the code in one go, but for more complex things you’ll need to ask a few times. Here’s how to structure your questions so you get what you want.
Logic → Setting values → Panel → Turning into a strategy
First, let's create the logic
When we say logic, it’s not about fine-grained settings first; start broadly with questions like “I want to create a common moving average-based indicator” or “I want to know what common indicators using RCI exist.” You’ll get several proposals and the code may be produced as is.
If you’re unsure whether to use MT4 or TradingView, try creating them one by one. Also, if you specify at the outset that you want it “as an indicator usable in MT4” or “as an indicator usable in TradingView (in Pine Script),” it will write code accordingly.
There will be errors!!
Errors are almost guaranteed at first.
Don’t fear if there are several errors; copy the errors and paste them.
You can press a new line and on the second line directly say “Tell me about this error” or “Fix this error,” and it will be corrected directly.
If it’s only making partial fixes, say “Show me the full corrected code,” and it will present the entire code.
Of course, a corrected version.
Setting values are automatically filled with reasonable numbers.
First, have the code written without specifying settings values, and once you confirm the logic works properly, then set initial values next.
If, on a platform like TradingView, you cannot tweak settings, say “Please make it possible to change this setting,” and it will create the part that changes settings.
For TradingView, we don’t yet have the technology to build a detailed settings screen; for now, we’ll create buttons and dropdowns you can interact with (still learning).
About the panel
The panel is added last.
After adding the panel, changing items related to the logic can cause display changes or the panel to disappear, which can lead to bugs that cannot be undone, so be sure to complete the logic you want before adding the panel.
Panels are generally fine if you say, “Please show the operating status.”
Try different requests like “I want this kind of panel” or “I want a dashboard,” and see what works.
Strategy: In one word, “Please turn this indicator into a strategy.”
There’s no need for lengthy explanations here, just recite this spell.
If we learn anything new, we’ll write another article about it.