custom indicator code

Created at 21 Feb 2025, 08:29
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
CT

ctid7467649

Joined 01.10.2024

custom indicator code
21 Feb 2025, 08:29


Hi everyone,
I'm here because I need your help:

Last year, I took a very basic course to learn how to write simple code in Pine Script because I wanted to customize my favorite TradingView indicators.

Now, I'm trying to achieve similar results by writing code in cAlgo, but unfortunately, I'm struggling a lot.

Obviously, I have no intention of becoming a programmer, and what I'm trying to do is just create very simple codes, so I hope you'll forgive my lack of expertise.

In TradingView, I customized my RSI by adding these elements to the base code:

  • I created variables with values of 80, 60, 40, and 20.
  • At 80 and 20, I drew lines to indicate the extreme OverBought and OverSold levels.
  • Between 60 and 40, I added a colored fill to highlight the central area of the RSI.

In cAlgo, I noticed that I can manually add levels at 80 and 20, but I can't create the fill between 60 and 40 — or at least, I haven't found any information on how to do it.

But that's not a big issue, as it's just a visual detail.

What I really want to figure out is how to replicate the "plotshape" function from Pine Script:

I want an arrow to appear on the chart when the RSI is above 80 or below 20.

Can anyone give me some advice on how to do this?
Thanks a lot!


@ctid7467649
Replies

Edward357Johnson
21 Feb 2025, 09:24 ( Updated at: 22 Feb 2025, 04:16 )

Hi there! I'd be happy to help you with this. It's great that you're diving into coding to customize your TradingView indicators. Let's see if we can figure out how to replicate the plotshape function in cAlgo.

In Pine Script, the plotshape function is used to plot shapes on the chart based on certain conditions. To achieve a similar myOneonta Portal effect in cAlgo, you can use the AddArrow method to draw arrows on the chart.


@Edward357Johnson

Edward357Johnson
21 Feb 2025, 09:24

Hi there! I'd be happy to help you with this. It's great that you're diving into coding to customize your TradingView indicators. Let's see if we can figure out how to replicate the plotshape function in cAlgo.

In Pine Script, the plotshape function is used to plot shapes on the chart based on certain conditions. To achieve a similar effect in cAlgo, you can use the AddArrow method to draw arrows on the chart.


@Edward357Johnson