HOD/LOD/PMH/PML/PDH/PDL Strategy by @tradingbauhaus This script is a trading strategy @tradingbauhaus designed to trade based on key price levels, such as the High of Day (HOD), Low of Day (LOD), Premarket High (PMH), Premarket Low (PML), Previous Day High (PDH), and Previous Day Low (PDL). Below, I’ll explain in detail what the script does:
Core Functionality of the Script:
Calculates Key Price Levels:
HOD (High of Day): The highest price of the current day.
LOD (Low of Day): The lowest price of the current day.
PMH (Premarket High): The highest price during the premarket session (before the market opens).
PML (Premarket Low): The lowest price during the premarket session.
PDH (Previous Day High): The highest price of the previous day.
PDL (Previous Day Low): The lowest price of the previous day.
Draws Horizontal Lines on the Chart:
Plots horizontal lines on the chart for each key level (HOD, LOD, PMH, PML, PDH, PDL) with specific colors for easy visual identification.
Defines Entry and Exit Rules:
Long Entry (Buy): If the price crosses above the PMH (Premarket High) or the PDH (Previous Day High).
Short Entry (Sell): If the price crosses below the PML (Premarket Low) or the PDL (Previous Day Low).
Long Exit: If the price reaches the HOD (High of Day) during a long position.
Short Exit: If the price reaches the LOD (Low of Day) during a short position.
How the Script Works Step by Step:
Calculates Key Levels:
Uses the request.security function to fetch the HOD and LOD of the current day, as well as the highs and lows of the previous day (PDH and PDL).
Calculates the PMH and PML during the premarket session (before 9:30 AM).
Plots Levels on the Chart:
Uses the plot function to draw horizontal lines on the chart representing the key levels (HOD, LOD, PMH, PML, PDH, PDL).
Each level has a specific color for easy identification:
HOD: White.
LOD: Purple.
PDH: Orange.
PDL: Blue.
PMH: Green.
PML: Red.
Defines Trading Rules:
Uses conditions with ta.crossover and ta.crossunder to detect when the price crosses key levels.
Long Entry: If the price crosses above the PMH or PDH, a long position (buy) is opened.
Short Entry: If the price crosses below the PML or PDL, a short position (sell) is opened.
Long Exit: If the price reaches the HOD during a long position, the position is closed.
Short Exit: If the price reaches the LOD during a short position, the position is closed.
Executes Orders Automatically:
Uses the strategy.entry and strategy.close functions to open and close positions automatically based on the defined rules.
Advantages of This Strategy:
Based on Key Levels: Uses important price levels that often act as support and resistance.
Easy to Visualize: Horizontal lines on the chart make it easy to identify levels.
Automated: Entries and exits are executed automatically based on the defined rules.
Limitations of This Strategy:
Dependent on Volatility: Works best in markets with significant price movements.
False Crosses: There may be false crosses that generate incorrect signals.
No Advanced Risk Management: Does not include dynamic stop-loss or take-profit mechanisms.
How to Improve the Strategy:
Add Stop-Loss and Take-Profit: To limit losses and lock in profits.
Filter Signals with Indicators: Use RSI, MACD, or other indicators to confirm signals.
Optimize Levels: Adjust key levels based on the asset’s behavior.
In summary, this script is a trading strategy that operates based on key price levels, such as HOD, LOD, PMH, PML, PDH, and PDL. It is useful for traders who want to trade based on significant support and resistance levels.
Macd-convergence
MACD BY PRO MENTORCustom MACD Trading View Indicator by PRO MENTOR
The Custom MACD with 4-Color Histogram is a powerful, flexible technical indicator designed for traders who prefer customized settings and enhanced visual clarity. This indicator improves upon the traditional MACD by offering fully adjustable parameters, a dynamic 4-color histogram, and a zero-line reference to help traders make better-informed decisions.
Features:
Customizable Parameters:
Fast Length: The period for the faster moving average (default: 100).
Slow Length: The period for the slower moving average (default: 200).
Signal Smoothing: The period used to smooth the MACD signal line (default: 50).
Source: The price data used in calculations (default: close price).
Oscillator MA Type: Choice of "EMA" (Exponential Moving Average) or "SMA" (Simple Moving Average) for calculating the MACD line.
Signal Line MA Type: Choice of "EMA" or "SMA" for the signal line.
4-Color Histogram:
Green: Histogram is positive and increasing, signaling strong bullish momentum.
Lime: Histogram is positive but decreasing, indicating waning bullish momentum.
Red: Histogram is negative and decreasing, signaling strong bearish momentum.
Maroon: Histogram is negative but increasing, indicating waning bearish momentum.
Zero Line Reference:
A dotted zero line serves as a neutral reference point to identify bullish or bearish conditions. The MACD line above the zero line indicates bullish conditions, while below the zero line indicates bearish conditions.
Clear Visual Representation:
The MACD line (blue) and the signal line (orange) are plotted with distinctive colors for easy differentiation.
A color-coded histogram visually represents the strength and direction of the trend.
How It Works:
The MACD (Moving Average Convergence Divergence) is a trend-following momentum indicator. It is calculated as the difference between two moving averages: a fast and a slow moving average. The signal line, which is a smoothed moving average of the MACD line, is used to generate trading signals. This custom version allows traders to adjust key parameters to fit their trading style and market conditions.
Applications:
Identifying Trends:
When the MACD line is above the signal line and the histogram is positive, the trend is bullish.
When the MACD line is below the signal line and the histogram is negative, the trend is bearish.
Momentum Analysis:
The histogram color changes provide insight into the momentum strength and potential reversals.
Entry and Exit Signals:
Buy Signal: When the MACD line crosses above the signal line, especially above the zero line.
Sell Signal: When the MACD line crosses below the signal line, especially below the zero line.
Trend Reversal Detection:
Color changes in the histogram can alert traders to potential trend reversals or weakening momentum.
Benefits:
Customizability: Tailored to individual trading styles and market conditions with adjustable parameters.
Enhanced Visualization: The 4-color histogram provides detailed insight into trend strength and momentum shifts.
Broad Applicability: Works across various markets, including stocks, forex, cryptocurrencies, and commodities.
Limitations:
Lagging Nature: Like all moving average-based indicators, the MACD may lag in fast-moving markets.
False Signals: Sideways or choppy markets can lead to misleading signals.
Usage Tips:
Combine the Custom MACD with other technical indicators like RSI or Bollinger Bands to filter signals and improve accuracy.
Use the zero line as a reference for broader market trends.
Experiment with parameter settings to optimize the indicator for different timeframes and assets.
This Custom MACD Indicator by PRO MENTOR is a versatile tool for identifying trends, momentum, and potential trading opportunities. Its adaptability and enhanced features make it an excellent choice for traders at any experience level.
MACD Crossover with +/- FilterThis is to directly target when MACD crosses the Signal line. The purpose of this script is to target a +/- change of 3 in the MACD value after the most recent cross. It uses the value of the MACD line and holds it until a value of 3.00 + or - a crossover or crossunder happens. That's the significance of the red and green circles that appear on the chart. This is not financial advice, but I wanted to recreate what a friend of mine was doing manually and automate it for him.
The first circle that appears after MACD/SIGNAL lines cross would represent a potential trade idea. The circles after the first one match the intention of the first dot as they meet the condition of more than a value of -3 or +3 as the previous dot.
Inputs:
Standard Inputs as normal MACD (Moving Average Converging Divergence) within TradingView
Fast Length: User can change it to any value they want
Slow Length: User can change it to any value they want
Standard 12, 26, 9 as normal MACD // 9 being signal smoothing
Oscillator and Signal Line moving average type is using EMA's
Timeframe is dependent on user chart.
Circles are used for signaling the change in values. Red indicates a short-term bearish trend. Green indicates a short-term bullish trend.
Tested on lower timeframes:
1m, 3m, 5m, 15m, 60m
Not used as much on higher timeframes. Used for trading futures. This is what I use it for. It can be used for other futures than just NQ or ES, but those 2 are the ones that I've tested. Code it shown below for users to tinker with.
Style of indication symbol can be changed via settings within the indicator in the "Style" tab, as well as location of the symbol(s). Additionally, color can be changed as well, if you prefer different colors.
Not financial advice. Just trade ideas.
Price Convergence DivergenceSimple Price convergence divergence. Current close minus past or in other words lagging price.
unRekt - KISS MacdieMacdie is the MACD 'Moving Average Convergence Divergence' indicator and is part of the 'keeping it simple' series that have a similar color scheme. MACD is based on the difference between two moving averages calculated for different periods, typically 12 and 26. The MACD can show trend and strength of an asset while also showing Divergences.
Multiple MACD RSI simple strategySimple strategy script I've had for a while but looks like I never published.
Although it is one of my most simple it seems to have the best profitability. It is pretty rough though. the Stoch RSI has only a little weight to the trade trigger. I'll refine it more over time or you can by all means. Basically the Stoch RSI current K line has to be OVER 40 to trigger a SELL. It has no effect on buy side.
The triggers are roughly as follows:
Year - since so many assets have gone 2x, 3x, 10x+ since 2013 having a strategy that earns a 500% return from 2013 to now isn't that good if buy-and-holding would have got you 800%. This eliminates some of that noise and makes it a little easier to quickly gauge success. So buy/sell trigger need a value of greater or equal to 2018 (default)
MACD 1 - First MACD (short) needs to indicate greater than 0 to buy or less than 0 to sell.
MACD 2 - Same as MACD1 but for second MACD set (long)
Uptrend - Latest close + high divided by last periods close + high needs to be grater than 1. So if latest is 34.30 close and 34.60 high and previous interval is 34.80 close and 34.82 high, that is 0.99 and will not trigger a buy trade.
Downtrend - Same thing but close + low and less than 1.
This script/strategy is pretty rough but if there is interest I'll polish it more since it is a pretty solid but simple strategy for most assets.