RSI Code very simple but effective
Forums › ProRealTime English forum › ProOrder support › RSI Code very simple but effective
- This topic has 19 replies, 5 voices, and was last updated 7 years ago by
rmhandel.
-
-
06/19/2018 at 11:07 AM #73661
Maybe somebody is interested in this code:
hello I would like to receive support/help with the following code. He is very simple but I do not know exactly how I accomplish this:
I buy at RSI> 35 and sell when RSI undercuts the 70s line. Attention not when he crosses but after it is over it and leaves them again only.
i can code the crosses but not the keeping over the 70s line.
Thanks for your efforts.
Robert
rmhandel06/19/2018 at 11:34 AM #7366606/19/2018 at 12:34 PM #7366806/19/2018 at 2:55 PM #7367606/19/2018 at 3:27 PM #7367806/20/2018 at 10:44 AM #73738hi, unfortunately it is not working.
The results of your code are same like this:
1234567891011121314151617181920// Festlegen der Code-ParameterDEFPARAM CumulateOrders = False // Kumulieren von Positionen deaktiviert// Bedingungen zum Einstieg in Long-Positionenindicator1 = RSI[14](close)c1 = (indicator1 > 35)IF c1 THENBUY 1 CONTRACT AT MARKETENDIF// Bedingungen zum Ausstieg von Long-Positionenindicator2 = RSI[14](close)c2 = (indicator2 CROSSES UNDER 70)IF c2 THENSELL AT MARKETENDIF// Stops und Targets06/20/2018 at 11:17 AM #73747To write code, please use the <> “insert PRT code” button, to make code easier to read.
06/20/2018 at 11:23 AM #73748There’s no need to tell your strategy to stay on market WHILE Rsi > 70, since you ordered to SELL only when it crosses UNDER 70, so it opens a LONG trade, then stay on market till RSI goes above 70 and will close the trade only when it CROSSES UNDER, isn’t that what you want?
1 user thanked author for this post.
06/20/2018 at 1:01 PM #73771stay on market till RSI goes above 70 and will close the trade only when it CROSSES UNDER, isn’t that what you want?
I understood exactly the same thing and the code looks ok to me.
06/20/2018 at 1:45 PM #73775yes this is what i wanted. But it don´t works so. The point is i want to stay long in market even the RSI is over 70 and quite time it is above it.
And at least i want to sell and close position when RSI is under 70 . Maybe i can post my ready code here if you want to test it in pro order somebody.
so we would better understand over the coding.
06/20/2018 at 1:48 PM #737771234567891011121314151617181920212223//-------------------------------------------------------------------------// Hauptcode : über 70 bleibt und kreuzt 70//-------------------------------------------------------------------------// Festlegen der Code-ParameterDEFPARAM CumulateOrders = False // Kumulieren von Positionen deaktiviert// Bedingungen zum Einstieg in Long-Positionenindicator1 = RSI[14](close)c1 = (indicator1 CROSSES OVER 68)IF c1 THENBUY 1 CONTRACT AT MARKETENDIF// Bedingungen zum Ausstieg von Long-Positionenindicator2 = RSI[14](close)c2 = (indicator2[2] > 70)indicator3 = RSI[14](close)c3 = (indicator3 CROSSES UNDER 70)IF c2 AND c3 THENSELL AT MARKETENDIF06/20/2018 at 1:51 PM #73778As I said before, I tested your code AS IS and it works.
Are you using the same RSI on screen, or do you have different settings other than 14?
Can you attach any screenshot with all details of when it did not work?
06/20/2018 at 2:00 PM #73779I was writing while you posted your new code.
It’s different from the first one, which one is the good one?
They do different things, the latter buys when a CROSSOVER 68 occurs, while the original when price was > 35. It sells when there is a CROSSDUNDER 70 AND the two previous candles were above 70, while the original one only on CROSSUNDER.
I am asking ahaint, what do you exactly want?
Moreover, please use INSERT PRT button to enter code. Thanks.
06/20/2018 at 2:00 PM #73780Again, not ahaint… sorry!
06/20/2018 at 2:35 PM #73785 -
AuthorPosts
Find exclusive trading pro-tools on