cumulative RSI strategy to code

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #103922 quote
    djohnson87
    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
    Nicolas
    Keymaster
    Master

    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
    djohnson87
    Participant
    New

    Thanks mate

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

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 djohnson87
6 years, 7 months ago.

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