Newbie RSI

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #160648 quote
    FDtoday
    Participant
    New

    Good morning new here but not to trading, I am trying to use a simple code to grab positions when RSI dips below for a long position.  Then bank when reverses making x many points.  The backtest works but the live scenario doesnt place any orders when running and wondering if I am missing anything obvious here is the code not much too it as testing only to get it working first.  Any help would be grateful thank you.

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    
    // Conditions to enter long positions
    indicator1 = RSI[10](close)
    c1 = (indicator1 CROSSES UNDER 38)
    
    IF c1 THEN
    BUY 2 PERPOINT AT MARKET
    ENDIF
    
    // Stops and targets
    SET TARGET pPROFIT 50
    #160659 quote
    robertogozzi
    Moderator
    Master

    Always use the ‘Insert PRT Code’ button when putting code in your posts to make it easier for others to read.

    Thank you 🙂

    #160662 quote
    FDtoday
    Participant
    New

    Thank you 🙂

    #160669 quote
    robertogozzi
    Moderator
    Master

    You also posted inthe wrong support forum, it’s ProOrder for strategies, as you can read from the highlighted rules below (in yellow). I moved it to the correct place.

    I tested on a 5-minute TF with 200K units anditworks.

    What TF and how many unists are you using?

    Because there could be no valid entry conditions with a few units.

    #160670 quote
    FDtoday
    Participant
    New

    Thanks again,  Ah I didnt think about units my view was 1hr and left at 100 units which makes sense it couldn’t get a trade ill amend and see if that works thank you.  Does the chart need to be open on the screen to work?

    #160671 quote
    robertogozzi
    Moderator
    Master

    Yes, while backtesting.

    No,when the strategy runs in AutoTrading.

    #160672 quote
    FDtoday
    Participant
    New

    Yes, while backtesting.

    No,when the strategy runs in AutoTrading.

    Perfect amended with 1gr 1k unit to test it.  Ill see if it works if moves down today.

    #160679 quote
    FDtoday
    Participant
    New
    //-------------------------------------------------------------------------
    // Main code : short test
    //-------------------------------------------------------------------------
    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    
    // Conditions to enter short positions
    indicator1 = RSI[10](close)
    c1 = (indicator1 >= 70)
    
    IF c1 THEN
    SELLSHORT 1 PERPOINT AT MARKET
    ENDIF
    
    // Stops and targets
    SET TARGET pPROFIT 15

    I just tried a short as it was going the other way still didnt work :/.  I just done a manual sell and that worked from prorealtime so the link is working.  RSI crossed over 71 so well over the 70.

    #160682 quote
    FDtoday
    Participant
    New

    Ignore that it just worked maybe I need to up the units even further.  Trial and error least one worked so getting there.

    #160701 quote
    FDtoday
    Participant
    New

    So that short worked, I set up a 10 minute long and that didnt work again?  What am I doing wrong :/

     

    //-------------------------------------------------------------------------
    // Main code : small RSI 10m 39
    //-------------------------------------------------------------------------
    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    
    // Conditions to enter long positions
    indicator1 = RSI[10](close)
    c1 = (indicator1 CROSSES UNDER 39)
    
    IF c1 THEN
    BUY 1 PERPOINT AT MARKET
    ENDIF
    
    // Stops and targets
    SET TARGET pPROFIT 10
    #160703 quote
    FDtoday
    Participant
    New

    I just opened the chart and it triggered so do I need the chart open perhaps?

    #160713 quote
    robertogozzi
    Moderator
    Master

    What instrument,TF and units are you using?

    #160740 quote
    FDtoday
    Participant
    New

    Hi,

    Im using FTSE, 1hr 1000units.  I have just redone it all from scratch and will leave on my home pc and see if it triggers.  RSI =< 37 and then another order RSI =< 28 .  Its quite simple just more for when I am unable to open a trade it will catch the move for me is my thinking.

    //-------------------------------------------------------------------------
    // Main code : RSI under 38
    //-------------------------------------------------------------------------
    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    
    // Conditions to enter long positions
    indicator1 = RSI[10](close)
    c1 = (indicator1 <= 38)
    
    IF c1 THEN
    BUY 2 PERPOINT AT MARKET
    ENDIF
    
    // Stops and targets
    SET TARGET pPROFIT 45
    #160765 quote
    FDtoday
    Participant
    New

    This didn’t work, left running overnight and went sub 38 this am and hasn’t triggered frustrating.  I have change the =< to crosses under but I dont see what difference that should make.

    From trying a few things it seems a little random if they work or not any help is appreciated, I feel im missing something obvious.

    #160774 quote
    robertogozzi
    Moderator
    Master

    It’s due to very strict conditions. On my test on FTSE, 1h, 200K bars (10 and a half years), it only took 66 trades, that is 6 trades/year, which is 1 trade every other month!

    You have to keep it running at least one year to see some trades opened, not just overnight!

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

Newbie RSI


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
FDtoday @fdtoday Participant
Summary

This topic contains 17 replies,
has 2 voices, and was last updated by FDtoday
5 years ago.

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