Gabriel's Witcher Strategy [65 Minute Trading Bot]Strategy Description: Gabriel's Witcher Strategy
Author: Gabriel
Platform: TradingView Pine Script (Version 5)
Backtested Asset: Avalanche (Coinbase Brokage for Volume adjustment)
Timeframe: 65 Minutes
Strategy Type: Comprehensive Trend-Following and Momentum Strategy with Scalping and Risk Management Features
Overview
Gabriel's Witcher Strategy is an advanced trading bot designed for the Avalanche pair on a 65-minute timeframe. This strategy integrates a multitude of technical indicators to identify and execute high-probability trading opportunities. By combining trend-following, momentum, volume analysis, and range filtering, the strategy aims to capitalize on both long and short market movements. Additionally, it incorporates scalping mechanisms and robust risk management features, including take-profit (TP) levels and commission considerations, to optimize trade performance and profitability.
====Key Components====
Source Selection:
Custom Source Flexibility: Allows traders to select from a wide range of price and volume sources (e.g., Close, Open, High, Low, HL2, HLC3, OHLC4, VWAP, On-Balance Volume, etc.) for indicator calculations, enhancing adaptability to various trading styles.
Various curves of Volume Analysis are employed:
Tick Volume Calculation: Utilizes tick volume as a fallback when actual volume data is unavailable, ensuring consistency across different data feeds.
Volume Indicators: Incorporates multiple volume-based indicators such as On-Balance Volume (OBV), Accumulation/Distribution (AccDist), Negative Volume Index (NVI), Positive Volume Index (PVI), and Price Volume Trend (PVT) for comprehensive market analysis.
Trend Indicators:
ADX (Average Directional Index): Measures trend strength using either the Classic or Masanakamura method, with customizable length and threshold settings. It's used to open positions when the mesured trend is strong, or exit when its weak.
Jurik Moving Average (JMA): A smooth moving average that reduces lag, configurable with various parameters including source, resolution, and repainting options.
Parabolic SAR: Identifies potential reversals in market trends with adjustable start, increment, and maximum settings.
Custom Trend Indicator: Utilizes highest and lowest price points over a specified timeframe to determine current and previous trend bases, visually represented with color-filled areas.
Momentum Indicators:
Relative Strength Index (RSI): Evaluates the speed and change of price movements, smoothed with a custom length and source. It's used to not enter the market for shorts in oversold or longs for overbought conditions, and to enter for long in oversold or shorts for overboughts.
Momentum-Based Calculations: Employs both Double Exponential Moving Averages (DEMA) on a MACD-based RSI to enhance momentum signal accuracy which is then further accelerated by a Hull MA. This is the technical analysis tool that determines bearish or bullish momentum.
OBV-Based Momentum Conditions: Uses two exponential moving averages of OBV to determine bullish or bearish momentum shifts, anomalities, breakouts where banks flow their funds in or Smart Money Concepts trade.
Moving Averages (MA):
Multiple MA Types: Includes Simple Moving Average (SMA), Exponential Moving Average (EMA), Weighted Moving Average (WMA), Hull Moving Average (HMA), and Volume-Weighted Moving Average (VWMA), selectable via input parameters.
MA Speed Calculation: Measures the percentage change in MA values to determine the direction and speed of the trend.
Range Filtering:
Variance-Based Filter: Utilizes variance and moving averages to filter out trades during low-volatility periods, enhancing trade quality.
Color-Coded Range Indicators: Visualizes range filtering with color changes on the chart for quick assessment.
Scalping Mechanism:
Heikin-Ashi Candles: Optionally uses Heikin-Ashi candles for smoother price action analysis.
EMA-Based Trend Detection: Employs fast, medium, and slow EMAs to determine trend direction and potential entry points.
Fractal-Based Filtering: Detects regular or BW (Black & White) fractals to confirm trade signals.
Take Profit (TP) Management:
Dynamic TP Levels: Calculates TP levels based on the number of consecutive long or short entries, adjusting targets to maximize profits.
TP Signals and Re-Entry: Plots TP signals on the chart and allows for automatic re-entry upon TP hit, maintaining continuous trade flow.
Risk Management:
Commission Integration: Accounts for trading commissions to ensure net profitability.
Position Sizing: Configured to use a percentage of equity for each trade, adjustable via input parameters.
Pyramiding: Allows up to one additional position per direction to enhance gains during strong trends.
Alerts and Visual Indicators:
Buy/Sell Signals: Plots visual indicators (triangles and flags) on the chart to signify entry and TP points.
Bar Coloring: Changes bar colors based on ADX and trend conditions for immediate visual cues.
Price Levels: Marks significant price levels related to TP and position entries with cross styles.
Input Parameters
Source Settings:
Custom Sources (srcinput): Choose from various price and volume sources to tailor indicator calculations.
ADX Settings:
ADX Type (ADX_options): Select between 'CLASSIC' and 'MASANAKAMURA' methods.
ADX Length (ADX_len): Defines the period for ADX calculation.
ADX Threshold (th): Sets the minimum ADX value to consider a strong trend.
RSI Settings:
RSI Length (len_3): Period for RSI calculation.
RSI Source (src_3): Source data for RSI.
Trend Strength Settings:
Channel Length (n1): Period for trend channel calculation.
Average Length (n2): Period for smoothing trend strength.
Jurik Moving Average (JMA) Settings:
JMA Source (inp): Source data for JMA.
JMA Resolution (reso): Timeframe for JMA calculation.
JMA Repainting (rep): Option to allow JMA to repaint.
JMA Length (lengths): Period for JMA.
Parabolic SAR Settings:
SAR Start (start): Initial acceleration factor.
SAR Increment (increment): Acceleration factor increment.
SAR Maximum (maximum): Maximum acceleration factor.
SAR Point Width (width): Visual width of SAR points.
Trend Indicator Settings:
Trend Timeframe (timeframe): Period for trend indicator calculations.
Momentum Settings:
Source Type (srcType): Select between 'Price' and 'VWAP'.
Momentum Source (srcPrice): Source data for momentum calculations.
RSI Length (rsiLen): Period for momentum RSI.
Smooth Length (sLen): Smoothing period for momentum RSI.
OBV Settings:
OBV Line 1 (e1): EMA period for OBV line 1.
OBV Line 2 (e2): EMA period for OBV line 2.
Moving Average (MA) Settings:
MA Length (length): Period for MA calculations.
MA Type (matype): Select MA type (1: SMA, 2: EMA, 3: HMA, 4: WMA, 5: VWMA).
Range Filter Settings:
Range Filter Length (length0): Period for range filtering.
Range Filter Multiplier (mult): Multiplier for range variance.
Take Profit (TP) Settings:
TP Long (tp_long0): Percentage for long TP.
TP Short (tp_short0): Percentage for short TP.
Scalping Settings:
Scalping Activation (ACT_SCLP): Enable or disable scalping.
Scalping Length (HiLoLen): Period for scalping indicators.
Fast EMA Length (fastEMAlength): Period for fast EMA in scalping.
Medium EMA Length (mediumEMAlength): Period for medium EMA in scalping.
Slow EMA Length (slowEMAlength): Period for slow EMA in scalping.
Filter (filterBW): Enable or disable additional fractal filtering.
Pullback Lookback (Lookback): Number of bars for pullback consideration.
Use Heikin-Ashi Candles (UseHAcandles): Option to use Heikin-Ashi candles for smoother trend analysis.
Strategy Logic
Indicator Calculations:
Volume and Source Selection: Determines the primary data source based on user input, ensuring flexibility and adaptability.
ADX Calculation: Computes ADX using either the Classic or Masanakamura method to assess trend strength.
RSI Calculation: Evaluates market momentum using RSI, further smoothed with custom periods.
Trend Strength Assessment: Utilizes trend channel and average lengths to gauge the robustness of current trends.
Jurik Moving Average (JMA): Smooths price data to reduce lag and enhance trend detection.
Parabolic SAR: Identifies potential trend reversals with adjustable parameters for sensitivity.
Momentum Analysis: Combines RSI with DEMA and OBV-based conditions to confirm bullish or bearish momentum.
Moving Averages: Employs multiple MA types to determine trend direction and speed.
Range Filtering: Filters out low-volatility periods to focus on high-probability trades.
Trade Conditions:
Long Entry Conditions:
ADX Confirmation: ADX must be above the threshold, indicating a strong uptrend.
RSI and Momentum: RSI below 70 and positive momentum signals.
JMA and SAR: JMA indicates an uptrend, and Parabolic SAR is below the price.
Trend Indicator: Confirms the current trend direction.
Range Filter: Ensures market is in an upward range.
Scalping Option: If enabled, additional scalping conditions must be met.
Short Entry Conditions:
ADX Confirmation: ADX must be above the threshold, indicating a strong downtrend.
RSI and Momentum: RSI above 30 and negative momentum signals.
JMA and SAR: JMA indicates a downtrend, and Parabolic SAR is above the price.
Trend Indicator: Confirms the current trend direction.
Range Filter: Ensures market is in a downward range.
Scalping Option: If enabled, additional scalping conditions must be met.
Position Management:
Entry Execution: Places long or short orders based on the identified conditions and user-selected position types (Longs, Shorts, or Both).
Take Profit (TP): Automatically sets TP levels based on predefined percentages, adjusting dynamically with consecutive trades.
Re-Entry Mechanism: Allows for automatic re-entry upon TP hit, maintaining active trading positions.
Exit Conditions: Closes positions when TP levels are reached or when opposing trend signals are detected.
Visual Indicators:
Bar Coloring: Highlights bars in green for bullish conditions, red for bearish, and orange for neutral.
Plotting Price Levels: Marks significant price levels related to TP and trade entries with cross symbols.
Signal Shapes: Displays triangle and flag shapes on the chart to indicate trade entries and TP hits.
Alerts:
Custom Alerts: Configured to notify traders of long entries, short entries, and TP hits, enabling timely trade management and execution.
Usage Instructions
Setup:
Apply the Strategy: Add the script to your TradingView chart set to BTCUSDT with a 65-minute timeframe.
Configure Inputs: Adjust the input parameters under their respective groups (e.g., Source Settings, ADX, RSI, Trend Strength, etc.) to match your trading preferences and risk tolerance.
Position Selection:
Choose Position Type: Use the Position input to select Longs, Shorts, or Both based on your market outlook.
Execution: The strategy will automatically execute and manage positions according to the selected type, ensuring targeted trading actions.
Signal Interpretation:
Buy Signals: Blue triangles below the bars indicate potential long entry points.
Sell Signals: Red triangles above the bars indicate potential short entry points.
Take Profit Signals: Flags above or below the bars signify TP hits for long and short positions, respectively.
Bar Colors: Green bars suggest bullish conditions, red bars indicate bearish conditions, and orange bars represent neutral or consolidating markets.
Risk Management:
Default Position Size: Set to 100% of equity. Adjust the default_qty_value as needed for your risk management strategy.
Commission: Accounts for a 0.1% commission per trade. Adjust the commission_value to match your broker's fees.
Pyramiding: Allows up to one additional position per direction to enhance gains during strong trends.
Backtesting and Optimization:
Historical Testing: Utilize TradingView's backtesting features to evaluate the strategy's performance over historical data.
Parameter Tuning: Optimize input parameters to align the strategy with current market dynamics and personal trading objectives.
Alerts Configuration:
Set Up Alerts: Enable and configure alerts based on the predefined alertcondition statements to receive real-time notifications of trade signals and TP hits.
Additional Features
Comprehensive Indicator Integration: Combines multiple technical indicators to provide a holistic view of market conditions, enhancing trade signal accuracy.
Scalping Options: Offers an optional scalping mechanism to capitalize on short-term price movements, increasing trading flexibility.
Dynamic Take Profit Levels: Adjusts TP targets based on the number of consecutive trades, maximizing profit potential during favorable trends.
Advanced Volume Analysis: Utilizes various volume indicators to confirm trend strength and validate trade signals.
Customizable Range Filtering: Filters trades based on market volatility, ensuring trades are taken during optimal conditions.
Heikin-Ashi Candle Support: Optionally uses Heikin-Ashi candles for smoother price action analysis and reduced noise.
====Recommendations====
Thorough Backtesting:
Historical Performance: Before deploying the strategy in a live trading environment, perform comprehensive backtesting to understand its performance under various market conditions. These are the premium settings for Avalanche Coinbase.
Optimization: Regularly review and adjust input parameters to ensure the strategy remains effective amidst changing market volatility and trends. Backtest the strategy for each crypto and make sure you are in the right brokage when using the volume sources as it will affect the overall outcome of the trading strategy.
Risk Management:
Position Sizing: Adjust the default_qty_value to align with your risk tolerance and account size.
Stop-Loss Implementation: Although the strategy includes TP levels, they're also consided to be a stop-loss mechanisms to protect against adverse market movements.
Commission Adjustment: Ensure the commission_value accurately reflects your broker's fees to maintain realistic backtesting results. Generally, 0.1~0.3% are most of the average broker's comission fees.
Slipage: The slip comssion is 1 Tick, since the strategy is adjusted to only enter/exit on bar close where most positions are available.
Continuous Monitoring:
Strategy Performance: Regularly monitor the strategy's performance to ensure it operates as expected and make adjustments as needed. A max-drawndown hit has been added to operate in case the premium Avalanche settings go wrong, but you can turn it off an adjust the equity percentage to 50% if you are confortable with the high volatile max-drown or even 100% if your account allows you to borrow cash.
Customization:
Indicator Parameters: Tailor indicator settings (e.g., ADX length, RSI period, MA types) to better fit your specific trading style and market conditions.
Scalping Options: Enable or disable scalping based on your trading preferences and risk appetite.
Conclusion
Gabriel's Witcher Strategy is a robust and versatile trading solution designed to navigate the complexities of the Crypto market. By integrating a wide array of technical indicators and providing extensive customization options, this strategy empowers traders to execute informed and strategic trades. Its comprehensive approach, combining trend analysis, momentum detection, volume evaluation, and range filtering, ensures that trades are taken during optimal market conditions. Additionally, the inclusion of scalping features and dynamic take-profit management enhances the strategy's adaptability and profitability potential. Unlike any trading strategy, with both diligent testing and continuous monitoring under the strategy tester, it's possible to achieve sustained success by adjusting the settings to the individual Crypto that need it, for example this one is preset for Avalanche Coinbase 65 Miinutes but it can be adjust for BTCUSD or Etherium if you backtest and search for the right settings.
SAR
Super 8 - 30M BTCWelcome to Super 8, the ultimate automatic trading script for Pine!
This bad boy is designed to go both long and short, and it's equipped with all the tools you need to maximize your profits. Whether you're looking to take profit, set a trailing stop, or protect yourself with a stop loss, Super 8 has you covered.
But that's not all! Super 8 is also loaded with 8 powerful indicators to help you make informed decisions. We've got the EMA, ADX, SAR, MACD, VOLUME, BOLLINGER BANDS, DONCHIAN, and ATR all working together to give you the best possible trading experience.
And if you want to take it to the next level, Super 8 also has a feature that lets you use stepped entries in normal mode or incremental 1,2,3,... to improve your average price. Plus, if you're using trailing stop, you can activate the Backtest precision to use lower timeframes.
But what's in a name? Super 8 is called that because it's just that... super! It's tailored specifically for the OKX:BTCUSDT.P pair, so you know you're getting the best possible results. it's highly adjustable and can be used with any other pair. So no matter what market you're trading in, Super 8 has got you covered.
So if you want to level up your trading game, give Super 8 a try. You won't be disappointed.
Certain Risks of Live Algorithmic Trading:
Backtesting Cannot Assure Actual Results.
The relevant market might fail or behave unexpectedly.
Your broker may experience failures in its infrastructure, fail to execute your orders in a correct or timely fashion or reject your orders.
The system you use for generating trading orders, communicating those orders to your broker, and receiving queries and trading results from your broker may fail.
Time lag at various point in live trading might cause unexpected behavior.
The systems of third parties in addition to those of the provider from which we obtain various services, your broker, and the applicable securities market may fail or malfunction.
Market First - Relative Strength/Weakness (the ZenBot strategy)This market-first trading strategy gives BUY, SHORT, and CLOSE signals based on volume, trend, and relative strength or weakness to the market (SPY by default, can be customized). This indicator is useful for signaling day-trade entries and exits for tickers that are strong (or weak) against the market.
Stocks that are showing relative strength (or weakness) to the market, are trending, and have decent movement generate a buy (or short) signal. When the trend runs out, a CLOSE signal is fired.
Potential profit (based on ATR) and actual profit is calculated, predicting the type of move expected
Unique 'stay in trade' logic helps prevent unnecessary CLOSE signals if a trend is likely to continue
A colored plot indicates the strength of the current trend and turns orange/red when the strength is weakened.
Crypto traders can uncheck 'Trade during market hours' for 24-hour trading, and should change the comparison ticker from SPY to BTCUSD or something similar for their market.
Enjoy!
KEY CONCEPTS
The three- and five-minute timeframes are used to establish and verify trend ( ADX /DI with custom logic)
Entries and exits are based on Parabolic SAR and confirmed on multiple timeframes, trend, and relative volume
Relative strength /weakness to the market compares ticker to SPY
Chop is avoided at all costs. I've experimented with choppiness indicator below 38, but found that the ADX DI+/- readings work even better.
Trend is established using ADX DI+/- readings over 20, confirmed by EMA 5/13 crossover and EMA5 slope
Signals will fire only if the average volume for the current 5-min bar is above normal
Only tickers with a five-bar / 13 period ATR of 1% the ticker's price generate signal.
Only longs above daily-anchored VWAP , shorts below daily-anchored VWAP
Signals fire on bar close to prevent repainting / look-ahead bias
Indicator labels and alerts generated
SIGNALS
BUY: up-trending tickers showing relative strength are bought on the three-minute PSAR
SELL: when the close price falls below the 1, 3, and 5-minute PSAR, or the ADX DI- falls below 20
SHORT: down-trending tickers with relative weakness are shorted on the three-minute PSAR
COVER: when the close price moves above the 1, 3, and 5-minute PSAR, or the ADX DI- falls below 20
ALERTS
Alerts are generated on BUY, SELL, SHORT, and COVER signals, as well as optional LOST RELATIVE STRENGTH and LOST RELATIVE WEAKNESS
INPUTS
Use relative strength /weakness comparison with the market : trigger trades based on the ticker's strength or weakness to the selected comparison ticker (usually SPY for equities or BTCUSD for crypto)
[* ]Comparison Ticker for relative strength /weakness : Ticker to compare against for relative strength /weakness
Trade during market hours only : Take buy/sells during specified hours. Disable this for crypto trading.
[* ]Market hours (market time) : Customize market hours - defaults to 9:30 to 16:00 EST
[* ]"Only trade very strong trends" : take trades only if an established trend is very strong ( ADX over 40 ) (DEFAULT = ON)
"Limit trade direction to VWAP" : Long trades only above VWAP , shorts below (DEFAULT = ON)
"Limit trade direction to Market direction" : Long trades only if SPY (or selected comparison ticker) is up, shorts if the market is down. (DEFAULT= ON)
"Limit trades based on a ticker's green/red status for the day" : Long trades if the ticker is green for the day, shorts if red. (DEFAULT = ON)
parabolic sar with ema and rsi, this strategy includes 3 free trading view indicators, with HIGH ken ashee candles , now lets go ahead and add them to our chart ,
the 1st indicator is parabolic saarr and the 2nd indicator is E M A , and the final one is R S I , and we have to change some settings , change this E M A length from 9 to 200 ,
and change some settings on R S I indicator , so lets remove all options except for , the R S I , and the R S I middle band , and parabolic saarr on default sittings , now our strategy is ready , lets go into trading rules .
for a long signal to be valid , the price must be above 200 E M A ,with NEW buy signal from parabolic saarr, if , R S I above the middle 50 line
for a short signal to be valid , the price must be below 200 E M A , with NEW SELL signal from parabolic saarr ,if ,R S I BELOW 50 line
now we can go ahead and take a SHORT position
our stoploss must be above the recent higher high
and the risk to reward ratio will be 2
Up & Down Trend Trading Strategy - BNB/USDT 15minThis strategy will focus on up trend trading and down trend trading based on several indicators such as;
for up trend
1. SAR indicator
2. Super trend indicator
3. Simple moving average for the period of 100
down trend
1. RSI Indicator
2. Money flow index
3. Relative volatility index
4. Balance of powder
CryptoNite - Machine Learning Strategy (15Min Timeframe)Greeting Traders! I am back with another ML strategy. :D I kept my word with combining my machine learning algorithms from Python and integrating them into Tradingview. Thanks to Tradingview's new release of Pinescript v5 it is now possible. This strategy respects the Sortino Ratio and was created using 2 years of data for 50 different cryptocurrencies. That is a total of 100 years of data and 44,849 trades to create this strategy. Now let me tell you, my computer and I are exhausted. We both been at it non-stop for about two months everyday. I refine the strategy, and the computer runs 24/7 for a few days to spit out the best results into the terminal. It's been a good run so my computer will finally get some sleep tonight.
So let's talk a little about the features of the strategy. In the settings window, you'll see the Stoploss, Take Profit Parameters, and Date Range. You can change the Date Range, but I recommend to leave the SL/TP parameters how they are because the machine learning algo chose those input. If you wish to change them you are always welcome to do so but backtest results will change. For the Take Profit parameters you'll see on the left side you something labeled time duration(displayed in minutes) and on the right side you'll see take profit values. Let's talk a little bit how they work.
TP_values = {
"0": 0.102,
"133": 0.051,
"431": 0.039,
"963": 0
}
In python, the table looks like this but it is quite easy to understand in Tradingview.
From 0-133 minutes, the strategy is looking to the reach target point 1 at 10.2% profit.
From 133-431 minutes, the strategy is looking to the reach target point 2 at 5.1% profit.
From 431-963 minutes, the strategy is looking to the reach target point 3 at 3.9% profit.
From 963+ minutes, the strategy is looking to break even at 0% profit on target point 4.
Through each target point a sell trigger is active. It will look for the best time to sell even if TP has not been reached.
This helps the trade not stay open too long.
The last thing I need to mention is the textbox displayed on the right side of your chart. This textbox displays the current Take Profit value in dollar amount. So when you're in a trade you'll know what TP target has to be reached when the open trade is active. Throughout time, the target price changes depending how long the trade has been open. If you have any questions feel free to comment down below, and enjoy this strategy!
888 BOT #backtest█ 888 BOT #backtest (open source)
This is an Expert Advisor 'EA' or Automated trading script for ‘longs’ and ‘shorts’, which uses only a Take Profit or, in the worst case, a Stop Loss to close the trade.
It's a much improved version of the previous ‘Repanocha’. It doesn`t use 'Trailing Stop' or 'security()' functions (although using a security function doesn`t mean that the script repaints) and all signals are confirmed, therefore the script doesn`t repaint in alert mode and is accurate in backtest mode.
Apart from the previous indicators, some more and other functions have been added for Stop-Loss, re-entry and leverage.
It uses 8 indicators, (many of you already know what they are, but in case there is someone new), these are the following:
1. Jurik Moving Average
It's a moving average created by Mark Jurik for professionals which eliminates the 'lag' or delay of the signal. It's better than other moving averages like EMA , DEMA , AMA or T3.
There are two ways to decrease noise using JMA . Increasing the 'LENGTH' parameter will cause JMA to move more slowly and therefore reduce noise at the expense of adding 'lag'
The 'JMA LENGTH', 'PHASE' and 'POWER' parameters offer a way to select the optimal balance between 'lag' and over boost.
Green: Bullish , Red: Bearish .
2. Range filter
Created by Donovan Wall, its function is to filter or eliminate noise and to better determine the price trend in the short term.
First, a uniform average price range 'SAMPLING PERIOD' is calculated for the filter base and multiplied by a specific quantity 'RANGE MULTIPLIER'.
The filter is then calculated by adjusting price movements that do not exceed the specified range.
Finally, the target ranges are plotted to show the prices that will trigger the filter movement.
Green: Bullish , Red: Bearish .
3. Average Directional Index ( ADX Classic) and ( ADX Masanakamura)
It's an indicator designed by Welles Wilder to measure the strength and direction of the market trend. The price movement is strong when the ADX has a positive slope and is above a certain minimum level 'ADX THRESHOLD' and for a given period 'ADX LENGTH'.
The green color of the bars indicates that the trend is bullish and that the ADX is above the level established by the threshold.
The red color of the bars indicates that the trend is down and that the ADX is above the threshold level.
The orange color of the bars indicates that the price is not strong and will surely lateralize.
You can choose between the classic option and the one created by a certain 'Masanakamura'. The main difference between the two is that in the first it uses RMA () and in the second SMA () in its calculation.
4. Parabolic SAR
This indicator, also created by Welles Wilder, places points that help define a trend. The Parabolic SAR can follow the price above or below, the peculiarity that it offers is that when the price touches the indicator, it jumps to the other side of the price (if the Parabolic SAR was below the price it jumps up and vice versa) to a distance predetermined by the indicator. At this time the indicator continues to follow the price, reducing the distance with each candle until it is finally touched again by the price and the process starts again. This procedure explains the name of the indicator: the Parabolic SAR follows the price generating a characteristic parabolic shape, when the price touches it, stops and turns ( SAR is the acronym for 'stop and reverse'), giving rise to a new cycle. When the points are below the price, the trend is up, while the points above the price indicate a downward trend.
5. RSI with Volume
This indicator was created by LazyBear from the popular RSI .
The RSI is an oscillator-type indicator used in technical analysis and also created by Welles Wilder that shows the strength of the price by comparing individual movements up or down in successive closing prices.
LazyBear added a volume parameter that makes it more accurate to the market movement.
A good way to use RSI is by considering the 50 'RSI CENTER LINE' centerline. When the oscillator is above, the trend is bullish and when it is below, the trend is bearish .
6. Moving Average Convergence Divergence ( MACD ) and ( MAC-Z )
It was created by Gerald Appel. Subsequently, the histogram was added to anticipate the crossing of MA. Broadly speaking, we can say that the MACD is an oscillator consisting of two moving averages that rotate around the zero line. The MACD line is the difference between a short moving average 'MACD FAST MA LENGTH' and a long moving average 'MACD SLOW MA LENGTH'. It's an indicator that allows us to have a reference on the trend of the asset on which it is operating, thus generating market entry and exit signals.
We can talk about a bull market when the MACD histogram is above the zero line, along with the signal line, while we are talking about a bear market when the MACD histogram is below the zero line.
There is the option of using the MAC-Z indicator created by LazyBear, which according to its author is more effective, by using the parameter VWAP ( volume weighted average price ) 'Z-VWAP LENGTH' together with a standard deviation 'STDEV LENGTH' in its calculation.
7. Volume Condition
Volume indicates the number of participants in this war between bulls and bears, the more volume the more likely the price will move in favor of the trend. A low trading volume indicates a lower number of participants and interest in the instrument in question. Low volumes may reveal weakness behind a price movement.
With this condition, those signals whose volume is less than the volume SMA for a period 'SMA VOLUME LENGTH' multiplied by a factor 'VOLUME FACTOR' are filtered. In addition, it determines the leverage used, the more volume , the more participants, the more probability that the price will move in our favor, that is, we can use more leverage. The leverage in this script is determined by how many times the volume is above the SMA line.
The maximum leverage is 8.
8. Bollinger Bands
This indicator was created by John Bollinger and consists of three bands that are drawn superimposed on the price evolution graph.
The central band is a moving average, normally a simple moving average calculated with 20 periods is used. ('BB LENGTH' Number of periods of the moving average)
The upper band is calculated by adding the value of the simple moving average X times the standard deviation of the moving average. ('BB MULTIPLIER' Number of times the standard deviation of the moving average)
The lower band is calculated by subtracting the simple moving average X times the standard deviation of the moving average.
the band between the upper and lower bands contains, statistically, almost 90% of the possible price variations, which means that any movement of the price outside the bands has special relevance.
In practical terms, Bollinger bands behave as if they were an elastic band so that, if the price touches them, it has a high probability of bouncing.
Sometimes, after the entry order is filled, the price is returned to the opposite side. If price touch the Bollinger band in the same previous conditions, another order is filled in the same direction of the position to improve the average entry price, (% MINIMUM BETTER PRICE ': Minimum price for the re-entry to be executed and that is better than the price of the previous position in a given %) in this way we give the trade a chance that the Take Profit is executed before. The downside is that the position is doubled in size. 'ACTIVATE DIVIDE TP': Divide the size of the TP in half. More probability of the trade closing but less profit.
█ STOP LOSS and RISK MANAGEMENT.
A good risk management is what can make your equity go up or be liquidated.
The % risk is the percentage of our capital that we are willing to lose by operation. This is recommended to be between 1-5%.
% Risk: (% Stop Loss x % Equity per trade x Leverage) / 100
First the strategy is calculated with Stop Loss, then the risk per operation is determined and from there, the amount per operation is calculated and not vice versa.
In this script you can use a normal Stop Loss or one according to the ATR. Also activate the option to trigger it earlier if the risk percentage is reached. '% RISK ALLOWED'
'STOP LOSS CONFIRMED': The Stop Loss is only activated if the closing of the previous bar is in the loss limit condition. It's useful to prevent the SL from triggering when they do a ‘pump’ to sweep Stops and then return the price to the previous state.
█ BACKTEST
The objective of the Backtest is to evaluate the effectiveness of our strategy. A good Backtest is determined by some parameters such as:
- RECOVERY FACTOR: It consists of dividing the 'net profit' by the 'drawdown’. An excellent trading system has a recovery factor of 10 or more; that is, it generates 10 times more net profit than drawdown.
- PROFIT FACTOR: The ‘Profit Factor’ is another popular measure of system performance. It's as simple as dividing what win trades earn by what loser trades lose. If the strategy is profitable then by definition the 'Profit Factor' is going to be greater than 1. Strategies that are not profitable produce profit factors less than one. A good system has a profit factor of 2 or more. The good thing about the ‘Profit Factor’ is that it tells us what we are going to earn for each dollar we lose. A profit factor of 2.5 tells us that for every dollar we lose operating we will earn 2.5.
- SHARPE: (Return system - Return without risk) / Deviation of returns.
When the variations of gains and losses are very high, the deviation is very high and that leads to a very poor ‘Sharpe’ ratio. If the operations are very close to the average (little deviation) the result is a fairly high 'Sharpe' ratio. If a strategy has a 'Sharpe' ratio greater than 1 it is a good strategy. If it has a 'Sharpe' ratio greater than 2, it is excellent. If it has a ‘Sharpe’ ratio less than 1 then we don't know if it is good or bad, we have to look at other parameters.
- MATHEMATICAL EXPECTATION: (% winning trades X average profit) + (% losing trades X average loss).
To earn money with a Trading system, it is not necessary to win all the operations, what is really important is the final result of the operation. A Trading system has to have positive mathematical expectation as is the case with this script: ME = (0.87 x 30.74$) - (0.13 x 56.16$) = (26.74 - 7.30) = 19.44$ > 0
The game of roulette, for example, has negative mathematical expectation for the player, it can have positive winning streaks, but in the long term, if you continue playing you will end up losing, and casinos know this very well.
PARAMETERS
'BACKTEST DAYS': Number of days back of historical data for the calculation of the Backtest.
'ENTRY TYPE': For '% EQUITY' if you have $ 10,000 of capital and select 7.5%, for example, your entry would be $ 750 without leverage. If you select CONTRACTS for the 'BTCUSDT' pair, for example, it would be the amount in 'Bitcoins' and if you select 'CASH' it would be the amount in $ dollars.
'QUANTITY (LEVERAGE 1X)': The amount for an entry with X1 leverage according to the previous section.
'MAXIMUM LEVERAGE': It's the maximum allowed multiplier of the quantity entered in the previous section according to the volume condition.
The settings are for Bitcoin at Binance Futures (BTC: USDTPERP) in 15 minutes.
For other pairs and other timeframes, the settings have to be adjusted again. And within a month, the settings will be different because we all know the market and the trend are changing.
Easy System 420In this strategy, 15 indicators are used, each giving its results as a numerical value, which then is added or subtracted from the total points, gathered from all 15 indicators.
Many thanks to RafaelZioni for his great work making the EasySys1 script which i modified to create this script.
Onchart is drawn some of the indicators, but not all, a info panel is drawn showing the value each indicator has calculated. The info panel can be turned on or off.
Many of the indicator settings can be changed by user, and this is recommended, to tune the strategy to users chosen pair/timeframe.
Therefore any pair or timeframe can be used, the strategy tester results showing possible results, remember to set commission to match your broker. example chart settings here have common crypto exchange commission value: 0.25%
indicator list : SAR + STT + ZigZag + ROC + DMI + CCI + Weis + SMA + AO + MOM + Hist + BB + Ichimoku + HMA
888 BOT #backtest█ 888 BOT #backtest
This is an Expert Advisor 'EA' or Automated trading script for ‘longs’ and ‘shorts’, which uses only a Take Profit or, in the worst case, a Stop Loss to close the trade.
It's a much improved version of the previous ‘Repanocha’. It doesn`t use 'Trailing Stop' or 'security()' functions (although using a security function doesn`t mean that the script repaints) and all signals are confirmed, therefore the script doesn`t repaint in alert mode and is accurate in backtest mode.
Apart from the previous indicators, some more and other functions have been added for Stop-Loss, re-entry and leverage.
It uses 8 indicators, (many of you already know what they are, but in case there is someone new), these are the following:
1. Jurik Moving Average
It's a moving average created by Mark Jurik for professionals which eliminates the 'lag' or delay of the signal. It's better than other moving averages like EMA, DEMA, AMA or T3.
There are two ways to decrease noise using JMA. Increasing the 'LENGTH' parameter will cause JMA to move more slowly and therefore reduce noise at the expense of adding 'lag'
The 'JMA LENGTH', 'PHASE' and 'POWER' parameters offer a way to select the optimal balance between 'lag' and over boost.
Green: Bullish, Red: Bearish.
2. Range filter
Created by Donovan Wall, its function is to filter or eliminate noise and to better determine the price trend in the short term.
First, a uniform average price range 'SAMPLING PERIOD' is calculated for the filter base and multiplied by a specific quantity 'RANGE MULTIPLIER'.
The filter is then calculated by adjusting price movements that do not exceed the specified range.
Finally, the target ranges are plotted to show the prices that will trigger the filter movement.
Green: Bullish, Red: Bearish.
3. Average Directional Index (ADX Classic) and (ADX Masanakamura)
It's an indicator designed by Welles Wilder to measure the strength and direction of the market trend. The price movement is strong when the ADX has a positive slope and is above a certain minimum level 'ADX THRESHOLD' and for a given period 'ADX LENGTH'.
The green color of the bars indicates that the trend is bullish and that the ADX is above the level established by the threshold.
The red color of the bars indicates that the trend is down and that the ADX is above the threshold level.
The orange color of the bars indicates that the price is not strong and will surely lateralize.
You can choose between the classic option and the one created by a certain 'Masanakamura'. The main difference between the two is that in the first it uses RMA () and in the second SMA () in its calculation.
4. Parabolic SAR
This indicator, also created by Welles Wilder, places points that help define a trend. The Parabolic SAR can follow the price above or below, the peculiarity that it offers is that when the price touches the indicator, it jumps to the other side of the price (if the Parabolic SAR was below the price it jumps up and vice versa) to a distance predetermined by the indicator. At this time the indicator continues to follow the price, reducing the distance with each candle until it is finally touched again by the price and the process starts again. This procedure explains the name of the indicator: the Parabolic SAR follows the price generating a characteristic parabolic shape, when the price touches it, stops and turns (SAR is the acronym for 'stop and reverse'), giving rise to a new cycle. When the points are below the price, the trend is up, while the points above the price indicate a downward trend.
5. RSI with Volume
This indicator was created by LazyBear from the popular RSI.
The RSI is an oscillator-type indicator used in technical analysis and also created by Welles Wilder that shows the strength of the price by comparing individual movements up or down in successive closing prices.
LazyBear added a volume parameter that makes it more accurate to the market movement.
A good way to use RSI is by considering the 50 'RSI CENTER LINE' centerline. When the oscillator is above, the trend is bullish and when it is below, the trend is bearish.
6. Moving Average Convergence Divergence (MACD) and (MAC-Z)
It was created by Gerald Appel. Subsequently, the histogram was added to anticipate the crossing of MA. Broadly speaking, we can say that the MACD is an oscillator consisting of two moving averages that rotate around the zero line. The MACD line is the difference between a short moving average 'MACD FAST MA LENGTH' and a long moving average 'MACD SLOW MA LENGTH'. It's an indicator that allows us to have a reference on the trend of the asset on which it is operating, thus generating market entry and exit signals.
We can talk about a bull market when the MACD histogram is above the zero line, along with the signal line, while we are talking about a bear market when the MACD histogram is below the zero line.
There is the option of using the MAC-Z indicator created by LazyBear, which according to its author is more effective, by using the parameter VWAP (volume weighted average price) 'Z-VWAP LENGTH' together with a standard deviation 'STDEV LENGTH' in its calculation.
7. Volume Condition
Volume indicates the number of participants in this war between bulls and bears, the more volume the more likely the price will move in favor of the trend. A low trading volume indicates a lower number of participants and interest in the instrument in question. Low volumes may reveal weakness behind a price movement.
With this condition, those signals whose volume is less than the volume SMA for a period 'SMA VOLUME LENGTH' multiplied by a factor 'VOLUME FACTOR' are filtered. In addition, it determines the leverage used, the more volume, the more participants, the more probability that the price will move in our favor, that is, we can use more leverage. The leverage in this script is determined by how many times the volume is above the SMA line.
The maximum leverage is 8.
8. Bollinger Bands
This indicator was created by John Bollinger and consists of three bands that are drawn superimposed on the price evolution graph.
The central band is a moving average, normally a simple moving average calculated with 20 periods is used. ('BB LENGTH' Number of periods of the moving average)
The upper band is calculated by adding the value of the simple moving average X times the standard deviation of the moving average. ('BB MULTIPLIER' Number of times the standard deviation of the moving average)
The lower band is calculated by subtracting the simple moving average X times the standard deviation of the moving average.
the band between the upper and lower bands contains, statistically, almost 90% of the possible price variations, which means that any movement of the price outside the bands has special relevance.
In practical terms, Bollinger bands behave as if they were an elastic band so that, if the price touches them, it has a high probability of bouncing.
Sometimes, after the entry order is filled, the price is returned to the opposite side. If price touch the Bollinger band in the same previous conditions, another order is filled in the same direction of the position to improve the average entry price, (% MINIMUM BETTER PRICE ': Minimum price for the re-entry to be executed and that is better than the price of the previous position in a given %) in this way we give the trade a chance that the Take Profit is executed before. The downside is that the position is doubled in size. 'ACTIVATE DIVIDE TP': Divide the size of the TP in half. More probability of the trade closing but less profit.
█ STOP LOSS and RISK MANAGEMENT.
A good risk management is what can make your equity go up or be liquidated.
The % risk is the percentage of our capital that we are willing to lose by operation. This is recommended to be between 1-5%.
% Risk: (% Stop Loss x % Equity per trade x Leverage) / 100
First the strategy is calculated with Stop Loss, then the risk per operation is determined and from there, the amount per operation is calculated and not vice versa.
In this script you can use a normal Stop Loss or one according to the ATR. Also activate the option to trigger it earlier if the risk percentage is reached. '% RISK ALLOWED'
'STOP LOSS CONFIRMED': The Stop Loss is only activated if the closing of the previous bar is in the loss limit condition. It's useful to prevent the SL from triggering when they do a ‘pump’ to sweep Stops and then return the price to the previous state.
█ BACKTEST
The objective of the Backtest is to evaluate the effectiveness of our strategy. A good Backtest is determined by some parameters such as:
- RECOVERY FACTOR: It consists of dividing the 'net profit' by the 'drawdown’. An excellent trading system has a recovery factor of 10 or more; that is, it generates 10 times more net profit than drawdown.
- PROFIT FACTOR: The ‘Profit Factor’ is another popular measure of system performance. It's as simple as dividing what win trades earn by what loser trades lose. If the strategy is profitable then by definition the 'Profit Factor' is going to be greater than 1. Strategies that are not profitable produce profit factors less than one. A good system has a profit factor of 2 or more. The good thing about the ‘Profit Factor’ is that it tells us what we are going to earn for each dollar we lose. A profit factor of 2.5 tells us that for every dollar we lose operating we will earn 2.5.
- SHARPE: (Return system - Return without risk) / Deviation of returns.
When the variations of gains and losses are very high, the deviation is very high and that leads to a very poor ‘Sharpe’ ratio. If the operations are very close to the average (little deviation) the result is a fairly high 'Sharpe' ratio. If a strategy has a 'Sharpe' ratio greater than 1 it is a good strategy. If it has a 'Sharpe' ratio greater than 2, it is excellent. If it has a ‘Sharpe’ ratio less than 1 then we don't know if it is good or bad, we have to look at other parameters.
- MATHEMATICAL EXPECTATION: (% winning trades X average profit) + (% losing trades X average loss).
To earn money with a Trading system, it is not necessary to win all the operations, what is really important is the final result of the operation. A Trading system has to have positive mathematical expectation as is the case with this script: ME = (0.87 x 30.74$) - (0.13 x 56.16$) = (26.74 - 7.30) = 19.44$ > 0
The game of roulette, for example, has negative mathematical expectation for the player, it can have positive winning streaks, but in the long term, if you continue playing you will end up losing, and casinos know this very well.
PARAMETERS
'BACKTEST DAYS': Number of days back of historical data for the calculation of the Backtest.
'ENTRY TYPE': For '% EQUITY' if you have $ 10,000 of capital and select 7.5%, for example, your entry would be $ 750 without leverage. If you select CONTRACTS for the 'BTCUSDT' pair, for example, it would be the amount in 'Bitcoins' and if you select 'CASH' it would be the amount in $ dollars.
'QUANTITY (LEVERAGE 1X)': The amount for an entry with X1 leverage according to the previous section.
'MAXIMUM LEVERAGE': It's the maximum allowed multiplier of the quantity entered in the previous section according to the volume condition.
The settings are for Bitcoin at Binance Futures (BTC: USDTPERP) in 30 minutes.
For other pairs and other timeframes, the settings have to be adjusted again. And within a month, the settings will be different because we all know the market and the trend are changing.
█ 888 BOT (SPANISH)
Este es un Expert Advisor 'EA' o script de trading automatizado para ‘longs’ y ‘shorts’, el cual, utiliza solo un Take Profit o, en el peor de los casos, un Stop Loss para cerrar el trade.
Es una versión muy mejorada del anterior ‘Repanocha’. No utiliza ‘Trailing Stop’, ni funciones ‘security()’ (aunque usar una función security no significa que el script repinte) y todas las señales son confirmadas, por consiguiente, el script no repinta en modo alertas y es preciso en en el modo backtest.
Aparte de los anteriores indicadores se han añadido algunos más y otras funciones para Stop-Loss, de re-entrada y apalancamiento.
Utiliza 8 indicadores, (muchos ya sabéis sobradamente lo que son, pero por si hay alguien nuevo), son los siguientes:
1. Jurik Moving Average
Es una media móvil creada por Mark Jurik para profesionales la cual elimina el ‘lag’ o retardo de la señal. Es mejor que otras medias móviles como la EMA, DEMA, AMA o T3.
Hay dos formas de disminuir el ruido utilizando JMA. El aumento del parámetro 'LENGTH' hará que JMA se mueva más lentamente y, por lo tanto, reducirá el ruido a expensas de añadir ‘lag’
Los parámetros 'JMA LENGTH', 'PHASE' y 'POWER' ofrecen una forma de seleccionar el equilibrio óptimo entre ‘lag’ y sobre impulso.
Verde : Alcista, Rojo: Bajista.
2. Range filter
Creado por Donovan Wall, su función es la de filtrar o eliminar el ruido y poder determinar mejor la tendencia del precio a corto plazo.
Primero, se calcula un rango de precio promedio uniforme 'SAMPLING PERIOD' para la base del filtro y se multiplica por una cantidad específica 'RANGE MULTIPLIER'.
A continuación, el filtro se calcula ajustando los movimientos de precios que no exceden el rango especificado.
Por último, los rangos objetivo se trazan para mostrar los precios que activarán el movimiento del filtro.
Verde : Alcista, Rojo: Bajista.
3. Average Directional Index (ADX Classic) y (ADX Masanakamura)
Es un indicador diseñado por Welles Wilder para medir la fuerza y dirección de la tendencia del mercado. El movimiento del precio tiene fuerza cuando el ADX tiene pendiente positiva y está por encima de cierto nivel mínimo 'ADX THRESHOLD' y para un periodo dado 'ADX LENGTH'.
El color verde de las barras indica que la tendencia es alcista y que el ADX está por encima del nivel establecido por el threshold.
El color Rojo de las barras indica que la tendencia es bajista y que el ADX está por encima del nivel de threshold.
El color naranja de las barras indica que el precio no tiene fuerza y seguramente lateralizará.
Se puede elegir entre la opción clásica y la creada por un tal 'Masanakamura'. La diferencia principal entre los dos es que en el primero utiliza RMA() y en el segundo SMA() en su cálculo.
4. Parabolic SAR
Este indicador, creado también por Welles Wilder, coloca puntos que ayudan a definir una tendencia. El Parabolic SAR puede seguir al precio por encima o por debajo, la particularidad que ofrece es que cuando el precio toca al indicador, este salta al otro lado del precio (si el Parabolic SAR estaba por debajo del precio salta arriba y viceversa) a una distancia predeterminada por el indicador. En este momento el indicador vuelve a seguir al precio, reduciendo la distancia con cada vela hasta que finalmente es tocado otra vez por el precio y se vuelve a iniciar el proceso. Este procedimiento explica el nombre del indicador: el Parabolic SAR va siguiendo al precio generando una característica forma parabólica, cuando el precio lo toca, se para y da la vuelta (SAR son las siglas en inglés de ‘stop and reverse’), dando lugar a un nuevo ciclo. Cuando los puntos están por debajo del precio, la tendencia es alcista, mientras que los puntos por encima del precio indica una tendencia bajista.
5. RSI with Volume
Este indicador lo creo un tal LazyBear de TV a partir del popular RSI.
El RSI es un indicador tipo oscilador utilizado en análisis técnico y creado también por Welles Wilder que muestra la fuerza del precio mediante la comparación de los movimientos individuales al alza o a la baja de los sucesivos precios de cierre.
LazyBear le añadió un parámetro de volumen que lo hace más preciso al movimiento del mercado.
Una buena forma de usar el RSI es teniendo en cuenta la línea central de 50 'RSI CENTER LINE'. Cuando el oscilador está por encima, la tendencia es alcista y cuando está por debajo la tendencia es bajista.
6. Moving Average Convergence Divergence (MACD) y (MAC-Z)
Fue creado por Gerald Appel. Posteriormente se añadió el histograma para anticipar el cruce de medias. A grandes rasgos podemos decir que el MACD es un oscilador consistente en dos medias móviles que van girando en torno a la línea de cero. La línea del MACD no es más que la diferencia entre una media móvil corta 'MACD FAST MA LENGTH' y una media móvil larga 'MACD SLOW MA LENGTH'. Es un indicador que nos permite tener una referencia sobre la tendencia del activo sobre el cual se está operando, generando de este modo señales de entrada y salida del mercado.
Podemos hablar de mercado alcista cuando el histograma del MACD se sitúe por encima de la línea cero, junto con la línea de señal, mientras que hablaremos de mercado bajista cuando el histograma MACD se situará por debajo de la línea cero.
Está la opción de utilizar el indicador MAC-Z creado por LazyBear que según su autor es más eficaz, por utilizar el parámetro VWAP (precio medio ponderado por volumen) 'Z-VWAP LENGTH' junto con una desviación standard 'STDEV LENGTH' en su cálculo.
7. Volume Condition
El volumen indica el número de participantes en esta guerra entre toros y osos, cuanto más volumen más probabilidad de que se mueva el precio a favor de la tendencia. Un volumen bajo de negociación indica un menor número de participantes e interés por el instrumento en cuestión. Los bajos volúmenes pueden revelar debilidad detrás de un movimiento de precios.
Con esta condición se filtran aquellas señales cuyo volumen es inferior a la SMA de volumen para un periodo 'SMA VOLUME LENGTH' multiplicado por un factor 'VOLUME FACTOR'. Además, determina el apalancamiento utilizado, a más volumen, más participantes, más probabilidad de que se mueva el precio a nuestro favor, es decir, podemos utilizar más apalancamiento. El apalancamiento en este script lo determina las veces que está el volumen por encima de la línea de la SMA.
El apalancamiento máximo es de 8.
8. Bollinger Bands
Este indicador fue creado por John Bollinger y consiste en tres bandas que se dibujan superpuestas al gráfico de evolución del precio.
La banda central es una media móvil, normalmente se emplea una media móvil simple calculada con 20 períodos. ('BB LENGTH' Número de periodos de la media móvil)
La banda superior se calcula sumando al valor de la media móvil simple X veces la desviación típica de la media móvil. ('BB MULTIPLIER' Número de veces la desviación típica de la media móvil)
La banda inferior de calcula restando a la media móvil simple X veces la desviación típica de la media móvil.
la franja comprendida entre las bandas superior e inferior contiene, estadísticamente, casi un 90% de las posibles variaciones del precio, lo que significa que cualquier movimiento del precio fuera de las bandas tiene especial relevancia.
En términos prácticos, las bandas de Bollinger se comporta como si de una banda elástica se tratara de manera que, si el precio las toca, éste tiene mucha probabilidad de rebotar.
En ocasiones, después de rellenarse la orden de entrada, el precio se devuelve hacia el lado contrario. Si toca la banda de Bollinger se rellena otra orden en la misma dirección de la posición para mejorar el precio medio de entrada, (% MINIMUM BETTER PRICE': Precio mínimo para que se ejecute la re-entrada y que sea mejor que el precio de la posición anterior en un % dado) de esta manera damos una oportunidad al trade de que el Take Profit se ejecute antes. La desventaja es que se dobla el tamaño de la posición. 'ACTIVATE DIVIDE TP': Divide el tamaño del TP a la mitad. Más probabilidad de que se cierre el trade pero menos ganancias.
█ STOP LOSS y RISK MANAGEMENT.
Una buena gestión de las pérdidas o gestión del riesgo es lo que puede hacer que tu cuenta suba o se liquide en poco tiempo.
El % de riesgo es el porcentaje de nuestro capital que estamos dispuestos a perder por operación. Este se aconseja que debe estar comprendido entre un 1-5%.
% Risk = (% Stop Loss x % Equity per trade x Leverage) / 100
Primero se calcula la estrategia con Stop Loss, después se determina el riesgo por operación y a partir de ahí se calcula el monto por operación y no al revés.
En este script puedes usar un Stop Loss normal o uno según el ATR. También activar la opción de que salte antes si se alcanza el porcentaje de riesgo. '% RISK ALLOWED'
'STOP LOSS CONFIRMED': Solamente se activa el Stop Loss si el cierre de la barra anterior se encuentra en la condición de límite de pérdidas. Es útil para evitar que se dispare el SL cuando hacen un ‘pump’ para barrer Stops y luego se devuelve el precio a la normalidad.
█ BACKTEST
El objetivo del Backtest es evaluar la eficacia de nuestra estrategia. Un buen Backtest lo determinan algunos parámetros como son:
- RECOVERY FACTOR: Consiste en dividir el ‘beneficio neto’ entre el ‘drawdown’. Un excelente sistema de trading tiene un recovery factor de 10 o más; es decir, genera 10 veces más beneficio neto que drawdown.
- PROFIT FACTOR: El ‘Profit Factor’ es otra medida popular del rendimiento de un sistema. Es algo tan simple como dividir lo que ganan las operaciones con ganancias entre lo que pierden las operaciones con pérdidas. Si la estrategia es rentable entonces por definición el ‘Profit Factor’ va a ser mayor que 1. Las estrategias que no son rentables producen factores de beneficio menores que uno. Un buen sistema tiene un profit factor de 2 o más. Lo bueno del ‘Profit Factor’ es que nos dice lo que vamos a ganar por cada dolar que perdemos. Un profit factor de 2.5 nos dice que por cada dolar que perdamos operando vamos a ganar 2.5.
- SHARPE: (Retorno sistema – Retorno sin riesgo) / Desviación de los retornos.
Cuando las variaciones de ganancias y pérdidas son muy altas, la desviación es muy elevada y eso conlleva un ratio de ‘Sharpe’ muy pobre. Si las operaciones están muy cerca de la media (poca desviación) el resultado es un ratio de ‘Sharpe’ bastante elevado. Si una estrategia tiene un ratio de ‘Sharpe’ mayor que 1 es una buena estrategia. Si tiene un ratio de ‘Sharpe’ mayor que 2, es excelente. Si tiene un ratio de ‘Sharpe’ menor que 1 entonces no sabemos si es buena o mala, hay que mirar otros parámetros.
- MATHEMATICAL EXPECTATION:(% operaciones ganadoras X ganancia media) + (% operaciones perdedoras X pérdida media).
Para ganar dinero con un sistema de Trading, no es necesario ganar todas las operaciones, lo verdaderamente importante es el resultado final de la operativa. Un sistema de Trading tiene que tener esperanza matemática positiva como es el caso de este script.
El juego de la ruleta, por ejemplo, tiene esperanza matemática negativa para el jugador, puede tener rachas positivas de ganancias, pero a la larga, si se sigue jugando se acabará perdiendo, y esto los casinos lo saben muy bien.
PARAMETROS
'BACKTEST DAYS': Número de días atrás de datos históricos para el calculo del Backtest.
'ENTRY TYPE': Para % EQUITY si tienes 10000$ de capital y seleccionas 7.5% tu entrada sería de 750$ sin apalancamiento. Si seleccionas CONTRACTS para el par BTCUSDT sería la cantidad en Bitcoins y si seleccionas CASH sería la cantidad en dólares.
'QUANTITY (LEVERAGE 1X)': La cantidad para una entrada con apalancamiento X! según el apartado anterior.
'MAXIMUM LEVERAGE': Es el máximo multiplicador permitido de la cantidad introducida en el apartado anterior según la condición de volumen.
Los settings son para Bitcoin en Binance Futures (BTC:USDTPERP) en 30 minutos.
Para otro pares y otras temporalidades se tienen que ajustar las opciones de nuevo. Además para dentro de un mes, los ajustes serán otros distintos ya que el mercado y la tendencia es cambiante.
M-SQUEEZEScript for Swing Trading. It use the following indicators:
- SQUEEZE MOMENTUM INDICATOR (LAZYBEAR)
- RSI VOLUME WEIGHTED (LAZYBEAR)
- PARABOLIC SAR
Settings for OANDA:SPX500USD at 2H
PB SAR BackTest - ColorbarIndicator with buy/sell alerts for setup/trigger conditions
Built upon Peterbolic SAR current version as of publishing
[STRATEGY] Parabolic SARA private strategy from the Profitable Parabolic SAR preview for backtesting purposes.
[Long/Short] Range Filter-ADX-SAR [BACKTEST]Backtest of the same previous script with alerts.
Range Filter + ADX + SAR + Trailing Stop + Take Profit
Parabolic SAR Strategy with Bactesting RangeStandard Parabolic SAR Strategy with SAR level plotted and backtesting range option.
DEMA Crossover Strategy_01_SARThis is used to do trade based on golden cross and death cross. It uses SAR.
Best Parabolic SAR Study and StrategyCustom built Parabolic Stop and Reversal (SAR)
Produces more responsive results.
Also included is an ATR based SAR which better indicates trend.
Long and short stops are marked on the chart and can be found in the style tab.
PSAR source is variable and is shown on the chart.
Trading source is variable, this is what is used to determine a change in direction against the calculate PSAR and for stops/reversals.
Access is open for now so long as I am getting constructive feedback. Thanks for trying it out!