Number of trades might not be correct #1047
-
Hi everyone. I am coding an EMA Crossover Strategy with RSI trigger. The strategy create a buy signals when both EMA12 crossover EMA21 & RSI > 50 are true, and a sell signals vice versa. I am crosschecking the strategy performance to see if there is any difference when I add the RSI trigger comparing to when I am not (EMA12 vs EMA21 with RSI trigger & EMA12 vs EMA21 without RSI trigger). But I noticed that the number of trades when I add RSI trigger is higher comparing to when I am not and this is not quite right. Let say the EMA12 cut EMA21 3 times and among those position the RSI is above 50 2 times. That means the strategy should buy two times, and this number of trades should not go above 3 which is again the number of times EMA12 crossover EMA21, but it resulted differently. I am not sure if this is a bug or not, and would like to ask if you guys could help me with this. Below is how I code the buy/sell trigger. Let me know if you guys would like to look at more stuff. Thank you!! ` elif(crossover(self.ema2, self.ema1)) and (self.RSI < 50): ` |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, I checked by my simple code. Example
|
Beta Was this translation helpful? Give feedback.
Hi,
I checked by my simple code.
But, the trade number is decrease when I add the RSI trigger.
sorry. I don't know why your situation is occured.
Example