RSI being the highest

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #135300 quote
    AntonC
    Participant
    Junior

    Hello,

    I have a question which is hopefully easy to answer.

    I wish to have a condition in my code which is that RSI is the Highest in last 5 bars.

    I’ve tried a lot of different ways of coding, but just cant get it to work.

    Hopefully someone can find a code that works. I’ve inserted the codes I’ve tried.

    Regards.

    myrsi = RSI[9](close) 
    
    c1 = RSI = Highest[5]
    
    if c1 then
    buy at market
    endif
    rsiperiod = 5
    myrsi= RSI[10](close)
    count = Summation[atrperiod](myrsi> myrsi[1])
    if count > 5 then
    buy at market
    endif 
    
    myrsi = RSI[10](close)
    c1 = (myrsi > myrsi[1])
    
    IF LOWEST[5](c1) = 1 THEN
    buy at market
    endif
    #135307 quote
    robertogozzi
    Moderator
    Master

    Please read the highlighted basic rules to abide by in these forum, among them:

    • Do not double post. Ask your only once and only in one forum. All double posts will be deleted anyway so posting the same question multiple times will just be wasting your own time and will not get you an answer any quicker. Double posting just creates confusion in the forums.

    Thank you 🙂

    #135308 quote
    robertogozzi
    Moderator
    Master

    Example 1 is correct if you replace line 3 with this one:

    c1 = (myrsi = Highest[5](myrsi))
    AntonC thanked this post
    #135359 quote
    AntonC
    Participant
    Junior

    Did not realize I had doubleposted, sorry!

    Thank you for the help!

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

RSI being the highest


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
AntonC @antonc Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by AntonC
5 years, 8 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 06/09/2020
Status: Active
Attachments: No files
Logo Logo
Loading...