OPEN-SOURCE SCRIPT
PriceAction & Economic Strategy

This indicator combines price-action logic with macroeconomic data to generate trading signals.
Features:
- Price-action signals: A bullish signal occurs when a candle closes above its open; a bearish signal occurs when a candle closes below its open.
- Signal gap: The indicator includes an input called "Signal Gap (bars)" that defines the minimum number of bars between signals. By default the gap is set to 3, but you can adjust this between 1 and 10 to control signal frequency.
- Alerts: The script defines alert conditions for long and short signals, allowing you to create TradingView alerts that notify you when a new signal occurs.
- Economic data: The script uses TradingView's built-in `request.economic()` function to request U.S. GDP data. The GDP series is plotted in the Data Window for additional macroeconomic context.
How to use:
1. Add the indicator to a chart.
2. Open the indicator's settings and adjust the "Signal Gap (bars)" input to set the minimum bar gap between signals.
3. Look for green triangles plotted below the bars (bullish signals) and red triangles plotted above the bars (bearish signals). These appear only when the gap criterion is met.
4. If you want alerts, click the Alert button in TradingView, select this indicator, and choose either the Long or Short alert conditions.
5. To view the GDP data, open the Data Window; the GDP value will be shown alongside other series for each bar.
6. Use these signals in combination with your own analysis; this indicator is for educational purposes and does not constitute financial advice.
Features:
- Price-action signals: A bullish signal occurs when a candle closes above its open; a bearish signal occurs when a candle closes below its open.
- Signal gap: The indicator includes an input called "Signal Gap (bars)" that defines the minimum number of bars between signals. By default the gap is set to 3, but you can adjust this between 1 and 10 to control signal frequency.
- Alerts: The script defines alert conditions for long and short signals, allowing you to create TradingView alerts that notify you when a new signal occurs.
- Economic data: The script uses TradingView's built-in `request.economic()` function to request U.S. GDP data. The GDP series is plotted in the Data Window for additional macroeconomic context.
How to use:
1. Add the indicator to a chart.
2. Open the indicator's settings and adjust the "Signal Gap (bars)" input to set the minimum bar gap between signals.
3. Look for green triangles plotted below the bars (bullish signals) and red triangles plotted above the bars (bearish signals). These appear only when the gap criterion is met.
4. If you want alerts, click the Alert button in TradingView, select this indicator, and choose either the Long or Short alert conditions.
5. To view the GDP data, open the Data Window; the GDP value will be shown alongside other series for each bar.
6. Use these signals in combination with your own analysis; this indicator is for educational purposes and does not constitute financial advice.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Knowledge's Joe
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Knowledge's Joe
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
