SO, this is possibly a stupid question, but here I go,
Building a trading system,
I’m using four RSI’s Indicators ” How I get those four RSI’s is by selecting RSI Indicator and then Duplicating it Three times”
1, Long Entry
2, Long Exit
3, Short Entry
4, Short Exit
Can I optimise the four RSI’s separately?
Thank You
to anyone that replies
Are you talking about automated trading?
What do you want to achieve exactly?
Sorry, Yes I’m talking about Auto Trading
The Idea is to build a system using four individual RSI’s & be able to Optimise each one of the 4 individually
Just give them different names, for example:
indicator1=RSI[a](close)
indicator2=RSI[b](close)
indicator3=RSI[c](close)
indicator4=RSI[d](close)
a, b, c, and d can then be optimised to give a different period for each one.
I moved this topic to ProOrder as it concerns automated trading systems.
There you go a TS with 4 RSIs:
DEFPARAM CumulateOrders = False
Rsi1 = Rsi[5](close)
Rsi2 = Rsi[10](close)
Rsi3 = Rsi[15](close)
Rsi4 = Rsi[20](close)
Lcond = Rsi1 > Rsi2 AND Rsi2 > Rsi3 AND Rsi3 > Rsi4
Scond = Rsi1 < Rsi2 AND Rsi2 < Rsi3 AND Rsi3 < Rsi4
IF Lcond AND Not LongOnMarket THEN
BUY AT Market
ELSIF Scond AND Not ShortOnMarket THEN
SELLSHORT AT Market
ENDIF
SET STOP pLOSS 100
SET TARGET pPROFIT 400
You can optimize all indicators, at the same time or individually.
I was coding while nonetheless was posting. That’s correct.
Thank You Roberto,
Your a Genius,
I was wondering, when I use RSI, RSI crosses over 30 for a Long Entry
Long Exit crosses over 70
Short Entry 70
Short Exit 30
Are those values in the code, so, that I can Optimise them
Kind Regards
Do ALL the 4 RSIs have to cross those levels simultaneously?
No
If long Entry crosses over Level 30, then a Long position is entered
then the Long Position is closed when the RSI crosses over 70 or Take Profit is reached
the same for Short Entry when it crosses under level 70
then crosses under 30 or take profit is reached
Yes, but you asked 4 indicators, which one shall I use?
will the idea is to use 1 indicator per position
Long Entry, RSI 1 Level 30
Long Exit, RSI 2 Level 70
Short Entry, RSI Level 70
Short Exit, RSI Level 30
Thanks
if you’re only using 2 different values then you only need 2 indicators
indicator1=RSI[30](close)
indicator2=RSI[70](close)
then you can use “crosses over indicator1” or “crosses under indicator2” or close>indicator1, close<indicator2 (for example) for whatever action you want to associate with that event.
Hello,
So, I can Optimise the 14 Day of each one separately and 30 level
Thanks
Thank You Roberto,
Your a Genius,
I was wondering, when I use RSI, RSI crosses over 30 for a Long Entry
Long Exit crosses over 70
Short Entry 70
Short Exit 30
Are those values in the code, so, that I can Optimise them
Kind Regards
Hello,
After reading this discussion several times to understand what is the exact need, this is what i understand:
You don’t need 4 indicators, but as you are using the builder and not programming, the code is creating 4 indicators automatically so that you can have your 4 conditions.
You just need 1 RSI with a BUY LONG order when it crosses 30, exit when it reaches 70, then SELL SHORT when it crosses down 70 and exit short when it reaches back 30. Assuming that there will be a smooth oscillation from overbought to oversold zone every time, which is not always the case.
If so, which period of RSI you are considering? the default 14?
If not, then I’m afraid the need is very difficult to understand, sorry
Some example of code, but may need to be completed with Stop Loss if exit conditions are not reached before RSI reversal values.
DEFPARAM CumulateOrders = False
Rsi1 = Rsi[14](close)
Lcond = Rsi1 crosses over 30
LcondExit = Rsi1 crosses over 70
Scond = Rsi1 crosses under 70
ScondExit = Rsi1 crosses under 30
IF Lcond AND Not LongOnMarket THEN
BUY AT Market
ELSIF LongOnMarket and LcondExit THEN
SELL AT Market
ELSIF Scond AND Not ShortOnMarket THEN
SELLSHORT AT Market
ELSIF ShortOnMarket AND ScondExit THEN
EXITSHORT AT Market
ENDIF
So, I can Optimise the 14 Day of each one separately and 30 level
Yes, but I misunderstood what you’re trying to do and my last post is misleading – my bad. You only need a separate RSI if you’re going to use a different period. If they’re all going to be 14, then as Swingeur says, you only need one and that can be used to exit or enter at any level.
30 and 70 are obviously the levels you want to use and not the period (as I mistakenly wrote above, while half asleep). I hope this is at least slightly clearer than mud.