INVITE-ONLY SCRIPT

Strategy Developer Tool

Обновлено
Solar 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 HHIT, (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!
Информация о релизе
- Updated TP labels
- TP label on 2x short bug fix
- Added groupings for inputs
- Removed on/off for TP & SL
- Added length inputs for indicator 1
- Updated default inputs
Portfolio managementstatisticsTrend Analysis

Скрипт с ограниченным доступом

Доступ к этому скрипту разрешён только для пользователей, авторизованных автором, и для этого обычно требуется оплата. Вы можете добавить скрипт в список избранных, но использовать его можно будет только после запроса на доступ и получения разрешения от автора. Свяжитесь с SolarStrategies, чтобы узнать больше, или следуйте инструкциям автора ниже.

TradingView не советует платить за скрипт и использовать его, если вы на 100% не доверяете его автору и не понимаете, как он работает. Часто вы можете найти хорошую альтернативу с открытым исходным кодом бесплатно в нашем разделе Скрипты сообщества.

Инструкции от автора

Please use this tool wisely, only after reading and fully understanding the guide provided in the description. We are currently in a trial phase in which paid access in not required. Understand that this tool does not provide financial advise.

Хотите использовать этот скрипт на графике?

Внимание: прочтите это перед тем, как запросить доступ.

Мои профили:

Отказ от ответственности