Author Topic: Create a Trading System  (Read 1525 times)

Tony

  • Hero Member
  • *****
  • Posts: 50
    • View Profile
Create a Trading System
« on: June 03, 2018, 11:43:16 PM »
I'm now advancing into creating some trading systems that I use online and am trying to replicate them in Stockalyze.
And I need help.

What I'm trying to create is a RSI(10) Bearish
Here's the criteria:

RSI(10) crossed below 70
and RSI(10) 1 day ago was above 70 for the last 5 days

I tried adding a sub condition for the "and" part to no avail. I then tried adding a condition for it and again nothing. Maybe I still am not understanding the X and Y days and how I can include an "and" criteria.

I have some tickers that fall into this criteria, but when I run it against them I get zero hits.
Can you help me?

Thanks
Tony

Sacha

  • Administrator
  • Hero Member
  • *****
  • Posts: 570
    • View Profile
    • Stockalyze: Analyze Stocks freely and affordably.
Re: Create a Trading System
« Reply #1 on: June 04, 2018, 04:48:55 AM »
Hi Tony,
I tried creating it and I think this is what you wanted. You will actually have to add multiple conditions for the case of RSI consistently above 70 for at least 5 days. From your description it looked like you wanted to create system for short-sell and so I have defined signals for short and cover only.
Please refer to attached images and let me know if this is what you wanted.

Thanks,
Sacha
Stockalyze Support
Let's be friends

Tony

  • Hero Member
  • *****
  • Posts: 50
    • View Profile
Re: Create a Trading System
« Reply #2 on: June 04, 2018, 12:54:14 PM »
Once again, you are awesome. Exactly what I wanted.
And I think I'm gaining a better understanding of the X and Y days.

Am I correct to say that:
(X) is number of days to look back
and
(Y) is where to start the count to look back

So that if X=5 and Y=2
This means to look back 5 days from the day before yesterday?


Thanks
Tony

Sacha

  • Administrator
  • Hero Member
  • *****
  • Posts: 570
    • View Profile
    • Stockalyze: Analyze Stocks freely and affordably.
Re: Create a Trading System
« Reply #3 on: June 04, 2018, 10:30:32 PM »
Hi Tony,
I am sorry to say your understanding is incorrect. X and Y are the days to take the offset of two data series used in  conditions. You can read it like this: Value of series-1 on X day before today is greater than value of series-2 on Y day before today. Of course assuming you selected "greater than" condition. So, suppose your signal needs a condition that RSI(10) of yesterday is greater than RSI(14) of today then series in left side will be RSI(10) and on right it will be RSI(14). But value of X will have to be 1 and Y to be 0 because you want to compare RSI(10) of yesterday with RSI(14) of today.
I hope I clarified it. Please let me know if you need any more help.

Thanks,
Sacha
Stockalyze Support
Let's be friends

Tony

  • Hero Member
  • *****
  • Posts: 50
    • View Profile
Re: Create a Trading System
« Reply #4 on: June 05, 2018, 02:06:20 AM »
Aha. Now I think I see it.

So, X and Y independently refer to its condition/series set above it and the number used refers to some number of days from today (zero=today)?

I was incorrectly thinking it was a range of days.

Thanks,
Tony


 

Sacha

  • Administrator
  • Hero Member
  • *****
  • Posts: 570
    • View Profile
    • Stockalyze: Analyze Stocks freely and affordably.
Re: Create a Trading System
« Reply #5 on: June 05, 2018, 04:02:25 AM »
Yes. It is exactly that. Zero number of days before today is indeed today.

I am glad you are putting effort into understanding it. May I ask you a favor? In case you are native English speaker then can you please suggest to improve the wordings so that it will be easier to understand for others too?
I am open for suggestion to improve it and make it easier to understand.

Thanks,
Sacha
Stockalyze Support
Let's be friends

Tony

  • Hero Member
  • *****
  • Posts: 50
    • View Profile
Re: Create a Trading System
« Reply #6 on: June 05, 2018, 12:29:03 PM »
I will gladly do that.
As I exercise my knowledge of how to create custom "Stock Ideas" using my many filters I use online and converting them into Stockalyze.

Maybe a forum topic to share them in the future.

Thanks,
Tony

Tony

  • Hero Member
  • *****
  • Posts: 50
    • View Profile
Re: Create a Trading System
« Reply #7 on: June 05, 2018, 08:16:17 PM »
I think the first thing that confused me was the word "during" in the condition window.

That word made me think if the number was greater than 1 then it meant "any" of the days from 0 to what ever number you put in either X or Y. I now know that is not the case.

In your example in the Help file you go through setting a MACD condition, but there is no explanation of "M" or "N" and when you select greater than or less than, it changes to "X" and "Y".
Does "M" and "N" refer to a range of days, or a specific number of days to offset also?

And in the condition window, I now understand that the "Add Condition" button inserts and AND statement to your condition and the "ADD Sub Condition" button inserts an OR statement to the condition. I didn't find that explained in the help file.

I created a new Trading System called CCI(10).
See attached.

Basically it's defined as:
CCI(10) crossed above 100
and CCI(10) 1 day ago was below 100 for the last 5 days

It's confusing when you read the statement it creates.
It's saying CCI(10) of yesterday is less than 100 of today.
The "of today" is not necessary in this example.

Hope this helps. I'll have more information as I make progress.

Thanks for your hard work on this.
Tony




Sacha

  • Administrator
  • Hero Member
  • *****
  • Posts: 570
    • View Profile
    • Stockalyze: Analyze Stocks freely and affordably.
Re: Create a Trading System
« Reply #8 on: June 06, 2018, 06:48:46 PM »
"during" is used for the signals when you want an event to have occurred in last few days. For example suppose you want to create a system where buy signal will be generated if MACD gives buy signal but only when RSI too has given buy signal sometime in past 5 days. In that case you will add a condition for RSI to cross-over 30 during M=0 and N=5 days.
Quote
It's saying CCI(10) of yesterday is less than 100 of today.
The "of today" is not necessary in this example.
Yes, "of today" is not needed in this case. But machine generated sentences are sometimes weird. :)
Stockalyze Support
Let's be friends