New to PRT Buy Seasonal Low Rsi
Forums › ProRealTime English forum › ProOrder support › New to PRT Buy Seasonal Low Rsi
- This topic has 3 replies, 3 voices, and was last updated 8 months ago by SE_68.
-
-
02/27/2024 at 9:36 AM #228802
Hi everyone, im new to PRT even if i have followed this forum on and of for years. I have no data skills but have read some threads about seasonallity and
would like to test if there is an edge in trying to find a bottom in Sept-Oct and a top in the spring compared to Buy in Oct and sell in May.My code below dosen´t seem to work as i aming for, wich is buying at a low Rsi in any of the month 9-11. What do i do wrong, Should i use (If openmonth 9) or?
Greatful for any help.
Buy Seasonal Low RSI1234567891011121314151617181920212223242526// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivated// Only buy sep-octIF Currentmonth = 9 or Currentmonth = 10 or Currentmonth = 11 THENEndif// Conditions to enter long positionsIndicator1 = RSI[9](close)c1 = (indicator1 CROSSES over 30)If c1 thenBUY 1 CONTRACT AT MARKETendif// Only sell May-JulyIF Currentmonth = 5 or Currentmonth = 6 or Currentmonth = 7 THENEndif// Conditions to exit long positionsIndicator2 = RSI[14](close)c2 = (indicator1 CROSSES under 70)If c2 thenSELL AT MARKETENDIF02/27/2024 at 11:26 AM #228812Hi there !
One example, of something you do not apply correct – where an EndIf is to be projected :
12345678910111213DEFPARAM CumulateOrders = False // Cumulating positions deactivated// Only buy sep-octIF Currentmonth = 9 or Currentmonth = 10 or Currentmonth = 11 THEN//Endif // EndIf must not be here !// Conditions to enter long positionsIndicator1 = RSI[9](close)c1 = (indicator1 CROSSES over 30)If c1 thenBUY 1 CONTRACT AT MARKETendifEndif // That EndIf should be here !Otherwise I notice your RSI[9] which seems to be related to your 9th month ? anyway, if it is, your TimeFrame of the chart should be 1 month in that case.
(it is a bit guessing which direction you want to go, also with the notice that the RSI may not have reached 30 (on the low side) at all).Regards and don’t be disappointed too soon !
Peter02/27/2024 at 11:33 AM #228813Hi,
there is a mistake in your code in line 6 and 18. Your code says nothing if the candle is in sept-Nov period.
Here you have what you are searching for:
123456789101112131415161718// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivated// Only buy sep-octIF not longonmarket and (Currentmonth = 9 or Currentmonth = 10 or Currentmonth = 11) and RSI[9](close) CROSSES over 30 THENBUY 1 CONTRACT AT MARKETendif// Only sell May-July// Conditions to exit long positionsIF longonmarket and (Currentmonth = 5 or Currentmonth = 6 or Currentmonth = 7) and RSI[14](close) CROSSES under 70 THENSELL AT MARKETendifgraph rsi[14](close)coloured("red")graph rsi[9](close)coloured("green")graph 30graph 70Just one thing, if you are long and the RSI is not over and crosses under the 70 level between may and july you will not exit… Consider set a trail stop of something like this.
02/27/2024 at 3:04 PM #228837Thank you Peter and Iván for your help.
Iván i was trying a traling stop but it seems to hurt the overall to much so i wonder if there is any code that does something like:
If c2 is not met in month 6 then sell next day att market?
I also wonder about the indicator Buy and hold. I´m aming for a robust system that are equal or better than buy and hold but when i look at the buy and hold it looks
weard? It´s telling me that the index has done app +44% from 1996 to 2024 and my strategy about the same in terms of euros. It dosen feel right.
I attached a picture of the buy and hold indicator, both the system and the indicator starts with the same amount (10.000)Thank!
-
AuthorPosts
Find exclusive trading pro-tools on