MACD signal-line crossovers
Forums › ProRealTime English forum › ProScreener support › MACD signal-line crossovers
- This topic has 7 replies, 2 voices, and was last updated 3 years ago by robertogozzi.
-
-
03/19/2021 at 8:12 PM #164719
Thank you all for the superb help and advice you give here which is a huge help to us novice ‘scripters’!
I am trying and failing to code a screener for the crossover of 2 MACD signal lines (say the 12,26 crossing the 100,200) which I had expected to be simple, instead the results are always bafflingly wrong.
Having tried numerous permutations over two days, I would greatly appreciate seeing the code that would achieve this. Many thanks.
03/19/2021 at 8:35 PM #164725Having been driving myself crazy with trying to code this, I have just noticed the question one before, where it is mentioned that the ProScreener can only cope with 254 bars, although in the example given a 200 EMA was failing to compute.
Please could you tell the limitation in bars?
Also, I did code a very basic ‘1, -1 or 0’ indicator to draw the point of MACD signal-line crossovers. I had hoped that a ‘call’ to this might get round the problem. Would it be easy – in layman’s terms, to say why not please?
03/19/2021 at 9:07 PM #164728Exponential calculations require more bars.
Use SMA’s, instead.
03/19/2021 at 11:11 PM #164734Aha, thank you robertogozzi, I had blithely assumed a 100 day EMA used 100 days of data (easy mistake to make!). Thank you for this insight!
So I suppose 254 bars is the absolute limit on ProScreener.
I’m still wondering why I can’t just call the binary result from another calculation though – am I missing something?
03/19/2021 at 11:16 PM #164735Anyone who replies with the answer “brain cells” goes straight to the naughty step! 🙂
03/19/2021 at 11:58 PM #164736You are not missing anything.
PRT are working to make ProScreener better and we do all hope by the end of 2021, early 2022 at the latest, good news may arrive.
03/20/2021 at 12:37 AM #164739Thank you again Roberto! One final question if I may – do you happen to know how long an EMA ProScreener, as it stands, can adequately cope with please?
03/20/2021 at 1:27 AM #164742I heve no idea, If I can remember well around 50 periods.
I once tried several different periods before having it working fine.
-
AuthorPosts