cumulative RSI strategy to code

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #103922 quote
    djohnson87djohnson87
    Participant
    New

    Hi guys

    How would I code the following:

    • enter long on next candle open when 3-day cumulative RSI value is less than 30
    • Exit on next candle open when 3 day cumulative RSI is above 20

    Thanks

    #103929 quote
    NicolasNicolas
    Keymaster
    Legend

    You can change the RSI period in the first line:

    period = 2
    rsic = summation[3](rsi[period])
    
    if not onmarket and rsic<30 then 
     buy at market 
    endif 
    
    if onmarket and rsic>20 then 
     sell at market 
    endif
    #103936 quote
    djohnson87djohnson87
    Participant
    New

    Thanks mate

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

cumulative RSI strategy to code


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
djohnson87 @djohnson87 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by djohnson87djohnson87
7 years, 2 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/01/2019
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...