Closed ghost closed 8 years ago
Hi Potholiday,
Currently, JStock indicator editor can only create simple indicator.
Also can you add a crossover up or down (not greater or lesser than) function to editor this way scanning of MA crossovers would be easier
I don't understand your request. From the indicators which you had submitted to me, I thought you already create some cross over indicators?
Hello @yccheok Sorry for the late reply.The indicators i submitted discovers stocks after the crossover (ma1 lesser or greater than ma2) and not the exact crossover point. "add a crossover up or down" means while scanning it should find stocks which are just crossovered above or below or before some particular days. see this image the circles part is the actual crossover point http://i.investopedia.com/inv/articles/site/Crossover2.gif
So, do you mean you want an indicator which you can ask question :
Does cross over point happen on yesterday?
The indicator will answer either true or false?
@yccheok Yes it should give a true or false result
example lets say today a stock ABC's MA-10days crossover above MA-30days then crossup function should give a True and crossdown function should give a False
Similarly today another stock XYZ's MA-10days crossover below MA-30days then crossup function should give a False and crossdown function should give a True
If possible make the crossover function little bit advanced like this
find stocks which has cross over above (MA10 ->MA30) with in n days (n=1,2,3...)
Thanks for including Standard deviation in new update
Just throwing my 2-cents into the ring here about CrossUp and CrossDown functions...
The issue here is that the indicators return T/F. But that doesn't really make sense in the context of a "crossover" as a cross-over happens on a date (or time).
So the function needs to take time into account. Something perhaps like this: CrossUp(StartDate, EndDate, MA1, MA2).
This would check MA1 and MA2 at StartDate and compare that to MA1 and MA2 at EndDate. And that would result in a T/F result.
But even then it is messy as the two could potentially be riding on top of each other. So to determine if a crossover is "here to stay" you would probably also want to check for up/down trends against MA1 and MA2.
just a thought...
cheers, -randall
HI @RandallSell Long time no see :). I do like to make indicators in tradingview.com and they use a programme called pine script. They have a simple cross over function with only two variables.
crossover(A, B)
The A-series is defined as having crossed over B-series if the value of A is greater than the value of B and the value of A was less than the value of B on the bar immediately preceding the current bar.
https://www.tradingview.com/study-script-reference/#fun_crossover
I want to add WMA,HMA,DEMA,TEMA,GMMA etc. If provided formula can you add these indicators to jstock.
Also can you add a crossover up or down (not greater or lesser than) function to editor this way scanning of MA crossovers would be easier
eg MA50+MA200->crossover()->alert