Spot Martingale KuCoin - The Quant ScienceINTRODUCTION
Backtesting software of the Spot Martingale algorithm offered by the KuCoin exchange.
This script replicates the logic used by the KuCoin bot and is useful for analyzing strategy on any cryptocurrency historical series.
It's not intended as an automatic trading algorithm and does not offer the possibility of automatic order execution.
The trader will use this software exclusively to research the best parameters with which to work on KuCoin.
LOGIC OF EXECUTION
The execution of orders is composed as follows:
1) Start Martingale: initial order
2) Martingale-Number: orders following Start Martingale
(A) The software is designed and developed to replicate trading without taking into account technical indicators or particular market conditions. The Initial Order (Start Martingale) will be executed immediately the close of the previous Martingale when the balance of market orders is zero. It will use the capital set in the Properties section for the initial order.
(B) After the first order, the software will open new orders as the price decreases. For orders following Start Martingale, the initial capital, multiplier, and number of orders in the exponential growth context are considered. The multiplier is the factor that determines the proportional increase in capital with each new order. The number of orders, indicates how many times the multiplier is applied to increase the investment.
Example
To find out the capital used in Martingale order number 5, with a Multiple For Position Increase equal to 2 and a starting capital of $100, the formula will be as follows:
Martingale Order = ($100 * (2 * 2 * 2 * 2 * 2)) = $100 * 32 = $3.200
(C) A multiplier is used for each new order that will increase the quantity purchased.
(D) All previously open orders are closed once the take profit is reached.
USER MANUAL
The user interface consists of two main sections:
1. Settings
Percentage Drop for Position Increase (0.1-15%) : percentage distance between Martingale orders. For example, if you set 5% each new order will be opened after a 5% price decrease from the previous one.
Max Position Increases (1-15) : number of Martingale orders to be executed after Start Martingale. For example, if you set 10, up to10 orders will be opened after Start Martingale.
Multiple For Position Increase (1-2x) : capital multiplier. For example, if you set 2 each for each new order, the capital involved will be doubled, order by order.
Take Profit Percentage (0.5-1000%) : percentage take profit, calculated on the average entry price.
2. Date Range Backtesting
The Date Range Backtesting section adjusts the analysis period. The user can easily adjust the UI parameters, and automatically the software will update the data.
LIMITATIONS OF THE MODEL
Although the Martingale model is widely used in position management, even this model has limitations and is subject to real risks during particular market conditions. Knowing these conditions will help you understand which asset is best to use the strategy on.
The main risks in adopting this automatic strategy are 2:
1) The price falls below our last order.
It happens during periods of strong bear-market in which the price collapses abruptly without experiencing any pullback. In this case the algorithm will enter a drawdown phase and the strategy will become a loser. The trader will then have to consider whether to wait for a price recovery or to incur a loss by manually closing the algorithm.
2) The price increases quickly.
It happens during periods of strong bull-market in which the price rises abruptly without experiencing any pullback. In this case the algorithm will not optimize order execution, working only with Start Martingale in the vast majority of trades. Given the exponential nature of the investment, the algorithm will in this case generate a profit that is always less than that of the reference market.
The best market conditions to use this strategy are characterized by high volatility such as correction phases during a bull run and/or markets that exhibit sideways price trends (such as areas of accumulation or congestion where price will generate many false signals).
FEATURES
This script was developed by including features to optimize the user experience.
Includes a dashboard at launch that allows the user to intuitively enter backtesting parameters.
Includes graphical indicator that helps the user analyze the behavior of the strategy.
Includes a date period backtesting feature that allows the user to adjust and choose custom historical periods.
DISCLAIMER
This script was released using parameters researched solely for the BTC/USDT pair, 4H timeframe, traded on the KuCoin Exchange (2017-present). Do not consider this combination of parameters as universal and usable on all assets and timeframes.
Martingale
Rudy's BB with MartingaleMy first strategy script that uses Bollinger Bands and Martingale to increase contract size after negative profit.
Loft Strategy V4This strategy is an advanced version of the Loft Strategy V1, I shared earlier. (Loft Strategy V1 consists of a kalman filter (by alexgrover ) and a "stop and reverse" line which is following and the kalman filter. If the price goes in the same direction as the position side, the "stop and reverse" line approaches the kalman filter as set on the "Approach Decrease Step" parameter.)
In addition to the previous version, it includes a martingale like deviation and multiple take-profit.
Here it is some parameters definitions of the strategy:
Kalman Filter: The higher this parameter, the faster and more aggressive the filter. Otherwise the filter goes very smoothly
Beginning Approach: First approximation as a percentage of stop-n-reverse line
Final Approach: Minimum approximation of stop-n-reverse line
Approach Decrease Step: If the price moves in the same direction as the strategy, the approach percentage is reduced by this parameter. Otherwise nothing do
Base Order Quantity: Initial capital of position
Max Safe Order Attempt: This parameter determines the maximum number of times the strategy will raise the bet after losing in a row.
Safe Order Deviation: if the last trade is loss, multiply the bet by this parameter (aka. martingale factor)
Profit Deviation: if last trade in loss, multiply the take-profit points
Max Order Quantity: Maximum capital allowed for a position
TP1, TP2, TP3 : Take profit spots in percentage
QT1, QT2, QT3: Amount of take-profit spots
Stop Loss: Maximum stop loss allowed for a trade
Long Entry, Short Entry: Only long side, only short side or both side
Safe Stop After TP2: If the price reaches the TP2 point, move the stop-loss point to the entry price.
Safe Stop After TP1: If the price reaches TP1, move the stop-loss point to the stop-n-reverse line.
Flip a CoinHave you ever wanted a strategy that is completely random? Well here's the Flip-a-Coin strategy that has entirely random and unpredictable trades! With the randomiser to make it a truly unique strategy to you, and the ability to add martingale logic to the risk means you could either be making millions or losing it all in no time! Please do not trade with this! At best it is a good baseline for testing if your own strategy is better or worse than literally flipping a coin. Enjoy!
QaSH DCA DaytraderThis script takes advantage of the power of DCA implemented in the QaSH DCA Algorithm script, and it applies it to new entry conditions. A "Quickfingers Luc" mode has been added, which creates new entry orders whenever a level of support has been identified. If price breaks the support level and quickly drops down, the orders will already be in place to catch the dip. This method can even catch the 1-second long, 50% flash dips that occur in some exchanges.
Four entry conditions are included in this initial release : ASAP, Quickfingers Luc, Bullish Pivot point, and Bearish Pivot point
All order placements are customizable
All take profit % values are based on the average entry price
Take profit % values can change based on how big the price dip was
Entry condition filter has been added and it uses a variable timeframe EMA
Stoploss function is available
Order size can be sent in the alerts, which allows for multiple setups to be running simultaneously in one account
All alerts are sent using the new "Any alert() function call" feature, which means this indicator will only take up one alert slot to cover all entry and exit alerts
Settings advice:
- If you think price is inflated, try conservative settings that either use a stoploss and EMA filter, or no stoploss but have some of your orders placed far below the current price with increasing volume. In a bear market this will beat the buy and hold.
- If you think the market is ready for a new bull run, then try experimenting with very aggressive settings to beat the buy and hold. For example: ASAP mode with 3 layers turned on. Orders placed at 0.5%, 3%, and 5%. Volumes at 30%, 30%, and 40% respectively. No stoploss. These settings were tested on ETH and beat the buy and hold during an extreme bull market period.
QaSH DCA Algorithm 2.0This is the strategy version of the QaSH DCA Algorithm indicator. This strategy version of the script includes live trading alert functionality, so it can be considered as a replacement that makes the indicator version obsolete. With this version, features have been added and also you can take advantage of TradingView's native backtesting system for more detailed backtest results.
QaSH DCA Algorithm implements a DCA strategy that takes advantage of price volatility by buying dips to average down, and adjusting price targets as the break-even price gets lower.
How does the DCA strategy work?
When the specified entry condition has occurred, the indicator will set up several limit orders below the current price. If price goes up a specified amount, then the layers will be overwritten at the higher prices. If price goes down and fills the first layer (limit order), then the Take Profit price is plotted and will be sent in an alert. If more layers are filled, then the TP price will move down accordingly as it’s based on the average entry price (alerts on each TP update). This action of lowering the average entry and TP price mitigates your risk, and increases the likelihood of a Take Profit event happening. This script uses a simple "ASAP" mode, where each deal will start exactly 2 bars after the last trade ended. An EMA filter and stoploss function was also added for risk management.
How does this differ from other DCA bots?
1) The layer placements, order volume , and “take profit %” for each layer or “safety order” is much more customizable than what you get from other services. For example, I can choose to have my TP% change, depending on how big the price dip was. Maybe on safety order 1 I want 10% TP, but on safety order 7 might want a 2% TP.
2) The entry condition is adjustable. For example, this script has an ema filter for entries.
3) Settings optimization. You can take advantage of the replay feature and TradingView's backtest system to see how trades would have played out, and how much PnL you would have made
4) You can use this indicator on more than just crypto. You can easily set up alerts for manual trades on stocks, or you can integrate it with your stock broker API of choice and automate your trades.
5) When combining this with an automation service, you will get unmatched execution speed by running it on your dedicated machine.
6) I can offer a lifetime subscription to the indicator upon request.
What kind of market is it best used on?
QaSH DCA Algorithm is best used on assets that are volatile. That means large and frequent swings up and down. Also I recommend running this on many uncorrelated assets at the same time. Better yet, run it with a variety of different settings simultaneously on the same asset.
What settings should I use?
The default settings are decent for most markets, and provide a good balance between profit potential and downside protection, although you can use a wide variety of settings. In a strong bull market its best to either bring up your layers to catch smaller dips, or you can go big on the first few layers (maybe 4 layers, 25% on each layer for example). In a sideways or brearish market you'll want more downside protection, so you'll want the larger orders to be at lower prices, or possibly use the stoploss and EMA filter.
Alferow_pnl_up_shortThis script allows you to determine the leverage required to enter one position based on the set entry price, the price of the expected take profit, stop loss and risk per transaction. It also allows you to schedule this transaction for 5 possible transactions, with different shoulders and a martingale coefficient for each subsequent gain at the same risk, allowing you to qualitatively improve the pnl of the transaction with price fluctuations after entering the transaction. The script is designed for short positions.
Alferow_pnl_up_longThis script allows you to determine the leverage required to enter one position based on the set entry price, the price of the expected take profit, stop loss and risk per transaction. It also allows you to schedule this transaction for 5 possible transactions, with different shoulders and a martingale coefficient for each subsequent gain at the same risk, allowing you to qualitatively improve the pnl of the transaction with price fluctuations after entering the transaction. The script is designed for long positions.
George MartinENG:
This script is based on a simple principle - MartinGale. Each subsequent entry, if the price goes in the wrong direction, increases the number of contracts taking into account the coefficient and also changes the entry price taking into account the coefficient. The coefficients can be configured so that the script keeps the drawdown up to 85%. For instructions and connection - write.
RUS:
Этот скрипт основан на простом принципе - Мартин Гейл. Каждый следующий вход если цена идет не в нужную сторону, увеличивает количество контрактов с учетом коэффициента и также меняется цена входа с учетом коэффициента. Коэффициенты можно настроить таким образом чтобы скрипт держал просадку до 85%. Для инструкций и подключения - пишите.
Martingale TemplateA template example on how to apply the famous Martingale gambling strategy. When your strategy gets an exit signal for your long position that leaves you without profit, you re-enter on the next entry long condition with double the capital of the previous amount entered with. You keep doubling the amount of capital entered with until you finally exit with a profit. If the strategy isn't sound enough then it could take several attempts and it can take only as much as a dozen tries to eat away at all your capital as the capital required to double on the next entry increases greatly over time by consecutive products of 2.
The strategy used is just a simple moving average crossover, above the moving average is going long, below the moving average is going short. It can be replaced with whatever strategy that you want. The colored vertical bars show long and short positions and exits. The default option on the tick box under the settings show the number of attempts at entering before finally exiting with a profit, the other option shows the amount of capital it took starting from 1.
Grid System With Fake MartingaleThe proposed strategy is based on a grid system with a money management that tries to replicate the effect of a martingale without having to double your position size after each loss, hence the name "fake martingale". Note that a balance using this strategy is still subject to exponential decay, the risk is not minimized, as such, it would be dangerous to use this strategy.
For more information on the martingale and grid systems see:
Strategy Settings
Point determines the "grid" size and should be adjusted accordingly to the scale of the security you are applying the strategy to. Higher value would require larger price movements in order to trigger a trade, generating fewer trades as a result.
The order size determines the number of contracts/shares to purchase.
The martingale multiplier determines the factor by which the position size is multiplied after a loss, using values higher to 2 will "squarify" your balance, while a value of 1 would use a constant position sizing.
Finally, the anti-martingale parameter determines whether the strategy uses a reverse martingale or not, if set to true then the position size is multiplied after each win.
How It Works
Let's illustrate how we replicate a martingale without doubling our exposure with a simple casino example. Imagine you are playing roulette, and that you are betting on colors (black/red), your payout is 1 to 1, in the case you win, you will have your initial stake back plus a profit equal to your initial stake.
If your strategy is to recover any previous losses, you can double your stake each time you lose, once you win you will get back the previous losses plus a profit equal to your original stake, this is the martingale system. So how can we win back previous losses without having to double our stake? We could do that by doubling the payout ratio after a loss, so after a loss, we must use a payout ratio of 2:1, if we lose once again we must use a payout of 4:1...etc, our payout ratio would be subject to exponential growth instead of our stake.
Of course, the payout ratio is fixed with casino games, but in trading, we can manipulate the position of our take profit in order to replicate such effect, this is what this strategy is doing. So after a loss, we place our take profit such that a win recover our losses back plus generate a profit.
Advantages
The advantage of this approach is that unlike the martingale we don't double our position size, which instead can remain constant, this is a huge advantage as a martingale will require a significant capital in order to tank a series of losses.
Disadvantages
The main disadvantage of this method is that the price might never reach our take profit after a long losing streak, our balance would remain in the red and we couldn't do anything about it except reset the strategy.
Frictional costs are still a disadvantage, as such, we would need to place our take profits in order to account for them, while this is still better than purchasing additional shares, it minimizes the chances of the price reaching the take profit.
Conclusions
An alternative money management system replicating the effect of a martingale as been presented, we can see that such a system is far from being perfect, and it would be foolish to use it, however, it stills offer a convenient alternative to less aggressive progressive position sizing systems.
I have been receiving some messages from users criticizing me for exposing the martingale money management system, and I understand why but I can't agree, talking about it allow me to warn users against it, the grid-martingale methodology is will create more harm than anything else, the reward is only one side of the story and should always be compared against the risk, so always take a look at all the statics in a backtest.
Thanks for reading!
Shout-Out
This post was made possible thanks to my patrons:
@Happymono, @AmariMars, @kkhaial, @Nugehe, @LucF, @Nosmok, @iflostio, @DankBeans, @ecletv, @Neverstorm, @alex.crown.jr, @uk503, @xkingshotss, @vsov, @jbelka, @yatrader2, @hughza, @ganh
Grid Like StrategyIt is possible to use progressive position sizing in order to recover from past losses, a well-known position sizing system being the "martingale", which consists of doubling your position size after a loss, this allows you to recover any previous losses in a losing streak + winning an extra. This system has seen a lot of attention from the trading community (mostly from beginners), and many strategies have been designed around the martingale, one of them being "grid trading strategies".
While such strategies often shows promising results on paper, they are often subjects to many frictions during live trading that makes them totally unusable and dangerous to the trader. The motivations behind posting such a strategy isn't to glorify such systems, but rather to present the problems behind them, many users come to me with their ideas and glorious ways to make money, sometimes they present strategies using the martingale, and it is important to present the flaws of this methodology rather than blindly saying "you shouldn't use it".
Strategy Settings
Point determines the "grid" size and should be adjusted accordingly to the scale of the symbol you are applying the strategy to. Higher value would require larger price movements in order to trigger a trade, as such higher values will generate fewer trades.
The order size determines the number of contracts/shares to purchase.
The martingale multiplier determines the factor by which the position size is multiplied after a loss, using values higher to 2 will "squarify" your balance, while a value of 1 would use a constant position sizing.
Finally, the anti-martingale parameter determines whether the strategy uses a reverse martingale or not, if set to true then the position size is multiplied after any wins.
The Grid
Grid strategies are commons and do not present huge problems until we use certain position sizing methods such as the martingale. A martingale is extremely sensitive to any kind of friction (frictional costs, slippage...etc), the grid strategy aims to provide a stable and simple environment where a martingale might possibly behave well.
The goal of a simple grid strategy is to go long once the price crossover a certain level, a take profit is set at the level above the current one and stop loss is placed at the level below the current one, in a winning scenario the price reach the take profit, the position is closed and a new one is opened with the same setup. In a losing scenario, the price reaches the stop loss level, the position is closed and a short one is opened, the take profit is set at the level below the current one, and a stop loss is set at the level above the current one. Note that all levels are equally spaced.
It follows from this strategy that wins and losses should be constant over time, as such our balance would evolve in a linear fashion. This is a great setup for a martingale, as we are theoretically assured to recover all the looses in a losing streak.
Martingale - Exponential Decays - Risk/Reward
By using a martingale we double our position size (exposure) each time we lose a trade, if we look at our balance when using a martingale we see significant drawdowns, with our balance peaking down significantly. The martingale sequence is subject to exponential growth, as such using a martingale makes our balance exposed to exponential decays, that's really bad, we could basically lose all the initially invested capital in a short amount of time, it follows from this that the theoretical success of a martingale is determined by what is the maximum losing streak you can endure
Now consider how a martingale affects our risk-reward ratio, assuming unity position sizing our martingale sequence can be described by 2^(x-1) , using this formula we would get the amount of shares/contracts we need to purchase at the x trade of a losing streak, we would need to purchase 256 contracts in order to recover from a losing streak of size 9, this is enormous when you take into account that your wins are way smaller, the risk-reward ratio is totally unfair.
Of course, some users might think that a losing streak of size 9 is pretty unlikely, if the probability of winning and losing are both equal to 0.5, then the probability of 9 consecutive losses is equal to 0.5^9 , there are approximately 0.2% of chance of having such large losing streak, note however that under a ranging market such case scenario could happen, but we will see later that the length of a losing streak is not the only problem.
Other Problems
Having a capital large enough to tank 9any number of consecutive losses is not the only thing one should focus on, as we have to take into account market prices and trading dynamics, that's where the ugly part start.
Our first problem is frictional costs, one example being the spread, but this is a common problem for any strategy, however here a martingale is extra sensitive to it, if the strategy does not account for it then we will still double our positions costs but we might not recover all the losses of a losing streak, instead we would be recovering only a proportion of it, under such scenario you would be certain to lose over time.
Another problem are gaps, market price might open under a stop-loss without triggering it, and this is a big no-no.
Equity of the strategy on AMD, in a desired scenario the equity at the second arrow should have been at a higher position than the equity at the first arrow.
In order for the strategy to be more effective, we would need to trade a market that does not close, such as the cryptocurrency market. Finally, we might be affected by slippage, altho only extreme values might drastically affect our balance.
The Anti Martingale
The strategy lets you use an anti-martingale, which double the position size after a win instead of a loss, the goal here is not to recover from a losing strike but instead to profit from a potential winning streak.
Here we are exposing your balance to exponential gross but you might also lose a trade at the end a winning streak, you will generally want to reinitialize your position size after a few wins instead of waiting for the end of a streak.
Alternative
You can use other-kind of progressions for position sizing, such as a linear one, increasing your position size by a constant number each time you lose. More gentle progressions will recover a proportion of your losses in a losing streak.
You can also simulate the effect of a martingale without doubling your position size by doubling your target profit, if for example you have a 10$ profit-target/stop-loss and lose a trade, you can use a 20$ profit target to recover from the lost trade + gain a profit of 10$. While this approach does not introduce exponential decay in your balance, you are betting on the market reaching your take profits, considering the fact that you are doubling their size you are expecting market volatility to increase drastically over time, as such this approach would not be extremely effective for high losing streak.
Conclusion
You will see a lot of auto-trading strategies that are based on a grid approach, they might even use a martingale. While the backtests will look appealing, you should think twice before using such kind of strategy, remember that frictional costs will be a huge challenge for the strategy, and that it assumes that the trader has an important initial capital. We have also seen that the risk/reward ratio is theoretically the worst you can have on a strategy, having a low reward and a high risk. This does not mean that progressive position sizing is bad, but it should not be pushed to the extreme.
It is nice to note that the martingale is originally a betting system designed for casino games, which unlike trading are not subject to frictional costs, but even casino players don't use it, so why would you?
Thx for reading
MMP Indicator 4-step WeeklyFading levels using martingale (limit orders, rebate venue) with no stop-loss orders, long the wings at the end of Support and Resist levels from prior week Friday right before the close. Re-hedge the order book units when there is a breakout.
inwCoin Martingale Strategy ( for Bitcoin )** Same as my previous martingale script but this version = opensource **
inwCoin Martingale Strategy is the proof of concept strategy that in the end, anyone who using martingale strategy will kaboom their portfolio.
For those who don't know what is "martingale".. it's a simple double down strategy in the hope to cover the loss in previous entry.
Example
In the game that if you win, you'll get 100% of your bet money back.
1st loss = 1$
2nd loss = bet 2$ : if win, get 2$ / real profit = 1$ ( 2-1 )
3rd loss = bet 4$ : if win, get 4$ / real profit = 1$ ( 4 - ( 2+1) )
4th loss = bet 8$ : if win, get 8$ / real profit = 1$ ( 8 - ( 4+2+1 ) )
...
...
10th loss = bet 512$ : if win, get 512$ / real profit = 1$ ( 512 - ( 256+128+64+32+16+8+4+2+1) )
as you can see, the next bet will be first bet x 2^(n-1)
and the profit will equal to your first bet.
==================
In trading and forex EA ( Expert Advisor or bot ) people use this strategy to fool newbies that their martingale system will generate steady income for eternity.
But in reality, this strategy will destroy your whole portfolio eventually some time in the future. Because there will be some "Blackswan event" in market at some point in time. And one who ignore this fact, will lose everything.
But, if you using low risk strategy and generate some profit from your low-risk portfolio. You can take small chunk of that profit and put it in riskier strategy like this martingale, to accerelate your profit snowball.
===================
Parameter Explaination
====================
Price = datasource for indicator calculation
Fixed position size option = if uncheck, the "Start position size" parameter will be % of your initial capital. If checked, it will fixed position size ( like 1 BTC )
Start Position Logic = condition to enter first trade
- MACD singal > 0 : Self explanatory, default macd value
- Stochastic RSI cross up : enter when sto line cross up from bottom ( 20 )
- ATR channel : enter trade if price cross above 2.3 ATR
Take Profit Percent = take profit target % from average entry
Start martingale ..= if price compare to average position entry less than this %, it will start to double down ( martingale )
Martingale Multiplier = you can specific how big you'll double down, default is 2
Trade Direction = long only for now
Use date rang = self explanatory
** make sure to setup your initial capital in properties tab **
On chart
=======
White Line = Average position price
Orange Line = your current equity
If equity less than 0, it will close any remaining positions ( It's mean your position got liquidated )
If price > equity line for "take profit percent" it will close any remaining positions.
=======
As you can see, this strategy survive 2018 drop and pump profit to 1000+% ( Check in the strategy tester tab > list of trades )
But in May 2020 -50% drop in just 3 days, your whole portfolio got liquidated.
Actually, after some digging in profit and backtest result.
This strategy, when it can survive a shape drop, can generate a lot of profit.
So, if you want to use martingale. Make sure to use only small chunk of your profit from "low-risk" strategy to accelerate your profit generation ( aka degen port )
DO NOT greedy and use all of your initial capital or borrowed money to use with this strategy!
inwCoin RSI + Martingale Strategy===================
English
===================
* inwCoin Simple Martingale Strategy ( Double down ) for educational purpose.
* Entry Condition : RSI cross Oversold Level up
* Martingale Condition
(1) RSI cross Oversold Level up again
(2) If Martingale > 6 times, it will martingale with time-base too, using "Martingale Timer" value ( the candles count )
* Take Profit Condition : When position has profit more than "Take Profit Percent"
----------
Desc.
----------
Position Size Percent = Start Position Size, less start size = more capital left for matingale if something went wrong
Take Profit Percent = If position has profit more than this value, it will close position
Martingale Gap Percent = Calculate the gap between each martingale level
Martingale Multiplier = Martingale position size multiplier
Martingale Timer = If we already did martingale more than 6 times, it will buy more if the candle count from last buy entry more than this value ( time-base martingale )
Leverage = not working
RSI setup = RSI setting, Oversold level is important because the script will do first buy entry when RSI crossover oversold level.
-----------
Conclusion
------------
* People using Martingale a lot esp. in Forex EA/bot. Because if we "lucky" we'll get good profit every single day.
* But... if we unlucky and price keep going the other way, we'll have to double down like crazy and your portfolilo will get liquidated in no time...
* This is very risky strategy and I learned it the hard way...
===================
Thai
===================
ทำ strategy martingale มาเล่นๆ ลองวิชาขำๆ
ขี้เกียจแปลไทยแล้ว อ่านอังกฤษข้างบนเอาเอง 5555
Bilateral Stochastic Oscillator StrategyIntroduction
Strategy based on the bilateral stochastic oscillator, this oscillator aim to detect trends and possible reversal points of the current trend. The oscillator is composed of 1 bull line in blue and 1 bear line in red as well as a signal line in orange, the strategy have many options such as two different strategy framework and a martingale mode. If you require more information about the indicator go check it into my uploaded indicators.
Strategy Frameworks
There are two frameworks available that can be selected from the strategy settings window. Both have the same closing conditions, the "Bull/Bear Cross" entry conditions are :
Buy : when the bull line cross over the bear line
Sell : when the bear line cross over the bull line
The "Signal Cross" entry conditions are :
Buy : when the bull line cross over the signal line
Sell : when the bear line cross over the signal line
Both have the same close conditions that is : close when bull/bear cross under the signal line.
Introduction To Martingale
The martingale money management system consist to double the order size after a loosing trade and can be described as a 2^x where x is the current number of loosing trades since the last win trade, when we win a trade the order size return to the default order size. Therefore our order size function is based on exponential growth.
This system enable the trader to win back his previous losses plus a potential profit, martingales must always be used with stops and sometimes take profits in order to get control in a strategy.
It must always be taken into account that in a series of losses the balance can exponentially decay thus ending to 0 in a matter of trades, this is why it is not recommended to use such system. The strategy allow you to select a martingale multiplier that can be inferior to 2 thus limiting risks, a multiplied of 1 disable the martingale.
Results
Those are the some statistics of the strategy applied to some forex majors by using the default settings in a time frames of 15 minutes.
//-------------------------------------------------------
EURUSD - Order Size 1000 - Spread 0.0002
Profit : $ 21.08
Trades : 19
PP : 57.89 %
Profit Factor : 3.228
Max Drawdown : -$ 3.81
Average Trade : $ 1.11
//-------------------------------------------------------
GBPUSD - Order Size 1000 - Spread 0.0002
Profit : $ 2.31
Trades : 20
PP : 55 %
Profit Factor : 0.938
Max Drawdown : -$ 20.29
Average Trade : $ 0.12
//-------------------------------------------------------
EURAUD - Order Size 1000 - Spread 0.0002
Profit : -$ 9.22
Trades : 20
PP : 40 %
Profit Factor : 0.698
Max Drawdown : -$ 23.44
Average Trade : $ 0.46
//-------------------------------------------------------
EURCHF - Order Size 1000 - Spread 0.0002
Profit : $ 1.58
Trades : 24
PP : 54.17 %
Profit Factor : 1.103
Max Drawdown : -$ 7.23
Average Trade : $ 0.07
//-------------------------------------------------------
Conclusions
Based on the results the strategy does not posses the sufficient performance in order to apply a martingale or any other growth systems as order size. Parameters might be subject to drastic changes depending on the market/time-frame in order to return long-term positive results. I let you draw your conclusions.
SMA Stochastic ForecastThis tool uses a discrete-time non-Markovian Martingale stochastic process (Please do not confuse with the strategy of the same name) under the hood to forecast a future (up to 28 bars, customizable) behaviour of the Simple Moving Average. The longer the average period, the more accurate the forecast.
The common cases are the next:
You can apply two instances of this indicator to your chart to obtain a crossover forecast
You can decrease an interval between forecasts to obtain a bunch of possible traectories
Decreasing a forecast interval for two instances, you will get the Kraken
This is the further improvement of my research work on forecasting
Mr. @syrinxflunki was the only one who provided a clear and useful feedback after testing, so he get a free lifetime access. I respect a fair play.
If you have any questions you can concat me via private messages.
Good luck.
Decent Martingale Strategy [Pinescript v3]In my experimentation to add some sort of hedging to trades, I stumbled on the Martingale roulette betting strategy.
If it works in the casino, why not here?
The principle is simple:
If you lose a trade, immediately go the opposite direction and double your bet.
In this case, we're just applying a multiplier.
The strategy is a simple EMA crossover - defaulted to my favorite periods 8 and 62.
Enjoy :) I'll make a new one that's contained in a function, so you can simply implement it in your own strategy and have it monitor winning/losing trades automatically.
Cheers,
DasanC
[RS]Function Martingale Multiplier - MA Crossover Bias V1EXPERIMENTAL:
WARNING: Martingale is subject to HUGE drawdown spikes, use at your own risk!
updated function to also double(aply multiplier) on even trades, example with a MA's crossover.
[RS]Function Martingale Multiplier V0EXPERIMENTAL:
WARNING:Martingale is susceptible to huge drawdown spikes, use at your own risk.
simple functions for martingale wins and losses, multiplier can be adjusted manually to increase/decrease performance/drawdown.
[STRATEGY][RS]Roulette Martingale V0a solid strategy all across the majors.
double the profits :p
WARNING: use at your own discretion.