Some help for a beginner in coding for a RSI signal indicator

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #178708 quote
    montelamontela
    Participant
    Junior

    Hello,

    I try find a solution to create my first indicator. The idea is very simple, if Rsi is crossing 70, his value is 1 and it’s stay at this value until Rsi is crossing 30 and his value is changed to -1. So we have only 2 values 1 and -1. My code is this:

    If rsi(5) crosses over 70 then
    a = 1
    elsif rsi(5) crosses under 30 then
    a = -1
    endif
    return a

    But I have no results. Any help it will be appreciate (I have no experience in coding, I try to learn for test some ideeas).

    Thank you,

    Aurelian

    #178709 quote
    JC_BywanJC_Bywan
    Moderator
    Master

    Hello,

    ( ) vs [ ]

    Try replacing rsi(5) with rsi[5](close)

    #178715 quote
    montelamontela
    Participant
    Junior

    Thank you very much!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Some help for a beginner in coding for a RSI signal indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
montela @montela Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by montelamontela
4 years, 11 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 09/29/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...