CrossOver(EMA1, EMA2) and RSI
Author: Dizelrp
Creation Date: 10/29/2009 4:17 PM
profile picture

Dizelrp

#1
Help me

CODE:
Please log in to see this code.
profile picture

Eugene

#2
Help - how exactly?

You were trying to modify a rule-based strategy. Probably this is the source of a logic error i.e. conditioning all the code like this:
CODE:
Please log in to see this code.

But anyway, we need to know what are you trying to do?
profile picture

Dizelrp

#3
Is 2EMA when EMA1 intersects EMA2 from below upwards provided that RSI> 60 or when RSI intersects 60 provided that EMA1> EMA2 - there is a purchase, closing at intersection EMA1 from top to down EMA2, or on stop of 0,5 % from the purchase price.
The short position opens when EMA1 intersects EMA2 from top to down provided that RSI <40 or when RSI intersects 40 provided that EMA1 <EMA2 - there is an opening short, closing at intersection EMA1 from below upwards EMA2, or on stop of 0,5 % from the purchase price.
profile picture

Eugene

#4
What does the intersect mean?

Buy: ( CrossOver(EMA1, EMA2) and (RSI>60) ) or ( CrossOver???(RSI,60) and EMA1>EMA2 )
Sell: CrossUnder(EMA1, EMA2) or a tight 0.5% stop

Short: ( CrossUnder(EMA1, EMA2) and (RSI<40) ) or ( CrossUnder???(RSI,60) and EMA1>EMA2 )
Sell: CrossUnder(EMA1, EMA2) or a tight 0.5% stop

Is it a single position or multi-position system (ie. ActivePositions used in your script)?
profile picture

Dizelrp

#5
Do you speak russian ?
I m not speak english very well.
profile picture

Eugene

#6
Forex? (Hardly a chance with equities or futures with a 0.5% stop.)
CODE:
Please log in to see this code.
profile picture

Dizelrp

#7
No, futures, Day Trading.
I will result a screenshot with the schedule.
These are transactions on this code, but without optimisation.
CODE:
Please log in to see this code.



profile picture

Dizelrp

#8
Thanks for your help.
Your code works.
profile picture

Dizelrp

#9
Still there is a question. By optimisation period RSI does not vary, is constant 20. Where there can be an error?
profile picture

Eugene

#10
CODE:
Please log in to see this code.

I used a copy/paste from your code. You've fixed it yourself in the optimizer and left as is. Change the numbers in the Strategy code or in the optimizer's GUI.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).