basilGrid GridBot Live [basilChart]This strategy is a full implementation of Live Grid Trading.
Prominent features of this live grid trading strategy are:
- Logarithmic Chart Support: This strategy can support Log Scale on graph. Meaning that grid lines won't have irregular gaps in between the lines if you would like to view the chart Log Scaled. Every line will be aligned correctly even if you use Log Scale or not.
- Precise Buy & Sell: Script will execute precise Buy and Sell orders.
- Dynamic Grid Level Count: From 2 grid levels to n amount of grid levels are supported. There is no limitation on grid level count, however there may be irregularities because of limitations when higher grid levels are used. You can pick any number starting from 2.
- Average Price: Traders can monitor average price of positions.
- Alerts: When order is filled trader can receive notification. Create new alert > Select basilGrid Live > Order fills only()
Characteristics of this script:
- Able to fill more than one order in one single candle.
- Levels will keep being updated with every trade.
- There will be always one grid level ignored and it will be the level which made the last order filling possible. This is normal behavior of grid trading system.
- You can both use Log Scale and Normal Scale with this script. No issue will be on grid levels.
Using the script:
- Add this script to the chart from indicators tab
- Set starting date for the live grid bot either by dragging and dropping the vertical line or by the date-time picker from indicator Inputs tab.
- Set highest and lowest limit for the script. These will be the boundary limits. Highest and lowest price for the script to work on. Lines will populate between these two values
- Set grid level count. Number of levels of the grid.
- Set amount to spend on per level. This quantity of order will be placed on each level when needed.
After setting the above settings, there is one last thing to do in order to get precise results. It is setting the Initial Capital.
- We can set this setting from 'Properties' tab. Named 'Initial Capital'. After setting the boundaries all we need to is to navigate to TradingView's own 'Data Window', and get the value there. Then paste it on the strategy's own related setting area.
In this example we used pair BTCUSDT 1D timeframe, our settings are:
Inputs Tab:
- Grid Count: 19
- High Limit: 65 500
- Low Limit: 15 000
- Quantity per level: 0.1
- Toggle Log Scale: Checked (because I always use Log Scale on charts, if Log Scale is turned on for the chart, this needs to be checked)
- Terminate Grid At The Upmost Level: Not checked
- Show Grid Levels: Checked
- Show Average Position Price: Checked
Properties Tab:
- Initial Capital: 22 628
- Slippage: 5
- Commission: 0.1% (this is the broker commission value)
This script's purpose is to make it easier to get the idea of grid trading, experiencing it in live session.
Portfolio management
7 Week RuleThe 7 week rule was shared by Gil Morales in his book “Trade Like an O’Neil Disciple”. The rule is described as: Stocks that have shown a tendency to “obey” or “respect” the 10-day moving average for at least 7 weeks in an uptrend should often be sold once the stock violates the 10-day line. A “violation” is defined as a close below the 10-day moving average followed by a move on the next day below the intraday low of the first day.
This indicator makes using the 7 week rule easy. Once a stock has closed above its selected moving average (10SMA by default) for 35 days the 7 week rule is triggered. Once the stock then “violates” the moving average, a sell signal is printed on the chart.
Indicator Customizations
Moving Average Length & Type
Show or Hide Moving Average
Show Running Count of Days Above Selected MA
Highlight When 7 Week Rule Triggers
Option to Show First Day Above MA
Indicator is dynamic and will continue the count if no violation occurs.
basilPort Portfolio Tracker Pro [basilChart]This script is helps giving detailed information about the portfolio.
Prominent features of this portfolio tracking indicator are:
- Chart of your portfolio: This portfolio tracker let’s you view the chart of your portfolio real-time.
- Visualized Profit/Loss: Indicator will let you know of your profit and loss on the chart.
- In-Depth Monitoring: Most Gained 1st, 2nd, 3rd and Most Lost 1st, 2nd, 3rd.
- All Time Highs: Let’s us view All Time Highs on the portfolio chart for each equity on the chart.
- 40 Different Symbols: Supports monitoring 40 different symbols at the same time, real-time.
- 10 Pair Detailed View: For the first 10 symbol in our portfolio, indicator supports viewing detailed info about each of them. Such as: Price, Cost, Qty, Profit Percentage, Chart TF Profit Percentage, Weight
basilPort Portfolio Tracker Pro indicator can be used to:
- Track your investments: The basilPort Portfolio Tracker allows you to enter all your investments and their associated details, such as the ticker symbol, purchase price, and quantity. It then calculates your total portfolio value, including gains and losses.
- Monitor portfolio performance: Provides an overview of your portfolio's performance over time. You can see how your portfolio is performing on a daily, weekly, or monthly basis, and compare it to the performance of the overall market.
- Analyze asset allocation: Helps you analyze your portfolio's asset allocation, which is the percentage of your portfolio invested in different symbols. You can use this information to adjust your portfolio and diversify your holdings.
- Set investment goals: You can use the Portfolio Tracker to set investment goals and track your progress towards achieving them. For example, you can set a goal of achieving a certain rate of return or accumulating a specific amount of wealth by a certain date.
Overall, the Portfolio Tracker is a useful tool for investors who want to monitor their portfolio's performance, evaluate their investment strategies, and make informed investment decisions.
Best and worst 3 performers in our portfolio:
From Data Window, script let’s us see the best and worst 3 performers in our portfolio. To know how to read it we follow this pattern:
- Check 1st Gained value.
- Find the nth symbol from script’s Inputs tab.
- Check 1st Gained to see its Profit Percentage.
An example scenario to reading Data Window is explained at the very end of the description.
Using the script:
- Add this script to the chart from indicators tab
- Set starting date for the basilGrid Portfolio Tracker Pro either by dragging and dropping the vertical line or by the date-time picker from indicator Inputs tab.
- Set symbols and enable them to monitor with this indicator.
- Set quantity and price information for the symbols you have selected.
- Set visual settings to tailor your experience.
basilPort Portfolio Tracker is an indicator that allows you to track and analyze the performance of your investment portfolio over time. It's a helpful tool for investors who want to monitor their holdings and evaluate their investment strategies.
In this example we used pair BTCUSDT 1h timeframe, our settings are:
Inputs Tab:
- Start Date: 2022-12-13 13:00
- Show All Time Highs: Unchecked
- Show Pair Data (First 10): Checked
- Show Total Data: Checked
Symbols:
- BINANCE:ETHUSDT Qty 4.2 Price 1 332
- BINANCE:BTCUSDT Qty 0.5 Price 17 469
- BINANCE:BNBUSDT Qty 20 Price 270
- BINANCE:AVAXUSDT Qty 200 Price 13.61
- BATS:PYPL Qty 50 Price 78.5
- BATS:AMZN Qty 40 Price 95.4
- BATS:ETSY Qty 40 Price 135.64
For example, if you check Data Window, you'll see the following:
An example scenario:
- Bought Portfolio Value 39142.98 => The cost of the portfolio
- Current Portfolio Value 39142.98 => The current value of the portfolio
- 1st Gained 2.00 => The most gained symbol's index. (Checking the Symbols what we see on the 2nd spot is this symbol, we can see this value indicates BINANCE:BTCUSDT)
- 1st Gained 28.09 => Means BINANCE:BTCUSDT is +%28.09
- 2nd Gained 4.00 => Again, after checking the Symbols, we now know what this value indicates. It is AVAXUSDT.
- 2nd Gained 18.59 => Means BINANCE:AVAXUSDT is +%18.59
..
And so on to Lost section. Only difference between Gained and Lost section indicates Lost equities.
This script's purpose is to make easier to have more control over the portfolio. With in depth data that’ll help with decision-making.
ICT Imbalances (fadi)ICT Imbalances focuses on highlighting the imbalances described by ICT Se imbalances usually act as a price magnet where price tend to revisit to mitigate the imbalance and can act as support and resistance.
It is important to understand that, while they do act as price magnet, they are not all places for entries. What they do provide, is a price understanding and possible areas of reversal based on the bigger picture and trading strategy.
There are four types of imbalances covered by this indicator:
Fair Value Gap (FVG)
Fair value is when, at any given price, both buy and sell sides are offered. For every up move, there is a down move. Fair value Gap is an imbalance where price moved too quickly before offering both buy side and sell side at a given price.
Implied Fair Value Gap (IFVG)
Implied Fair Value Gap is when the first and third candle have overlapping large wicks. The IFVG is the area between the half point of first and third candles.
Volume Imbalance (V.I.)
Volume imbalance is when the price creates a gap between the close of one candle and the open of the following candle with overlapping wicks.
Gap
An area where price gaps up or down leaving a void where price did not trade in. This is most common on higher timeframes and when one day ends and the next day begins.
Settings
ICT Imbalances provides the following options
- Show or hide specific imbalance to keep the chart clean
- Background color of the box highlighting the imbalance
- Box width in the form of how many candles the box extends to
- Show or Hide the Half Mark of the box, only applies to FVG and IFVG
- Show or hide a Legend that explains which colors represents which imbalance
TSG 5% Daily CalculatorThis is a calculator I've created to help visualize Target and Risk Levels based on leverage use to trade crypto.
How to use it ?
Basic Use:
- Set the Direction of your trade - either Long or Short
- Set the Leverage you use in your trade - it is crutial to define the risk and target levels
- Set the Risk Amount you want to risk (in %) of your total balance ( Advised 2-3% )
- Set the Target Amount you want to profit at the target (the idea of this is 5% daily, so 5%).
- Set Entry Price if you have opened a position, and you will visually see your progress. Otherwise the levels will be adjusted to the Close of the candle.
Additions:
- Set your Initial Balance - to help you visualize on the Table your progress
- Set your Current Balance - for visualization purposes on ongoing trades and on the Table
- Entry Date - Advised to set it when you open a trade - you will be tracking the progress of your trade since the candle on which you opened it
- Show Table - to show the table of 5% daily and the target it is set on per day
- Table Size - Set table to be small or normal
- Together with the Table you have a big blue area behind that ends on the day you will become a Millionaire based on the Initial Balance, Current balance and Target % in your inputs
Investing Performance with vs without feesHello traders,
I had a chat with a friend recently who's using a fund manager services to invest for him in some US-based ETFs tracking the US indices.
I showed him using an online tool that those 2% annual fees he's paying to his fund manager are eating a lot of his profit overtime.
As I had some time, I decided to code this simulator in Pinescript because .... why not :)
@RicardoSantos already did that Compound Interest function ()
I added the n parameter being the number of times the interest is compounded per unit of time
Compound interest is calculated using the following formula
CI = P*(1 + R/n) (n*t) – P
Here,
P is the principal amount.
R is the annual interest rate.
t is the time the money is invested or borrowed for.
n is the number of times that interest is compounded per unit t, for example if interest is compounded monthly and t is in years then the value of n would be 12.
If interest is compounded quarterly and t is in years then the value of n would be 4.
For now, the script only works on a yearly chart - I might update it later making it compatible with other chart timeframes - assuming there is some demand for it
If there is, let me know in the comments down below
All the best
Dave
Broadview Economic StudioThank you for taking the time to read this description. We'll be taking a look at the Broadview Economic Studio. This has been a work-in-progress for years and is a very powerful tool for planning trades with complex volume scaling strategies. We will be talking about many indicators and types of indicators used in the public domain, but it is NOT recommended to reverse engineer our scripts as there is quite a bit of logic in the code that works to make each common approach entirely unique. So although you may understand quite a bit about oscillators, the way they work with the rest of the logic within the script may change the way you know them to work from elsewhere.
In the chart snapshot above you'll see a mild configuration where I only had to tweak a few settings. Commissions are set to 0.1%, starting capital is set to $10,000, and slippage is off. In my tests orders came through less than a penny off. Generally speaking, there are really only two situations in which you should be concerned about slippage. The first is if you trade really low timeframe charts like the 1 second. This tool, while it works for any timeframe, is programmed on the 45 minute timeframe and works best there. The other situation in which you should be prepared for slippage is if you're using extremely high volume trades in the hundreds of thousands or millions depending on the market cap and liquidity of the asset you're studying. Large orders like that have to be split up among several deals and that can cause slippage.
There are 31 primary inputs for users to tweak. Each input is grouped within a module called a Suite. Each suite has a focus like filtering signals or strategically allocating volume according to your strategy. Everything starts with the Origin Suite. The Origin Suite is a group of inputs that generates Tops & Bottoms from price action. It uses math like Rate of Change, where one can specify a required rate of change before an Origin signal can be made, and users can specify how much lower in price a bar must be compared to previous bars. So with the Origin Suite, users can control how often they want to see originating signals and under what conditions they can appear.
We used to use WVF and CVI to produce top and bottom signals, but our Origin Suite works much better for systematically generating profitable configurations.
The triangles you see on the chart represent markers, potential signals, or Prop Signals as they're referred to within the script. The blue arrows represent trades where Prop Signals were allowed to pass as true long signals. There are two ways to ignore Prop Signals. You can filter the markers entirely, or you can reduce their volume scaling to the minimum which is usually $10 for most exchanges. We're first going to be talking about some of the primary DCA inputs before we talk about the technology we use to filter and overload signals.
Here are some important features found within the script:
Base Orders
Safety Orders
Take Profits
Change-Based Volume Scaling
Ignoring Low or Medium Changes
Overloading
Filtering
Alert Messages w/ Volume Scaling
Let's walk through each of these features in more depth.
The Base Order is the initial Long position within a series. It comes in first and is followed by all of its Safety Orders. The Base Order is set to $25 within the script by default. Keeping the base order low allows one to reserve more of their capital for Safety Orders that are lower within a dip, and thus, lower the user's Position Average. The primary feature of this script is to help users plan their volume scaling strategically, and this is where we start. It's this kind of due diligence and effort in protecting trades that makes this script unique.
So we start with a low Base Order. Then, we follow with a lot of Safety Orders. Typically in DCA this is done in consistent time intervals and in consistent amounts. So in regular DCA one may invest the same amount bi-weekly on pay day. They use the financial instrument as a sort of savings and average their position over their consistent investments. This is not where the bleeding edge of DCA is today though. In modern Doller Cost Averaging, I would expect to see signals and volume scaling based on logic.. as opposed to being consistent intervals.
This sets up the explanation of the primary means of volume scaling within the script. Mathematically, we start with the net balance. This is your specified starting balance plus any wins or losses. Users specify what % of their Available Balance they would like to start with when volume scaling. This percent of capital is then multiplied by a Safety Order Multiplier. The safety order multiplier is made up of a number specified by the user, multiplied by the number of the Safety Order you're on. So user's can control this equation/algorithm and scale their investments as the number of Safety Orders increases and drops in price become more opportune.
The Take Profit within the script lets users specify their desired ROI from a series. So if a user sets a 60% take profit, the script will set a price from the position average that when reached will give the user a 60% ROI for the series including its Base Order and all its Safety Orders.
Before moving on, let's talk about the amazing internal reporting found in the script. When you zoom in on the blue arrows, you can see each trade is accompanied by some extremely helpful information. This is just another feature that makes this script unique, it is the feature that gives us accurate reporting and ultimately allows us to connect with TradingView's Strategy Tester in a way that provides instant backtests with good merit. With this reporting not only can users get reports and information on trades made on different assets with different configurations, but user's can perform a deep dive on each configuration and know exactly what was going on for each trade. The first number is the number of the safety order the script is on. Remember, this is used in the primary volume scaling math. The second number is the amount the script spent on the current trade. The third number denotes the cumulative spending for the series. The final number displays the script's available balance at that time. With these numbers, the TradingView Strategy Tester, and the List of Trades feature, users can practice as much due diligence as they need during their studies.
Let's move on to talking about my favorite suite within the script, the Volume Scaling Suite. Here there are two primary means of controlling volume scaling. Although, in the near future there will be more.
In this suite you'll find Change-Based Volume Scaling and Position Average Volume Scaling. Position Average Volume Scaling is quite easy to explain. This feature only allows signals to pass if they are lower in price than your base order. In this way, users can apply most of their capital to trades that lower their position average. Simply having the money in the market can boost profits, but having a lower Position Average is the entire reason we DCA. Change-Based Volume Scaling is quite a bit more complex.
In theory, one could argue that every moment is a great moment to buy. It's just that some moments are more opportune than others. So it's not about perfect signals as much as it's about proper volume scaling.
Change-Based Volume Scaling allows us to set rules that dictate how much volume scaling is used based on the asset's current delta, or Rate of Change.
Using CBVS, one can downscale capital applied to signals with a low ROC, or simply ignore them. So if a signal comes in and the price hasn't changed very much then you can automatically use less volume for the trade. One can do the same thing for medium changes, and the user can specify what quantifies as a low or medium change. Users can give extra volume to signals with a greater rate of change, or overload signals with a high rate of change! So the CBVS feature gives users the ability to allocate volume based on logic rooted in the asset's rate of change. If a signal has dropped a lot in price, then generally, it is deserving of more capital and that's what makes this feature unique and so powerful.
There are two kinds of Overloading found in the script. There's overloading from CBVS, and then overloading from the 4 signal filtering suites. There's an important difference to note before we move on. Overloading performed by CBVS is based on ignored signals. So if you ignore low or medium change signals, and you have CBVS Overloading on, the script will allocate more capital to High Change signals. When signals are ignored, they are downscaled to $10. Whereas with the filtering suites, if a signal is filtered the Prop Signal triangle marker is removed entirely. The overloading in that scenario is simply applied to signals that aren't filtered. The reason it's done this way is because allowing ignored signals to still come in, with the lowest volume scaling possible, keeps the Safety Order count rising which works in the volume scaling math. This math is intrinsic to getting capital deep within dips and crashes.
So in future versions we may allow ignored signals to be filtered out entirely but for the time being, simply scaling them down to the lowest possible amount is what produces the best and most consistent configurations.
Let's talk about filtering signals, and the overloading provided within each filtering suite.
Here you can see our Overbought & Oversold Heatmap V3. This is a unique indicator that takes 15 common oscillators and visualizes them in a way that clearly denotes confluence. Looking at this indicator makes it easer to read cycles and trends. It is quite common for investors to base their entire scripts on one or more of the oscillators found within the OBOS Heatmap V3. So the OBOS Heatmap V3 is an awesome way to ensure your signals follow an oversold trend! The orange represents an oscillator being oversold, while the yellow represents it being overbought. Generally, when an asset is oversold it is a better time to buy. One can filter signals based on this information and use the Heatmap's unique ability to quantify confluences. In this script users can set a sensitivity and that sets the number of oscillators that must be in agreement before a signal is allowed to pass.
Here are the oscillators found within the OBOS Heatmap:
*Please keep in mind that although some of these oscillators may have big names, the code and math in the script may work differently than you're used to. This is because the code and math is changed quite a bit, and the overall intended functionality of the OBOS Heatmap has a larger scope than any one indicator. It's also important to note that the lengths for these oscillators are set low and are meant to classify the individual signal as either overbought or oversold, and not the entire period. So while the OBOS Heatmap is awesome for trends and cycles, it's ultimately meant to classify individual price bars as either overbought or oversold according to a consensus.*
Relative Strength Index
Money Flow Index
Commodity Channel Index
Aroon Oscillator
Relative Volatility Index
Fast Stochastic Detrended Price Oscillator
Fast Stochastic Elders Force Index
Fast Stochastic Relative Strength Index
Fast Stochastic Relative Vigor Index
Fast Stochastic Klinger Oscillator
Fast Stochastic Awesome Oscillator
Fast Stochastic Ultimate Oscillator
Fast Stochastic Chande Momentum Oscillator
Fast Stochastic On Balance Volume Oscillator
Fast Stochastic Moving Average Convergence/Divergence
Each band of the Overbought & Oversold Heatmap represents an oscillator. When it's orange it's said to be oversold. When it's yellow it's said to be overbought. The indicator turns purple during trends and reversals where it is neither overbought nor oversold. It can differentiate between uptrends and downtrends with differing colors of purple, but the OBOS Heatmap is not used for trends or cycles in this script. It is used to quantify oversold confluence.
Let's talk about the Dominance Suite.
First note in the top portion of the screenshot above, you will see various colors in the script. It replaces the price line with something we call Price Flow bars. So when you add the script it's best to make the stock price line invisible in TV settings. The Price Flow Bars use a preset EMA to color price action as being in either a downward momentum or upward momentum. The triangular signals represent dark teal for the initial long marker within a series, dark green for long orders and long signals that convert into safety orders, and light green for safety orders. This is more logic that makes this script really unique. The dark green initial long marker signals are rarely seen. You can find them at the beginning of a new series of signals and they work to establish when a new series of signals should begin. The dark green signals actually denote a long base order opportunity, but if a series has already started then these signals are converted into Safety Orders. The Safety Orders then come in light green, and red for Prop Shorts. Prop Shorts work with Initial Longs to establish the start of a new series. More on that math I cannot tell.
In the bottom half of the screenshot is the Dominance Suite itself. It's another one of the four filtering suites found in the script. It is made up of 7 oscillators that work to classify a price bar as being controlled by either the bears or the bulls. If a price bar is controlled by the bears it is said to be a better investment. The Dominance Suite works by applying a moving average to the balance of power. This is the way TradingView has intended the balance of power to be used, and works quite nicely in classifying individual price bars as either bearish or bullish. It's not an overall trend indicator as much as it states whether a bar is mostly controlled by the bears or the bulls.
Here are the oscillators found within the Dominance Suite:
SMA of BOP
EMA of BOP
HMA of BOP
WMA of BOP
VWMA of BOP
TEMA of BOP
LSMA of BOP
Within the script, there is an input for a negative threshold. When each of these 7 oscillators is in confluence and below this set threshold, the Prop Long will be allowed to pass as a real trade.
Keep in mind that each filtering suite also has the option to overload signals.
So not only can you filter signals based on these suites but you can also apply additional volume scaling to signals that don't get filtered.
Here we have the True Oscillator. The True Oscillator is a brand new oscillator. It's similar to things like the RSI or DPO, but technically speaking it considers many more factors into its average than other oscillators. It considers balance of power, sentiment, volume, momentum, gravity, and places special-strategic weighting on price data based on whether it's opening, closing, high, or low. If you stack the True Oscillator up with the RSI you'll notice right away they look similar, but each movement is quite different. Overall the movements are more balanced, the individual bars are more consistent with price data, and the swings are more clearly pronounced while simultaneously having a better register of strength in momentum. We use this indicator to filter and overload signals, to trade according to momentum, and to provide a 16th independent oscillator that can check the OBOS Heatmap without having to be confluent.
The final filtering suite is based on Net Volume. It classifies signals as oversold when there is a significant negative trend in net volume. If Net Volume is under 0, and trends downward for either 3, 4, or 5 bars in a row then it will mark a signal as oversold and allow it to pass. Then, if overloading for this suite is turned on it will allocate more volume to signals it does not filter out.
There is a lot that can be said about this strategy. The primary takeaway though is that it's not just one strategy. It's a tool for everyone, to help them plan their approach to different assets in different market climates. This tool can help you study current market conditions. It can allow you to plan a strategic approach to market segments, and see how your strategy would fare if new market data performed similarly. It's not just one strategy, but more of a strategy printer.
The Origin Suite allows users to plan the positioning of their signals. The Overbought & Oversold Suite allows users to filter their signals based on whether or not they are oversold. The Dominance Suite allows users to filter signals based on whether the market is being controlled by the bears or the bulls. The True Oscillator gives users the ability to filter signals based on a deep and powerful momentum oscillator. The Net Volume Suite lets users filter signals based on volume trends. When signals are filtered, signals that pass, can be overloaded with additional volume scaling. Features like Change-Based Volume Scaling and Position Average Volume Scaling give users plenty of inputs to create complex volume scaling strategies. Common-sense DCA inputs allow users to scale into markets the way pros do.
The Broadview Economic Studio is a powerful tool for planning trades with complex volume scaling strategies.
Users can plan their approach to different kinds of markets. They can link the script with their bot or broker like 3Commas, and the script will automatically send the correct volume scaling through to the bot.
Thank you for your time, and for reading the description of the Broadview Economic Studio.
bc Grid Backtest v1.4This strategy is a full implementation of Grid Trading backtest.
Prominent features of this backtesting strategy are:
- Logarithmic Chart Support: This strategy can support Log Scale on graph. Meaning that grid lines won't have irregular gaps in between the lines if you would like to view the chart Log Scaled. Every line will be aligned correctly even if you use Log Scale or not.
- Precise Buy & Sell: Script will execute precise Buy and Sell orders.
- Dynamic Grid Level Count: From 2 grid levels to n amount of grid levels are supported. There is no limitation on grid level count. You can pick any number starting from 2.
- Customized Backtesting Results Table: A table which includes data for those who want to know has been added at top right. It can be disabled.
Characteristics of this script:
- Able to fill more than one order in one single candle.
- Levels will keep being updated with every trade.
- There will be always one grid level ignored and it will be the level which made the last order filling possible. This is normal behavior of grid trading system.
- You can both use Log Scale and Normal Scale with this script. No issue will be on grid levels.
Using the script:
- Add this script to the chart from indicators tab
- Set starting and ending date for the grid backtesting bot either by dragging and dropping the vertical lines or by the date-time picker from indicator Inputs tab.
- Set highest and lowest limit for the script. These will be the boundary limits. Highest and lowest price for the script to work on. Lines will populate between these two values
- Set grid level count. Number of levels of the grid.
- Set amount to spend on per level. This quantity of order will be placed on each level when needed.
After setting the above settings, there is one last thing to do in order to get precise results. It is setting the Initial Capital.
- We can set this setting from 'Properties' tab. Named 'Initial Capital'. After setting the boundaries all we need to is to navigate to TradingView's own 'Data Window', and get the value there. Then paste it on the strategy's own related setting area.
In this example we used pair BTCUSDT 4h timeframe, our settings are:
Inputs Tab:
- Grid Count: 13
- High Limit: 72 000
- Low Limit: 17 000
- Logarithmic Grids: Checked (because I always use Log Scale on charts, if Log Scale is turned on, this needs to be checked)
- Quantity per level: 0.1
- Show Table: Checked
- Show Grid Levels: Checked
- Show Average Position Price: Checked
Properties Tab:
- Initial Capital: 24 902
- Slippage: 5
- Commission: 0.1% (this is the broker commission value)
This script's purpose is to make simulating possible outcomes between two dates. Therefore making it easier to get the idea of grid trading, finding the best settings for your risk management and for your portfolio.
RISK MANAGEMENTHi dear Traders,
Here I would present you my 'Risk Management' tool which is based on your buy orders, trading fees and your desired benefit.
Easily, fulfill the price and volume of each entries. Add to this, you can prepare the info about your next proposed entries, just let them not check at first and by meeting the prices then active the check-box beside it.
Two line will be presented on your candle-plot, one of the indicate the place that without any lose/win you can exit and also the desired exit position by considering user defined benefit.
Use it for free but please do not forget to boost the script.
Best regards and happy trading.
Shakib
Challenge training (journal)Dynamic trading journal with equity curve display. Detailed results with prop firm objectives, editable, $/month estimation, possibility to compare two strategies.
one line in parameter = one trading day. 20 days max.
For each trading day, specify : The number of trades, the number of SL, the number of total winning RR.
A table at the bottom right summarizes the days and performances during the backtest in order to have an idea of the current performance.
The bottom left table summarizes the overall performance with some key information.
Depending on the number of days traded, a monthly "salary" is deducted, taking into account the prop firm commission.
there is the possibility to define a "Type" for each trading day, 1 or 2. It allows to compare in a binary way, example for type 1: when the high time frame structure is doing well and I am confident for scalping, otherwise type 2.
Again: type 1: SL shorter by 50%, type 2: normal SL etc..
the button "separate 1 and 2" allows to display two additional equity curves : type 1 and type 2. It allows to have a quick visual comparison on the impact of our parameter studied in our backtest on our performance. at the scale of the main equity curve
All the conditions to succeed in the challenge are adjustable in the parameters. The drawdown calculation has been simplified - in order not to have to put 80 trades in the parameters window, I have gathered them by "day", and pessimistically, we consider first the stoplosses and then the take profits, simplifying the performances of the day into "one losing trade" and "one winning trade" (graphically). It is a good compromise between quantity and quality.
Use "A random day trading" indicator to spice up your training.
I hope this will be useful for you to track your performance !
Position Sizing Tool [Skiploss]The position sizing tool is an indicator to help calculate in trading, such as loss and gain, lots size, and risk-reward ratio.
When you open the indicator, you must select the entry, take profit, and stop-loss points.
Be careful;
The take profit point must be more than the entry point in the long position. On the other hand, it will be a short position.
The stop loss point must be less than the entry point in the long position. On the other hand, it will be a short position.
For contract size, you can find details on MetaTrader, Ctrader, or your broker.
Alex trading stragedyOverview
This script, named "ALEX TRADING STRATEGY", is a technical trading strategy designed for new investing groups. It uses a combination of various technical indicators to identify potential buying and selling opportunities in the market. The script includes the Relative Strength Index (RSI), Simple Moving Averages (SMA), Exponential Moving Averages (EMA), and Higher High Lower Low (HHLL) strategies to create a complete trading solution.
The user can change the position from long to short in the Input Settings. The script uses bar colors to indicate the current trading position. The script also has exit strategies to help manage the open trades. The user can also set the period for the various indicators used in the strategy.
The script provides various technical indicators and entry/exit signals to make the trading decision easier for the user. It also includes pivot lines, resistance and support levels to help the user make a more informed decision.
This Pine script implements a multi-indicator trading strategy that combines several technical analysis techniques for making trading decisions. The script uses the Relative Strength Index (RSI) to determine overbought and oversold conditions in the market and plots the RSI values on the chart. The RSI values above 70 are considered overbought and plotted as red upward triangles, while the RSI values below 30 are considered oversold and plotted as green downward triangles.
The script also calculates Simple Moving Averages (SMAs) with the user-defined period and plots them along with the Exponential Moving Averages (EMAs) of 20, 50, and 100 periods. Based on the crossover of the close price and the moving averages, the script enters long or short trades. The script sets the trade exit conditions as the low or high crossing the lower or upper band, respectively.
In addition to the moving average crossover, the script uses the highest high and lowest low over a user-defined period to determine long and short entries. The script plots the long and short conditions on the chart as green upward and red downward triangles, respectively. The script allows the user to switch between long and short trades by changing the input settings.
Finally, the script changes the bar colors based on the trade direction, with green bars indicating a long trade, red bars indicating a short trade, and blue bars indicating no trade. Overall, this Pine script provides a comprehensive trading strategy that combines several technical analysis techniques to make informed trading decisions.
HOW TO USE
Input Settings: In the Input Settings section, you can change the long to short position. You can also change the period value (default is 10) used to calculate the Simple Moving Average (SMA) for the Keltner channel.
Indicators: The script uses RSI (Relative Strength Index) with 14 periods as well as multiple EMAs (Exponential Moving Averages) with periods 20, 50, and 100 to help in making trading decisions.
Entry Signals: The script uses two main entry signals: (1) Keltner Channel and (2) HHLL (High-Low). When the closing price crosses above the upper band of the Keltner channel, the script generates a long signal, and when the closing price crosses below the lower band of the Keltner channel, the script generates a short signal. The HHLL strategy generates a long signal when the current high crosses above the highest high of the last "nPeriod" bars, and generates a short signal when the current low crosses below the lowest low of the last "nPeriod" bars.
Exit Signals: The script uses two exit signals: (1) Stop Loss based on Keltner channel and (2) Profit Target based on Keltner channel. The script exits the long position when the closing price crosses below the lower band of the Keltner channel, and the script exits the short position when the closing price crosses above the upper band of the Keltner channel.
To use this script, you will need to have access to a trading platform that supports PineScript, such as TradingView, and attach the script to a chart. The script will then automatically generate entry and exit signals based on the rules described above. It's important to note that this script is just a tool and not a guarantee of profit. As with any trading strategy, it's important to thoroughly test and understand the script before using it for live trading.
Position Sizer for UltraCap Trading Accreditation PlansWhen you enter a typical trading challenge, you are told that your accreditation assessment demo account is funded up to a certain amount. You are then told that you can only lose a small percentage of that account before you fail the accreditation/challenge. For example, if you are given a $100,000 dollar challenge demo account and are told that you can only lose up to 8% of that account ($8,000), then in reality, you really only have $8,000 to "trade" with before the game is over. That suggests that we need a risk management system that is initially based on the "true" amount of capital that we actually have to work with at the beginning of the assessment rather than an imaginary demo balance the prop firm gives us. Traditional forex risk management principles mandate that you never risk more than 2% of your trading capital on any one trade, the idea being that as long as your win rate is above some abysmally low level, it will take you a (hopefully) long time to run out of trading capital. That’s why the rules for passing an accreditation at the prop firm Ultra Cap mandate that you never risk more than 2% of your balance, or you will fail the assessment. With that in mind, I created this indicator/tool mostly for UltraCap accreditation candidates. In addition to using it to pass a prop firm assessment, you can also use it to increase your chances of surviving in an undercapitalized trading situation with your own money. For example, you could trade an actual $8,000 dollars (money that you really have) as if it were $100,000 (which is basically what any prop firm is asking you to do when they "give" you "$100,000" to trade with but only allow you lose a maximum of $8000). In that particular situation, the algorithm in this pricing model will base your initial risk exposure on an assumed account balance of $8000, and as you increase your balance, it proportionally increases risk exposure in the background until you reach a profit level of 6%, which just so happens to be the profit goal at Ultra Cap that gets you funded! This indicator uses a simple linear equation to progressively increase the risk exposure in the background based on your current stated account balance. Initially, your trade size will seem ridiculously small, but if your win rate holds up, the trade sizes will increase substantially as you get closer to the finish line.
Price Distance RatioThis study plots the ratio between current price and the price N days ago.
With N input that is configurable, users can find optimal long/short entries when price is in an established trend and price has diverge far from a given local peak or all time high.
With many years of stock trading the analysis indicates a connection between the distance of price and subsequent returns.
Portfolios of stocks with lower price to local highes ratios generally underperformed portfolios of stocks with higher prices to peaks reached similar N days ago.
The highest returns to previous peak are recorded when buying at the biggest dip.
For example, the purchase at 20% drawdown could generate 25% when price returns to the peak. The purchase at 50% drawdown could generate bigger, i.e. 100% return, when price returns to the peak. And the purchase at 90% drawdown could generate much bigger, i.e. 900% return, in a case the price returns to the peak.
However, buying very far below local peaks on almost all holding periods produces lower CAGR returns because of "timing adjustment". In simple words, typically the drawdown takes less time vs. further recovery.
For example:
👉 The largest BTC drawdown in 2013-2015 took 410 days (Peak-to-Valley) . And the recovery of BTC to new highs took 771 days (Valley-to-Peak) after that.
👉 The 3rd longest drawdown in BTC took 363 days (observed from December 17, 2017 to December 15, 2018). And further recovery in BTC to its new high took almost two years - 716 days .
👉The 4th longest drawdown in BTC took 162 days (observed from June 08, 2011 to November 17, 2011). And further recovery in BTC to its new high took more than a year - 469 days .
The concept of this study could recognizes at least 4 different modes of action.
👉 In a clearly established upward trend traders should be buying (following the trend) when Ratio is above 100% and reducing the size when Ratio turns below 100%.
👉 Conversely, in a clearly established downward trend traders should be shorted when Ratio is below 100% and covering when the Ratio turns back to 100%.
👉 In a sideways movement traders are advised to wait carefully if the Ratio near 100% for a long time, and take a position the trend is clear.
👉 Chartists can analyze the dynamic of the indicator - both in terms of trends and overall level. For example as it shown at the chart.
The understading of the study and rules of "timing adjustments" could genarate the awesome opportunities for stock options traders also, with strategies of selling uncovered call options and vertical call spreads.
// Many thanks to @HPotter and @Wheeelman wizards for their continious support and assistance.
mex_fundingScript for calculating Bitmex funding based on the Premium tickers Bitmex submits to Tradingview
Make sure you add the correct Bitmex Interest Base and Quote Symbols in the input settings
For example for www.bitmex.com the inputs are:
Chart ticker: XBTUSDPI8H
Input Settings
Interest Base: XBTBON8H
Interest Quote: USDBON8H
Spot Index Generator - The Quant Science Create your own spot index and compare returns with a benchmark. With this tool you will be able to quickly check if your portfolio management is better than the benchmark. It is a professional tool suitable for medium to long-term investors who need to create a personal and custom index with only spot assets and need to compare it with the return of a specific market.
Features
You can create your own indexes using up to 10 different assets. Through the user interface you can adjust the weight for each asset, and the initial capital with which to build the index.
Quantitative Data
1. Index Return vs. Benchmark Return
Compare your personal index with the benchmark.
2. Index Average Return vs. Index Return
Compare the return of your index with the average of returns. You can adjust the averaging through the user interface.
3. Volatility Index Analysis using Index Return and Average Index Return
Show the volatility of your index move over key levels created using the average of your index returns.
For the example used in the chart, we created a custom index for the crypto market, including 8 different assets:
1. KUCOIN:ETHUSDT , 10%
2. BINANCE:BNBUSDT , 10%
3. BINANCE:MATICUSDT , 20%
4. BINANCE:AVAXUSDT , 5%
5. BINANCE:SOLUSDT , 5%
6. KUCOIN:GODSUSDT , 10%
7. KUCOIN:SANDUSDT , 10%
8. BITGET:SHIBUSDT , 30%
The reference benchmark is KUCOIN:SANDUSDT .
The period of analysis start at January 1, 2023 to today.
Timeframe selected: 5 min
Capital: 1000 USDT
Following the benchmark analysis, the built index (lime color) does not perform better than the benchmark (blue color). As can be seen, the index created a lower return than the benchmark.
Rotational Gravity OscillatorMade using elements from two Cheatcountry scripts:
Includes a Bollinger Band for bounds that forms a trend follower based on the 0 point.
Includes CheatCountry color code signals, different color scheme. Bright colors are strong signals, ark are weak, green bull, red bear, the basics.
Switches for Bollinger Band color codes, which can actually be useful signals.
This oscillator can be used for divergences, trends, signal strength, confirmation, volatility readings, you name it.
It is a comparative oscillator, that compares adaptively smoothed, weighted modified Change of Gravity oscillators between 2 symbols and multiple lengths to determine directional momentum as one asset compares to another.
The default uses the Crypto TOTAL market cap to help trade cryptocurrencies. You will notice that BTC will give sell signals in uptrends at times. That is because it is being compared to an index of the total Crypto market cap, and since alt-coins move faster, BTC will lag behind this index.
Give CheatCountry a follow, hes one of the MVPs of Tradingview Pinescripters, constantly giving us access to novel new concepts as they are published by professionals.
Lots / Leverage / Margin [JoseMetal]============
ENGLISH
============
- Description:
This is a utility indicator, it prints a table with ATR, Volatility, Lotage and Margin for 3 custom timeframes, using the ATR of basis, it calculates volatility (%) and a recommended lotage depending on your risk settings.
A few months ago i fled from crypto exchanges to regulated brokers, and working with lots instead of plain margin was a bit of headache, i also trade with crypto, currencies, metals and indexes, each with different volatility, leverage... so this tool was a MUST for me to code.
So basically, this tool allows to keep the same RISK for every single asset, no matter if they have different volatility.
- Visual:
The indicator shows a table with all the info explained, ATR, Volatility...
For each timeframe it also prints 3 periods, short, long and average, you can show/hide timeframes and the different periods.
- Customization:
Colors in the table are custom, as well as the font size.
The risk management settings start with the margin you want to use as average, then you can customize your asset leverage, the risk (which is a value you HAVE to keep the same for all assets to balance the results correctly) and units per lot.
You can increase/decrease risk if you want to, i personally take DAILY values with a 18-20 risk to trade on a 4H chart.
For the "units per lot" take in mind that usually that value is ONE, but in some assets with really low value like currencies or some crypto your broker can set 1 lot to xxxx units, that's why you have that option.
- Usage and recommendations:
As i said i trade from 4H to daily, that's why my risk setting is 18-20, i use the lots plotted in the table on DAILY.
If you're more a scalper, just adjust the timeframes to your needs :)
Enjoy!
============
INGLÉS
============
- Descripción:
Este es un indicador de utilidad, imprime una tabla con ATR, Volatilidad, Lotaje y Margen para 3 temporalidades personalizadas, usando el ATR de base, calcula la volatilidad (%) y un lotaje recomendado dependiendo de tu configuración de riesgo.
Hace unos meses cambié de intercambios crypto (exchanges) a brokers regulados, y trabajar con lotes en lugar de margen simple era un poco dolor de cabeza, también tradeo con crypto, divisas, metales e índices, cada uno con diferente volatilidad, apalancamiento... así que esta herramienta era IMPRESCINDIBLE para mí de programar.
Básicamente, esta herramienta permite mantener el mismo RIESGO para cada activo, sin importar si tienen diferente volatilidad.
- Visual:
El indicador muestra una tabla con toda la información explicada, ATR, Volatilidad...
Para cada temporalidad también imprime 3 períodos, corto, largo y medio, puedes mostrar/ocultar los marcos temporales y los diferentes periodos.
- Personalización:
Los colores de la tabla son personalizados, así como el tamaño de la fuente.
La configuración de la gestión del riesgo comienza con el margen que deseas utilizar como promedio, a continuación, puedes personalizar el apalancamiento del activo, el riesgo (que es un valor que TIENE que mantener igual para todos los activos para equilibrar los resultados correctamente) y las unidades por lote.
Puedes aumentar/disminuir el riesgo si quieres, yo personalmente tomo valores DIARIOS con un riesgo de 18-20 para operar en un gráfico de 4H.
Para las "unidades por lote" ten en cuenta que normalmente ese valor es UNO, pero en algunos activos con valor realmente bajo como divisas o algunas criptomonedas tu broker puede poner 1 lote a xxxx unidades, por eso agrego esa opción.
- Uso y recomendaciones:
Como dije yo opero de 4H a diario, por eso mi ajuste de riesgo es de 18-20, uso los lotes graficados en la tabla en DIARIO.
Si eres más un scalper, sólo tienes que ajustar las temporalidades a tus necesidades :)
¡Que lo disfrutes!
Live Portfolio ScreenerThe live portfolio screener indicator is a tool that help users to track the performance of their investments in real-time. The indicator provides a detailed breakdown of the user's portfolio, including the current profit and loss (P&L) for each stock that is invested in. This allows users to quickly and easily see how their portfolio is performing and make informed decisions about their investments on charts. Overall, this tool is an essential tool for anyone looking to stay on top of their investments and make data-driven decisions.
This indicator can load any symbol globally usable.
How to use this indicator ?
in this indicator firstly
you have add script name. (For example if you want to add symbol you have add in 's01 ' means the first symbol)
after that
you have to add price for each (For example if you want to add buy price for the first symbol then add the buy price in ' Bp01 ')
then the quantity comes in picture which is below price list and named here as Bq01 which means 'Buy quantity for first symbol'
Basic Position Calculator (BPC)In trading, proper position sizing is essential to managing risk and maximizing returns. The script provided is a Basic Position Calculator that allows traders to quickly and easily calculate their position size, stop loss, take profit, and risk reward ratio for a given trade.
The script starts by defining several inputs for the user to customize the calculations. The first input is the "Account Size", which specifies the total amount of funds available for the trade. The next input is "Risk Amount %", which is the percentage of the account size that the trader is willing to risk per trade. The "Stop Loss" input specifies the maximum amount of loss that the trader is willing to accept, while the "Reward" input is the desired profit target for the trade. Finally, there is a "Position" input that allows the user to specify where on the chart the table of calculations will be displayed.
The script then calculates the position size, stop loss, take profit and risk reward ratio using the user-specified inputs. The position size is calculated by dividing the risk amount by the stop loss. The stop loss is calculated by multiplying the stop loss percentage by the close price, and the take profit is calculated by multiplying the stop loss percentage by the close price and the reward. Risk-reward ratio is the ratio of amount of profit potential to the amount of risk in a trade.
The script then creates a table and displays the calculated values on the chart at the specified location. The table includes the following information: account size, position size, account risk %, stop loss, stop loss %, take profit, take profit % and risk reward ratio. This allows the trader to quickly and easily see all the key calculations for their trade in one place.
Overall, the Basic Position Calculator script is a valuable tool for any trader looking to quickly and easily calculate their position size, stop loss, take profit, and risk reward ratio for a given trade. The ability to customize the inputs and display the calculations on the chart makes it a useful and user-friendly tool for managing risk and maximizing returns.
Cuban's Pair Trading IndexThe purpose of this indicator is to visually simplify the relationship between two assets when searching for pair trades or higher beta opportunities.
With highly correlated pairs, it can be a blessing or a curse during volatility when you're somehow stuck in the only lower beta pairs, or maybe you're market neutral and the wrong leg starts nuking.
This indicator was built as a visual way to track pair relationships.
Fundamentally, this script does the following:
Plots the relative performance of the relationship between two assets across multiple time horizons
Uses a consistent measurement of historical performance, regardless of asset -- currently standard deviations, may add log difference in the future
Plots a custom Average Directional Index on the current chart ticker for current asset contextual momentum
Plots the average 'rotation' of both the ADX and Pair Delta independently, over n numbers of rotations -- able to be specified using the 'Rotation Lookback' variable
If you've never pair traded crypto before (i.e. long $DYDX, short $ETH), you might not be aware that most highly correlated alt asset returns tend to oscillate on a low timeframe rolling basis around the performance of the majors -- and more recently, predominantly $ETH. With this in mind and using this oscillator, we can track that relationship.
Users are given the ability to adjust the following:
Comparison Asset
Fast and Slow Delta Lookbacks
Whether to wait for one bar delay during security calls
Rotation Lookback
Rotation Threshold for Pair Delta and ADX independently
ADX Lookback
Whether to utilize the ADX on the current chart ticker or also net that off against the ADX of the comparison asset
TO DO:
Aesthetic update to Pair Delta plot
Permanent fix for security call forced delay
Cuban's Asset ScreenerCuban's Asset Screener is a tool designed to view the health of the entire market in a single charting window, using a multi-timeframe, real-time heatmapped asset screener built natively within Tradingview.
You can use this tool to aggregate and display critical information required to identify your favorite trade ideas using other Cuban's Edge tools. Although the screener currently uses pre-built lists for over 200+ Binance and Bybit Futures pairs, the tool comes with custom watchlist support, allowing you to add as many additional assets as your screen and browser will support.
Currently tracking range positions and a custom cross asset delta function from Cuban's Pair Trading Index, the screener has an in-built sorting function which orders assets by similar market structure and colors them relative to their performance against the user's comparison asset -- their current chart ticker.
Cuban's Asset Screener is also valuable as a tool to monitor performance of your portfolio against any benchmark asset, by using the 'Asset Redenomination' option within the settings. This allows the user to redenominate the entire screener easily using their current chart ticker.
In order to setup the Asset Screener, the user will need to select an 'Asset List' and a 'Screen Location' value. This will load the screener into a set position on screen, from right to left. In order to add additional assets, multiple instances of the asset screener will need to be loaded on screen.
With this indicator, users get the option to adjust the following:
range positioning lookback
asset redenomination for range positioning
asset sorting order
screen location
multi-timeframe support
live pricing for PTI values
in-built asset lists for 200+ assets
TO DO:
add market filters to the coloring
add tradfi asset lists
Strategy Developer ToolSolar Strategies: Strategy Developer Tool Complete Guide
This guide provides full explanation of the intended purpose of our script along with individual explanation of each input and the logic behind them coupled with general knowledge which we find useful in using our tool regarding elements of risk and strategy. Use this information wisely and understand we are not providing financial advise, this is a learning tool meant to help advance traders knowledge of the markets and their strategies which are formed as such.
Basics
Before getting into the specifics of how to use our strategy developer tool, it's important to understand a few basic fundamental things about it. The purpose of the tool is to allow the user to optimize a strategy through back testing with our strategy tracker and 50+ user inputs. The way you optimize your strategy depends on a couple things:
The state of the current and recent previous market.
The timeframe you trade on.
The types of trades you prefer. (swings, scalps, etc.)
How much risk you are willing to take on.
Risk Basics:
Going off the last bullet point on the list above, risk plays a huge part in how you optimize your strategy, with that being said here are a few general rules of risk as they relate to trades:
The more trades you take on, the more risk you are opening your strategy up to.
If done correctly, more trades will often result in more profit with slightly lower accuracy, and more risk.
The less trades you take on, the easier it is to have higher accuracy because ideally by rooting out the losing trades, you are left with fewer overall trades but mostly winning trades.
Less trades with higher accuracy often result in less profit but will 100% be less risky than the opposite. (More trades, less accurate, more profit, MORE RISK)
Input Basics:
More trades, less trades, more risk, less risk, what does this all mean as it relates to our tool?
The 50+ user inputs that allow you to optimize and create your strategy all effect when the script takes a trade.
Many of the inputs are essentially conditions. By changing these inputs, what you are doing is changing how specific the conditions need to be in order to take a trade.
This is how the inputs tie into the bullet point list above regarding risk and the number of trades you take on. By raising or lowering certain inputs, you are making the conditions more or less specific on when to trade.
Making conditions more specific will allow for less trades to be taken and will often result in a higher win rate, and less associated risk.
Making conditions less specific will allow for more trades to be taken and depending on the state of the market, could result in more profit being realized, but at the same time opens you up to more risk because you are stating a more general set of conditions in order to take a trade.
How does it work?
Our strategy developer tool is based on two simple factors in order to identify specific areas in the market deemed good for trade. They are as follows:
Directional momentum to identify when a move might happen.
A confirmation of the desired move.
Indicators:
The tool gets its information on these two factors from two custom built indicators which are hard coded into the script. These two indicators and the inputs which affect them can be found labeled with Indicator 1 or Indicator 2 in the tool's settings.
When the conditions are met based on the factors of both indicators, it then decides your stop losses and take profits using pivot points.
Indicator 1 is the momentum indicator.
Indicator 2 looks for confirmation of the move.
Hedges:
Since nothing is ever certain when trading, our tool also aims to minimize potential loss before it can happen by incorporating hedges when a signal prints in the opposite direction of the trade you are currently in.
To identify when to hedge, the candles will appear with the opposite color of your original trade. Candles, while in a long trade, appear as green and candles while in a short trade appear as red. While in a long trade the only time red candles will appear is when a hedge occurs and vice versa for shorts.
Example: If you just took a long trade based on a long signal that the script gave off, but a short signal prints off while you are in the long, you are directed to sell half your long position and enter that half into a short position. Since there is now more uncertainty in the long because of the short signal, minimizing your position size and having a smaller position in the opposite direction allows you to cover your bases if the trade moves against you. If it doesn’t move against you and ends up going long as originally intended, you are not to lose any money, likely a small profit or break even when all is said and done.
In order to give the hedges a greater change of hitting, the take profits are smaller than a normal trade, this way even if your hedge wasn’t necessary and the original trade does not move against you, it's likely that your hedge will still win, and you can just consider it a small scalp to further your profits on the original trade.
Doubles:
Besides minimizing loss, we also aim to maximize the potential gain. When a second signal prints off in the direction of the trade you are currently already in, the tool directs you to double your position size.
The signal for doubling is a label with “2x” written inside.
The logic here is similar to hedging but in the opposite way. Just as a signal in the opposite direction creates uncertainty, a signal in the same direction indicates more certainty hence doubling your position size.
Example: If you are currently in a long position and you get a second long signal, you would then double your existing position since two long signals printing off before the first one has a chance to play out indicates a stronger chance of movement in the intended direction of your trade.
User Inputs
Upon opening the tools settings tab, you will find all the user inputs which can then be modified to fit your desired strategy. In this section of our guides, you will find individual explanations and use cases for each input so you can correctly use them to your best advantage.
Strategy Tracker Table:
By ticking this input on, the strategy tracker table will be visible to the user. (Default is on)
Indicator 1 Greater Than: Long:
By ticking this input on, you are adding a condition the script will then look for in order to take a long. (Default is on)
This condition is that an average of indicator 1, which searches for momentum, must fall above a certain level, which is determined in the next input.
The purpose of this is to ensure that the average momentum is not too low because this would indicate prolonged downwards movement on the timeframe of the market being observed, making a long position riskier.
Indicator 1 Greater Than Input: Long:
This input correlates to the previous input directly above.
If Indicator 1 Greater Than: Long is ticked on, then one of the conditions in order to take a long position will be that the average of indicator 1 must fall above the level which you set in this input.
max level 100, min level 0
Indicator 1 Less Than: Long
By ticking this input on, you are adding a condition the script will then look for in order to take a long position. (Default is on)
This condition is that an average of indicator 1, which searches for momentum, must fall below a certain level, which is determined in the next input.
The purpose of this is to ensure that the average momentum is not too high, because this would indicate a prior significant upwards movement or trend on the timeframe of the market being observed.
Taking a long position while the average momentum is at higher levels exposes the risk of longing as the market has started to pull back from a peak or when the market has just reached a peak.
Indicator 1 Less Than Input: Long
This input correlates to the previous input directly above.
If Indicator 1 Less Than: Long is ticked on, then one of the conditions in order to take a long position will be that the average of indicator 1 must fall below the level which you set in this input.
max level 100, min level 0
Indicator 1 Greater Than: Short
By ticking this input on, you are adding a condition the script will then look for in order to take a short. (Default is on)
This condition is that an average of indicator 1, which searches for momentum, must fall above a certain level, which is determined in the next input.
The purpose of this is to ensure that the average momentum is not too low because this would indicate prolonged downwards movement or trend on the timeframe of the market being observed.
Taking a short position while the average momentum is at lower levels exposes the risk of shorting as the market has started to recover from a bottom or when the market has just reached a bottom.
Indicator 1 Greater Than Input: Short
This input correlates to the previous input directly above.
If Indicator 1 Greater Than: Short is ticked on, then one of the conditions in order to take a short position will be that the average of indicator 1 must fall above the level which you set in this input.
max level 100, min level 0
Indicator 1 Less Than: Short
By ticking this input on, you are adding a condition the script will then look for in order to take a short position. (Default is on)
This condition is that an average of indicator 1, which searches for momentum, must fall below a certain level, which is determined in the next input.
The purpose of this is to ensure that the average momentum is not too high, because this would indicate a prior significant upwards movement or trend on the timeframe of the market being observed.
Taking a short position while the average momentum is at higher levels exposes the risk of shorting as the market is currently in a strong uptrend.
Indicator 1 Less Than: Short
This input correlates to the previous input directly above.
If Indicator 1 Less Than: Short is ticked on, then one of the conditions in order to take a short position will be that the average of indicator 1 must fall below the level which you set in this input.
max level 100, min level 0
Summary of Input Group: Indicator 1 Greater/Less Than Long/Short
This grouping of inputs is best used as a filter of sorts, much like many of the other inputs which are also essentially filters of the market to find areas ripe for trade. Specifically, however, this group of inputs is especially powerful because if used correctly, it can specify a range for the average momentum to fall in when looking for either long or short trades. Think of it like a sweet spot where the average is not too high nor too low. In combination with the numerous other inputs which will shortly be explained, this sweet spot can be a great indication. Keep in mind that once you find a working range, this will not last forever. Conditions in the market are ever changing and as such your inputs, in this case the range the average momentum must fall in, will also need to change with the market conditions.
Bars Since Crossover:
This input simply describes a crossover of the momentum indicator (indicator 1) and its average.
In the category How does it work? Two main factors are discussed, the first being directional momentum to determine when an upwards move might happen. The crossover correlated to this input is the directional momentum as mentioned earlier.
As also mentioned in How does it work? The second factor is a confirmation of the desired upwards move. This confirmation is a crossover of the current price and indicator 2 which will be further addressed later on.
What's important to understand about the two key factors at play in regard to Bars Since Crossover is that this input is determining a condition which looks for a certain number of bars prior to the confirmation of indicator 2 which the crossover of momentum and its average has happened on indicator 1.
Example: Bars Since Crossover input is set to 10. This means that the crossover of momentum and its average from indicator 1 must be within 10 bars prior to the confirmation from indicator 2. If this happens then this condition is met for a long position.
Bars Since Crossunder:
This input simply describes a crossunder of the momentum indicator (indicator 1) and its average.
In the category How does it work? Two main factors are discussed, the first being directional momentum to determine when a downwards move might happen. The crossunder correlated to this input is the directional momentum as mentioned earlier.
As also mentioned in How does it work? The second factor is a confirmation of the desired downwards move. This confirmation is a crossunder of the current price and indicator 2 which will be further addressed later on.
What's important to understand about the two key factors at play in regard to Bars Since Crossunder is that this input is determining a condition which looks for a certain number of bars prior to the confirmation of indicator 2 which the crossunder of momentum and its average has happened on indicator 1.
Example: Bars Since Crossunder input is set to 10. This means that the crossunder of momentum and its average from indicator 1 must be within 10 bars prior to the confirmation from indicator 2. If this happens then this condition is met for a short position.
Summary of Input Group: Bars Since Crossover/Crossunder
These two inputs can have a large effect on the types of trades being taken and the risk which your strategy opens up to. The idea is that in order for the two key factors described in How does it work? to be correlated and therefore indicate a strong directional move, the two events must happen within a somewhat small period of time. If the period of time between the two events taking place is too large, then it's riskier for your strategy due to a delay in directional momentum and the necessary confirmation. It's important to note that this “small period of time” is relative to the security you're trading and the timeframe its being trades on. Small could mean 5 bars in some cases or 20 bars in others, this is why our custom back tester exists. So that the process of optimization on different securities and different timeframes is smooth and only requires adjustments to inputs then your own analysis of the back test results.
Indicator 1 Input Long
Defines how strong the upwards momentum needs to be in order to take a long position.
When optimizing your strategy, this input is likely to have some of the most effect on when the script takes a long position.
The reasoning for this is because the level you set for this input is the level which indicator 1 must close above following the crossover of its average.
Example: Indicator 1 Input Long set to 50, this means that when the momentum crosses over its average from indicator 1, upon the close of this crossover the momentum must be above the level 50 in order for this condition to be met to take a long position.
The higher the level, the stronger the upwards momentum must be, and therefore by using higher levels for this input, the script will search for stronger directional moves leaving less chance for the trade to move against you.
Indicator 1 Input Short
Defines how strong the downwards momentum needs to be in order to take a short position.
When optimizing your strategy, this input is likely to have some of the most effect on when the script takes a short position.
The reasoning for this is because the level you set for this input is the level which indicator 1 must close below following the crossunder of its average.
Example: Indicator 1 Input Short set to 40, this means that when the momentum crosses under its average from indicator 1, upon the close of this crossunder the momentum must be below the level 40 in order for this condition to be met to take a short position.
The lower the level, the stronger the downwards momentum must be, and therefore by using lower levels for this input, the script will search for stronger directional moves leaving less chance for the trade to move against you.
Summary of Input Group: Indicator 1 Input Long/Short
These two inputs are so important to your strategy because at the end of the day no matter how you set it up, it's still a momentum-based strategy. With that being said the level of momentum or the strength needed in order to take trades is of course going to be a key decider in the successfulness of the strategy. When optimizing these two inputs make sure to take into account what the overall market conditions are, meaning if it’s a bull market maybe make the momentum needed to take a long slightly less comparatively to the amount needed to take a short, in other words make long conditions less specific and short conditions more specific. Slight variations of this input can have very big effects, even changing it by 1 or 2 can make a major difference. In might even be good to consider starting optimization with these inputs and then work the rest of the strategy out from there. A lot could be said about these inputs and more docs will be added in order to further explain more strategy approaches revolving around them, for now don’t hesitate to ask any questions.
Indicator 2 Red
This input is used as a sort of chop filter at its base level, however if used correctly it can be a much broader filter for what areas of the market you want to trade in.
Indicator 2 shows as either red or green and is used as a confirmation when price crosses over it following the crossover of momentum and its average from indicator 1 to take a long position.
If ticked on, Indicator 2 Red states a condition in order for the script to take a long position. (Default is on)
The condition is that upon the crossover of the current price and Indicator 2, 10 bars ago indicator 2 must have been red.
The reason for this input is because the current color of indicator 2 upon the crossover must also be red. However, this condition is hard coded in and cannot be changed by any input.
This is because the type of trade being targeted is that of a type of reversal or continuation.
If indicator 2 showed green 10 bars ago and is currently red this would indicate that a top was just reached, and price is reversing downwards making this not a good area to take a long.
Another scenario if indicator 2 showed green 10 bars ago and is currently red is that there is currently a sideways trend going on or otherwise known as chop, also not an ideal area to take a long
However, if 10 bars ago indicator 2 was red and it's currently red this would indicate a more prolonged pullback.
If all conditions are met and we know that price has been pulling back, now we can enter a long with more knowledge pointing to price reversing upwards from a downwards trend, or continuing its upwards trend after a pullback.
Indicator 2 Green
This input is used as a sort of chop filter at its base level, however if used correctly it can be a much broader filter for what areas of the market you want to trade in.
Indicator 2 shows as either red or green and is used as a confirmation when price crosses under it following the crossunder of momentum and its average from indicator 1 to take a short position.
If ticked on, Indicator 2 Green states a condition in order for the script to take a short position. (Default is on)
The condition is that upon the crossunder of the current price and Indicator 2, 10 bars ago indicator 2 must have been green.
The reason for this input is because the current color of indicator 2 upon the crossunder must also be green. However, this condition is hard coded in and cannot be changed by any input.
This is because the type of trade being targeted is that of a type of reversal or continuation.
If indicator 2 showed red 10 bars ago and is currently green this would indicate that a bottom was just reached, and price is reversing upwards making this not a good area to take a short.
Another scenario if indicator 2 showed red 10 bars ago and is currently green is that there is currently a sideways trend going on or otherwise known as chop, also not an ideal area to take a short.
However, if 10 bars ago indicator 2 was green and it's currently green this would indicate a more prolonged upwards movement.
If all conditions are met and we know that price has been moving up, now we can enter a short with more knowledge pointing to price reversing downwards from an upwards trend, or continuing its downwards trend after a bounce up.
Summary of Input Group: Indicator 2 Red/Green
Similar to Indicator 1 Greater/Less Than Long/Short, the goal of these inputs is to try to get a picture of what the previous recent market has been doing. By getting this picture it's easier to find different areas of the market more ideal for trades. Different from Indicator 1 Greater/Less Than Long/Short though, Indicator 2 Red/Green is directly correlated to the price action in the market rather than the momentum. By switching these on or off you are setting more or less specific conditions for taking trades. Some markets require this extra condition to lower your risk in your strategy, however others may not.
Pivot Low
This input is used to define the number of bars the script will look back to grab a pivot low when taking a long position.
This pivot low is then used to set the stop loss when entering a long position.
This input is very important and optimizing it correctly can be extremely crucial to your strategies success.
The Strategy Developer tool uses a 1:1 risk to reward ratio when setting your first take profit point, so when the script looks back to get a pivot low based on the input you set, it will then set your first take profit at an equal ratio to the stop loss found from the pivot low.
The goal in optimizing this input is to give enough lookback to find real pivot points where price has reversed off of, but not to give too much lookback where its grabbing previous pivot points unrelated to the current move of momentum the script is giving a long signal from.
Consider the type of trades you're looking for in your strategy and what timeframe you are trying to trade on.
Longer swing trades which aim to catch bigger moves in the market, possibly on higher time frames, may require a further lookback in order to get your take profits in the correct positioning to catch the desired move, and not exit early before the trade has fully played out.
Shorter scalp trades may aim to catch smaller moves and therefore you don’t want to allow for too much risk by having a large stop loss and large take profits as a result.
Pivot Low 2
Pivot low 2 can be thought of as a backup lookback in order to get the correct pivot low.
In an input which will be discussed shortly called Pivot Low Minimum, you can set a minimum percentage for your pivot low to be, if the pivot low does not meet the minimum then the script will look to Pivot Low 2’s input to use as a bar lookback in order to get the correct pivot low.
This input is used because you might find a Pivot Low input that works well for the majority of the trades in your back tested strategy, however, there will always be outliers and when this Pivot Low input falls short of getting the correct level to put your stop losses at, Pivot Low 2 is used.
Pivot Low 2’s input should always be higher than Pivot Low’s input, that way you can allow the script to look back further in time to find the correct level when the minimum is not met.
Pivot High
This input is used to define the number of bars the script will look back to grab a pivot high when taking a short position.
This pivot high is then used to set the stop loss when entering a short position.
This input is very important and optimizing it correctly can be extremely crucial to your strategies success.
The Strategy Developer tool uses a 1:1 risk to reward ratio when setting your first take profit point, so when the script looks back to get a pivot high based on the input you set, it will then set your first take profit at an equal ratio to the stop loss found from the pivot high.
The goal in optimizing this input is to give enough lookback to find real pivot points where price has reversed off of, but not to give too much lookback where its grabbing previous pivot points unrelated to the current move of momentum the script is giving a short signal from.
Consider the type of trades you're looking for in your strategy and what timeframe you are trying to trade on.
Longer swing trades which aim to catch bigger moves in the market, possibly on higher time frames, may require a further lookback in order to get your take profits in the correct positioning to catch the desired move, and not exit early before the trade has fully played out.
Shorter scalp trades may aim to catch smaller moves and therefore you don’t want to allow for too much risk by having a large stop loss and large take profits as a result.
Pivot High 2
Pivot high 2 can be thought of as a backup lookback in order to get the correct pivot high.
In an input which will be discussed shortly called Pivot High Minimum, you can set a minimum percentage for your pivot high to be, if the pivot high does not meet the minimum then the script will look to Pivot High 2’s input to use as a bar lookback in order to get the correct pivot high.
This input is used because you might find a Pivot High input that works well for the majority of the trades in your back tested strategy, however, there will always be outliers and when this Pivot High input falls short of getting the correct level to put your stop losses at, Pivot High 2 is used.
Pivot High 2’s input should always be higher than Pivot High’s input, that way you can allow the script to look back further in time to find the correct level when the minimum is not met.
Pivot Low Risk Tolerance
This input is very important in managing the risk associated with your strategy.
Pivot Low Risk Tolerance is defining a maximum percentage the pivot low can be away from your entry.
Since the pivot low that’s found is assigned to your stop loss and directly affects the placement of your take profits when taking a long position, making sure the pivot low isn’t too far down is crucial.
Depending on the types of trades you're aiming to take, the timeframe you choose to trade on, and the leverage you use in your strategy, you may want to assign a higher risk tolerance or a lower one.
Example: Pivot Low Risk Tolerance input set to 3, this means that when all other conditions are met in order to take a long position, when searching for the pivot low in order to set a stop loss, if the script finds the pivot low is greater than 3% away from the entry point, it will not take the trade.
Pivot High Risk Tolerance
This input is very important in managing the risk associated with your strategy.
Pivot High Risk Tolerance is defining a maximum percentage the pivot high can be away from your entry.
Since the pivot high that’s found is assigned to your stop loss and directly affects the placement of your take profits when taking a short position, making sure the pivot high isn’t too far up is crucial.
Depending on the types of trades you're aiming to take, the timeframe you choose to trade on, and the leverage you use in your strategy, you may want to assign a higher risk tolerance or a lower one.
Example: Pivot High Risk Tolerance input set to 3, this means that when all other conditions are met in order to take a short position, when searching for the pivot high in order to set a stop loss, if the script finds the pivot high is greater than 3% away from the entry point, it will not take the trade.
Pivot Low Minimum
Sometimes when searching for the pivot low, the script's defined lookback may not be enough to find the proper pivot point.
This can cause improper placement of stop losses and take profits and may cause trades to be exited early before they can fully play out in your favor.
Pivot Low Minimum is an input used to combat this problem, when the script finds a pivot low that does not meet the minimum percentage away from the entry point, it will then turn to Pivot Low 2 input in order to gain a further lookback and grab the correct pivot point to set your stop loss and take profits with.
When reading and setting this input, understand that setting it to 1 means there is no minimum, setting it to 0.9 would mean the minimum is a 10% difference between the pivot low and your entry point.
Think of it in terms of decimals and their equivalent percentage, 0.1 is equal to 10%, 0.01 is equal to 1%.
Whatever percentage you want to set for a minimum, convert it to a decimal, then simply subtract it from 1.
Example: Say you desire a 1.5% minimum pivot low and as a result an equivalent stop loss of 1.5% below your long entry and furthermore a take profit 1.5% above your long entry since the script uses a 1:1 ratio. Converting 1.5% to a decimal would give you 0.015, then subtracting it from 1 would give you 0.985, this would be the input assigned to Pivot Low Minimum.
Pivot High Minimum
Sometimes when searching for the pivot high, the script's defined lookback may not be enough to find the proper pivot point.
This can cause improper placement of stop losses and take profits and may cause trades to be exited early before they can fully play out in your favor.
Pivot High Minimum is an input used to combat this problem, when the script finds a pivot high that does not meet the minimum percentage away from the entry point, it will then turn to Pivot High 2 input in order to gain a further lookback and grab the correct pivot point to set your stop loss and take profits with.
When reading and setting this input, understand that setting it to 1 means there is no minimum, setting it to 0.9 would mean the minimum is a 10% difference between the pivot high and your entry point.
Think of it in terms of decimals and their equivalent percentage, 0.1 is equal to 10%, 0.01 is equal to 1%.
Whatever percentage you want to set for a minimum, convert it to a decimal, then simply subtract it from 1.
Example: Say you desire a 1.5% minimum pivot high and as a result an equivalent stop loss of 1.5% above your short entry and furthermore a take profit 1.5% below your short entry since the script uses a 1:1 ratio. Converting 1.5% to a decimal would give you 0.015, then subtracting it from 1 would give you 0.985, this would be the input assigned to Pivot High Minimum.
Summary of Input Group: Pivot Low/High - Pivot Low/High 2 – Pivot Low/High Risk Tolerance – Pivot Low/High Minimum
The first key takeaway from all these inputs is that your stop losses and take profits will be directly affected through optimizing any of them. The second key takeaway is that these inputs are crucial in managing the risk in your strategy, and while this has been said many times throughout the guide for various inputs, when it comes to stop losses and take profits it is especially true. Having a stop loss which is too high opens up the possibility for much bigger losses, and as a result your take profits will also be too high, minimizing the chance of any of them being hit. Having a stop loss which is too low increases the chance that your trade will get stopped out preemptively, before the trade can mature and move in your favor because remember that trades will not always move immediately in the intended direction, a good amount of patience is often involved in creating consistent successful trades and a successful strategy as such. On the same note, too low of a stop loss could also mean you are missing out on unrealized profit since your take profits are a direct result of the stop loss which is found. When optimizing your pivot low/high risk tolerance, think not about how much you are willing to lose on a single trade, but how much your portfolio can actually afford to lose not just on a single trade but multiple trades, sometimes even in a row. Obviously, the goal in creating a strategy is that you avoid losing trades and especially multiple in a row, however, there are many things that can’t be accounted for. The only way to manage this unaccounted risk is to use proper risk management and not open yourself up to big losses even in the worst most unlikely scenarios. Even if you don’t lose multiple trades in a row, ask yourself, could I afford to lose multiple trades with the risk tolerance I have set if everything were to go to $hit, (hopefully it would not), but in the off chance it did, instead of beating yourself up over what you did wrong, you’ll be patting yourself on the back for what you did right.
TP2-4 Long Placement
The first thing to understand about the take profit placement is that our system of stop losses and take profits uses a 1:1 risk to reward ratio for the first stop loss and first take profit.
This means that if your stop loss falls 2% below your long entry, your first take profit will be 2% above your long entry, hence 1:1.
As for take profits 2-4, they are just extensions of that ratio. This means that if TP2 Long Placement is set to 1.5, the ratio for your second take profit is 1:1.5.
Using the same percentage from the second bullet point being 2%, we can now gather that with a 1:1.5 ratio our second take profit would be at 3% above our long entry.
The same applies for the rest of the take profits, meaning whatever the take profit is set at regardless of which one, apply that number to the second placeholder of the ratio.
Example: First stop loss falls 2% below long entry. TP2 Long Placement input set to 1.5; risk to reward ratio is 1:1.5; corresponding percentage would be a 3% gain. TP3 Long Placement input set to 2; risk to reward ratio is 1:2; corresponding percentage would be a 4% gain. TP4 Long Placement input set to 2.5; risk to reward ratio is 1:2.5; corresponding percentage would be a 5% gain.
The next key thing to understand about the trailing take profits system is the position size being sold at each take profit and therefore how the strategy tracker calculates your strategy's profit.
At the first take profit, 50% of your position is being calculated as sold, locking in good profits off the bat.
At TP2, 20% of your position is being calculated as sold, leaving a remaining 30% open to gain more profit.
At TP3, another 20% of your position is being calculated as sold, leaving 10% to collect any additional possible gains.
At TP4 the remaining 10% of your position is sold and the trade will be fully closed out.
SL2-4 Long Placement
Our system of trailing stop losses is completely similar to that of our trailing take profits.
Just like the trailing take profits, the inputs for stop losses 2-4 are also used as the second placeholders in the risk to reward ratio.
This may be confusing since generally stop losses are associated with a loss on your position, however, the only stop loss which results in a loss on your position is the first one, not stop losses 2-4.
This is because once your first take profit is hit on your long, your stop loss will automatically move up to the price equivalent to the ratio which you set using these inputs that lies in profit.
Example: Since your first take profit will always be at a 1:1 risk to reward ratio with your stop loss, your second take profit could be at a 1:0.8 ratio. So, to clarify, once your first take profit is hit at a 1:1, your original first stop loss will now be moved up in profits to just below your first take profit at a 1:0.8 risk to reward ratio. This only happens AFTER the first take profit is hit.
For stop losses 3 and 4, the same logic is true, once TP2 is hit, your second stop loss will now be moved up to the placement of SL3 which will fall somewhere below TP2. Once TP3 is hit, your third stop loss will now be moved up to the placement of SL4 which will fall somewhere below TP3. If stop loss 4 does not get hit, then the only thing left to happen is for TP4 to hit and the trade will fully close out.
The one major difference between our system of trailing stop losses and take profits is that no matter what stop loss is hit, the entire remainder of your position will be calculated as sold.
So, if your first take profit hits and sells 50% of your long position, but the trade does not continue upwards and moves down to your second stop loss, the remaining 50% of your position will be calculated as sold.
The same applies to SL3 and SL4, so at SL3 the remaining 30% of your position will be calculated as sold, and at SL4 the remaining 10% will be calculated as sold.
Your trailing stop loss placement is dependent on what types of trades you desire. For shorter scalps on smaller timeframes, it's recommended to place each stop loss just below each corresponding take profit for long trades.
This way you leave just enough room for the trade to continue upwards if there is enough momentum, but you don’t open yourself up to losing your unrealized profit if it does not make this continuation.
If you desire longer swing trades on higher timeframes, it might be a good idea to leave more room in between the take profit and corresponding stop loss.
This way you leave more room for the trade to mature and move in your favor since when trading longer moves, often they will not shoot straight up but rather have a series of small pullbacks throughout the more general upwards trend.
Note that when a long trade is first entered the only stop loss and take profit in play are your original stop loss found by the pivot low which would result in a loss, and the first take profit at a 1:1 risk to reward ratio from that pivot low.
TP2-4 Short Placement
The first thing to understand about the take profit placement is that our system of stop losses and take profits uses a 1:1 risk to reward ratio for the first stop loss and first take profit.
This means that if your stop loss falls 2% above your short entry, your first take profit will be 2% below your short entry, hence, 1:1.
As for take profits 2-4, they are just extensions of that ratio. This means that if TP2 Short Placement is set to 1.5, the ratio for your second take profit is 1:1.5.
Using the same percentage from the second bullet point being 2%, we can now gather that with a 1:1.5 ratio our second take profit would be at 3% below our short entry.
The same applies for the rest of the take profits, meaning whatever the take profit is set at regardless of which one, apply that number to the second placeholder of the ratio.
Example: First stop loss falls 2% above short entry. TP2 Short Placement input set to 1.5; risk to reward ratio is 1:1.5; corresponding percentage would be a 3% gain. TP3 Short Placement input set to 2; risk to reward ratio is 1:2; corresponding percentage would be a 4% gain. TP4 Short Placement input set to 2.5; risk to reward ratio is 1:2.5; corresponding percentage would be a 5% gain.
The next key thing to understand about the trailing take profits system is the position size being sold at each take profit and therefore how the strategy tracker calculates your strategy's profit.
At the first take profit, 50% of your position is being calculated as sold, locking in good profits off the bat.
At TP2, 20% of your position is being calculated as sold, leaving a remaining 30% open to gain more profit.
At TP3, another 20% of your position is being calculated as sold, leaving 10% to collect any additional possible gains.
At TP4 the remaining 10% of your position is sold and the trade will be fully closed out.
SL2-4 Short Placement
Our system of trailing stop losses is completely similar to that of our trailing take profits.
Just like the trailing take profits, the inputs for stop losses 2-4 are also used as the second placeholders in the risk to reward ratio.
This may be confusing since generally stop losses are associated with a loss on your position, however, the only stop loss which results in a loss on your position is the first one, not stop losses 2-4.
This is because once your first take profit is hit on your short, your stop loss will automatically move down to the price equivalent to the ratio which you set using these inputs that lies in profit.
Example: Since your first take profit will always be at a 1:1 risk to reward ratio with your stop loss, your second take profit could be at a 1:0.8 ratio. So, to clarify, once your first take profit is hit at a 1:1, your original first stop loss will now be moved down in profits to just below your first take profit at a 1:0.8 risk to reward ratio. This only happens AFTER the first take profit is hit.
For stop losses 3 and 4, the same logic is true, once TP2 is hit, your second stop loss will now be moved down to the placement of SL3 which will fall somewhere above TP2. Once TP3 is hit, your third stop loss will now be moved down to the placement of SL4 which will fall somewhere above TP3. If stop loss 4 does not get hit, then the only thing left to happen is for TP4 to hit and the trade will fully close out.
The one major difference between our system of trailing stop losses and take profits is that no matter what stop loss is hit, the entire remainder of your position will be calculated as sold.
So, if your first take profit hits and sells 50% of your short position, but the trade does not continue downwards and moves up to your second stop loss, the remaining 50% of your position will be calculated as sold.
The same applies to SL3 and SL4, so at SL3 the remaining 30% of your position will be calculated as sold, and at SL4 the remaining 10% will be calculated as sold.
Your trailing stop loss placement is dependent on what types of trades you desire. For shorter scalps on smaller timeframes, it's recommended to place each stop loss just above each corresponding take profit for short trades.
This way you leave just enough room for the trade to continue downwards if there is enough momentum, but you don’t open yourself up to losing your unrealized profit if it does not make this continuation.
If you desire longer swing trades on higher timeframes, it might be a good idea to leave more room in between the take profit and corresponding stop loss.
This way you leave more room for the trade to mature and move in your favor since when trading longer moves, often they will not shoot straight down but rather have a series of small bounces throughout the more general downwards trend.
Note that when a short trade is first entered the only stop loss and take profit in play are your original stop loss found by the pivot high which would result in a loss, and the first take profit at a 1:1 risk to reward ratio from that pivot high.
Summary of Take Profit/Stop Loss Placement:
Correctly placed take profits and stop losses are essential in having a successful strategy and proper risk management. With that being said there are also many ways in which to use this system. Deciding how to set them up is really just a matter of determining the trading style you aim to succeed with. Once this has been determined, the placement of take profits and stop losses should be easier to configure. However, if there is any confusion on either of these topics as the ratios and corresponding TP/SL can get confusing, please do not hesitate to ask further questions in our discord!
Leverage Long
Leverage Long input simply defines the leverage used in your long positions, and is used in calculating the profit in Strategy Tracker
A rundown of risk associated with using leverage will not be given here since it should assume that if you're using leverage, you should already understand the risks.
If you are not using any leverage, then set Leverage Long input to 1.
Long Position Size
This input defines the position size you are using in your long trades.
This input is also used in calculating profit in Strategy Tracker.
Long Hedge Position Size
This input is used to define the position size of long hedge positions.
This input is also used in calculating profit in Strategy Tracker.
Important: Your Long Hedge Position Size should always be half of your Long Position Size for accurate profit calculation.
Double Long Position Size
This input is used to define the position size when in a double long.
This input is also used in calculating profit in Strategy Tracker
Important: Your Double Long Position Size should always be double your Long Position Size for accurate profit calculation.
Short Position Size
This input defines the position size you are using in your short trades.
This input is also used in calculating profit in Strategy Tracker.
Short Hedge Position Size
This input is used to define the position size of short hedge positions.
This input is also used in calculating profit in Strategy Tracker.
Important: Your Short Hedge Position Size should always be half of your Short Position Size for accurate profit calculation.
Double Short Position Size
This input is used to define the position size when in a double short.
This input is also used in calculating profit in Strategy Tracker
Important: Your Double Short Position Size should always be double your Short Position Size for accurate profit calculation.
A Message From the Developer PLEASE READ!!!
If you have made it this far in the guide, I applaud you and thank you for sticking with it as I know there is a lot of information here! This is not an exaggeration when I say there are hundreds of millions of possible variations that could be applied throughout all the inputs which is why I much prefer to call this a tool rather than an algorithm. Algorithm is a loaded word in my opinion as it comes with an implication of guarantee in the trades being made. This is not meant to discourage anybody from taking trades based off the tool which is also why I provided the option for automated alerts which through third party software can turn into automated trades; if you have the confidence in your strategy by all means I encourage you to trade it, automated or not. Just please understand that it's highly recommended to also apply your own knowledge and analysis before taking a trade as historical back testing data has its limitations and cannot always account for current market conditions. The real applicability does not fall in what the back tester window is saying you would have made or how accurate your strategy would have been, it's within the sheer number of markets and scenarios this tool can be used in and the information you can get which a human just can’t comprehend all at once; its literally endless. I urge all of you to be creative and think outside the box about what you can do with such a powerful tool at your fingertips. After all this is the reason why so many inputs were provided. Another main goal of this project was to give users a better understanding of risk management. It can be hard to manage your risk when it’s all kept in your head, but when you can modify your strategy to better manage your risk by simply optimizing a few inputs, it’s a lot easier to comprehend and actually apply when trading. The last thing I want to say is have fun working through the possible learning curve in using this tool, it may be a process but enjoy it because the one thing I can guarantee is that you will come out the other side a better trader than before!