0
votes

Please see chart here: https://www.tradingview.com/chart/tVCPr25A/

I am using two indicators/strategies (studies, technically):

  • Reverse MACD
  • Higher High Lower Low

I would like to trigger an alert only when both the indicators are present on the same candle.

Specifically here are the two cases:

enter image description here

enter image description here

Will a whole new strategy need to be created that is an amalgamation of the two, or is there a way to 'reference' one of them in the other (or reference both in a smaller, new script) that can require both to be present as an alertcondition?

1

1 Answers

0
votes

If you have source for both, you can merge the 2 codebases into one:

https://www.pinecoders.com/faq_and_code/#can-i-merge-2-or-more-indicators-into-one

If you only have source for one of them, you can use an external input to connect one of the plots of the closed-source indicator to your open-source one:

https://www.pinecoders.com/faq_and_code/#how-can-i-use-one-scripts-output-as-an-input-into-another

Disclosure: the link in this answer points to a PineCoders FAQ entry. I am a member of the PineCoders community and I most probably wrote that FAQ entry. PineCoders is a TradingView-supported group of volunteer Pine coders and PineCoders' website is strictly educational. Neither TradingView nor PineCoders benefits financially from sending traffic to pinecoders.com, and the site contains no affiliate/referral links.