TPS - FX TradeI based my strategy on the Lagging Span 2 line in the Ichimoku Cloud. I actually designed the strategy for the DAX Germany index 3 Minutes period, but you can use it on any instrument you want. I would like to point out some points that you should pay attention to when optimizing the strategy for the instrument you want to use.
Position Take Profit and Stop Loss levels are tick calculations. These values will differ for each instrument. If you are trading in Forex, the values you will write here should be starting from the numbers after the comma in the instrument value. For example, if you want to take profit at "200" points in DAX, you must write "20000" in the Long or Short Take Profit Score field, this applies to the Stop Loss Points, but if you want to take profit or stop loss at 200 points in UKOIL, you must write "200" in the entry part.
Indicators and strategies
SIMPLE CANDLESTICK PATTERN ALGO BACKTESTING - TESLA 4HMany traders spend a lot of time to create algorithms full of unrealistic and far from reality indicators and market conditions. With this script I want to help traders understand the advantage of the Pine language. Using indicators with no statistical foundation and creating algorithms with technical indicators and thousands of conditions is not always the right way to create an efficient tool.
With this script that we have called "SimpleBarPattern_LongOnly" we analyse the market through a simple condition, using bars or candles.
How it works
The condition is constructed as follows. You go long with 100% of the established capital and 0.03% commission. The first condition is that the minimum of the period under analysis falls below the opening level. The second condition is that the low of the period is below the low of the previous period. The third condition is that the close of the period is above the opening level. The final condition wants the current close to be higher than the previous open and higher than the previous close. We used a statistical approach in the creation of this script, some candlestick patterns that reflect these conditions are: Bullish Engulfing, Bullish Hammer and Morning Star .
This strategy aims to help traders make more accurate decisions while using candlesticks for their trading and scientifically demonstrates that candlesticks are valid statistical tools for financial analysis.
"SimpleBarPattern_LongOnly" is a very lightweight script created with Pine v5. We developed a user interface that can adjust the analysis period from a few days to several years.
The initial capital set is €1,000 (You can change this from the "Properties" section of the user interface).
Each individual trade uses 100% of the set capital, in this case €1,000.
The default commission per trade is 0.03% (You can change this in the "Properties" section of the user interface).
User Interface
1) General backtest time settings: Set the history period to be analysed
StartDate: backtest start date
StartMonth: backtest start month
StartYear: backtest start year
EndDate: backtest end day
EndMonth: backtest end month
EndYear: backtest end year
3) Stop Loss
4) Take Profit
Please do not hesitate to contact us for any questions or information.
Disclaimer
Be careful, the past is not a guarantee of future performance, so remember to use the script as a pure analysis tool. The developer takes no responsibility for any use other than research and analysis and can in no way be held liable for damages resulting from wrong use of this code.
EDMA Scalping Strategy (Exponentially Deviating Moving Average)This strategy uses crossover of Exponentially Deviating Moving Average (MZ EDMA ) along with Exponential Moving Average for trades entry/exits. Exponentially Deviating Moving Average (MZ EDMA ) is derived from Exponential Moving Average to predict better exit in top reversal case.
EDMA Philosophy
EDMA is calculated in following steps:
In first step, Exponentially expanding moving line is calculated with same code as of EMA but with different smoothness (1 instead of 2).
In 2nd step, Exponentially contracting moving line is calculated using 1st calculated line as source input and also using same code as of EMA but with different smoothness (1 instead of 2).
In 3rd step, Hull Moving Average with 2/3 of EDMA length is calculated using final line as source input. This final HMA will be equal to Exponentially Deviating Moving Average.
EDMA Defaults
Currently default EDMA and EMA length is set to 20 period which I've found better for higher timeframes but this can be adjusted according to user's timeframe. I would soon add Multi Timeframe option in script too. Chikou filter's period is set to 25.
Additional Features
EMA Band: EMA band is shown on chart to better visualize EMA cross with EDMA .
Dynamic Coloring: Chikou Filter library is used for derivation of dynamic coloring of EDMA and its band.
Trade Confirmation with Chikou Filter: Trend filteration from Chikou filter library is used as an option to enhance trades signals accuracy.
Strategy Default Test Settings
For backtesting purpose, following settings are used:
Initial capital=10000 USD
Default quantity value = 5 % of total capital
Commission value = 0.1 %
Pyramiding isn't included.
Backtesting data never assures that the same results would occur in future and also above settings use very less of total portfolio for trades, which in a way results less maximum drawdown along with less total profit on initial capital too. For example, increasing default quantity value will definity increase maximum drawdown value. The other way is also to use fix contracts in backtesting but it all depends on users general practice. Best option is to explore backtesting results with manually modified settings on different charts, before trusting them for other uses in future.
Usage and In-Detail Backtesting
This strategy has built-in option to enable trade confirmations with Chikou filter which will reduce the total number of trades increasing profit factor.
Symmetrically Weighted Moving Average (SWMA) on input source, may risk repainting in real-time data. Better option is to run a trade on bar close or simply left this optin unchecked.
I've set Chikou filter unchecked to increase number of trades (greater than 100) on higher timeframe (12H) and this can be changed according to your precision requirement and timeframe.
Timeframes lower than 4H usually have more noise. So its better to use higher EDMA and EMA length on lower timeframes which will decrease total number of offsetting trades increasing average total number of bars within a single trade.
Original "Exponentially Deviating Moving Average (MZ EDMA )" Indicator can be found here.
Trend Follower Strategy v2 [divonn1994]The Trend Follower Strategy that I made classifies red and green candles into tiny, small, and big sizes and will send buy or sell signals depending on if the candle is classified as "big" so you get into and out of a position when there is a big candle. Out during a big green candle to take profit. Out during a big red candle in case the market is turning down. It also won't enter a position unless there is positive EMA momentum.
For the chart there is a Buy and a Sell signal. Buy = 1, Sell = 0, and when the value crosses above or below 0.5 it will trigger a long position or close the long position. The graph isn't necessary to the strategy, but can help with visualizing the trade patterns in the past if you like.
This strategy works best so far with these coins at time of posting (March 4th, 2022):
KCSUSDT (621x profit), HTUSDT (45x profit), LUNAUSDT (45x profit), BNBBTC (1553x profit), ETHBTC (219x profit), KCSBTC (1222x profit), LUNABTC (83x profit), FTMBTC (52x profit).
It can work with other pairings, but I personally like these pairings best. I didn't test it with coins outside of the top 100 coins by market cap. Use it however you want.
Works best on 1 Day charts.
The strategy would rather be in the market than out. It gets out when it see's a red flag, but can immediately go back in in the next bar if the red flags are all gone. So it makes a lot of trades.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Update: This is the same strategy I uploaded before but I made the code Open for anyone to check it out and so it has a similar description as the previous version. Let me know what you think. I'd remove the old version if I could, but I guess it's site policy to not be able to remove scripts that have been uploaded.
Overnight Gap AnalysisThere is a wide range of opinion on holding positions overnight due to gap risk. So, out of curiosity, I coded this analysis as a strategy to see what the result of only holding a position overnight on an asset would be. The results really surprised me. The script backtests 10+ years, and here are the findings:
Holding a position for 1 hour bar overnight on QQQ since January 2010 results in a 545% return. QQQ's entire return holding through the same period is 643%
The max equity drawdown on holding that position overnight is lower then the buy/hold drawdown on the underlying asset.
It doesn't matter if the last bar of the day is green or red, the results are similar.
It doesn't matter if it is a bull or bear market. Filtering the script to only trade when the price is above the 200-day moving average actually reduces its return from 545% to 301%, though it does also reduce drawdown.
I see similar patterns when applying the script to other index ETFs. Applying it to leveraged index ETFs can end up beating buy/hold of the underlying index.
Since this script holds through the 1st bar of the day, this could also speak to a day-opening price pattern
The default inputs are for the script to be applied to 1 hour charts only that have 7 bars on the chart per day. You can apply it to other chart types, but must follow the instructions below for it to work properly.
What the script is doing :
This script is buying the close of the last bar of the day and closing the trade at the close of the next bar. So, all trades are being held for 1 bar. By default, the script is setup for use on a 1hr chart that has 7 bars per day. If you try to apply it to a different timeframe, you will need to adjust the count of the last bar of the day with the script input. I.e. There are 7 bars per day on an hour chart on US Stocks/ETFs, so the input is set to 7 by default.
Other ways this script can be used :
This script can also test the result of holding a position over any 1 bar in the day using that same input. For instance, on an hour chart you can input 6 on the script input, and it will model buying the close of the 6th bar of the day while selling on the close of the next bar. I used this out of curiosity to model what only holding the last bar of the day would result in. On average, you lose money on the last bar every day.
The irony here is that the root cause of this last bar of the day losing may be people selling their positions at the end of day so that they aren't exposed to overnight gap risk.
Disclaimer: This is not financial advice. Open-source scripts I publish in the community are largely meant to spark ideas that can be used as building blocks for part of a more robust trade management strategy. If you would like to implement a version of any script, I would recommend making significant additions/modifications to the strategy & risk management functions. If you don’t know how to program in Pine, then hire a Pine-coder. We can help!
DayTradingFutures Cross-StrategyOVERVIEW
This indicator was designed to help beginners use a cross over strategy that can be used for entries, exits and to for trend direction.
█ COMPONENTS
Here is a brief overview of the indicator:
Weighted Moving Averages
I find that by using a weighted moving average ( WMA ) to show a crossover, is very close to using a MACD signal line cross or using a RSI signal crossing over the 50/Mid Line. In my main strategy, I use the 5period (fast) and with the crossing of the 20period (slow) WMA for entries and the 50period WMA to show the short term trend. Please note, that I use the 50 period for day trading, if you are using a swing trade or plan on holding positions long term, a higher period may be preferred . All of the moving averages are customizable by color, length, and timeframe. **I feel comfortable trading this strategy at the 5min,10min, and 15min charts.
1 — 5 WMA- this is the white moving average closest to price and is the first part of our small cloud.
2 — 20 WMA - this is the yellow moving average and is the second part of or small cloud.
3 — 50 WMA - this is the directional trend.
Moving Average Clouds
The cloud (which is optional) appears when the trader should be looking to go Long or Sell Short. The dividing line is when both the 5 and 20 periods are over the 50 period.
Trade Management
This is a tool to help with setting your stop loss, break even, and target levels. Currently you can set these based on the current ATR ( Average True Range ).
The “Buy” and “Sell” signals are the ATR indicator based on your risk tolerance (fully customizable). Different ticker symbols will require different ATR values, please back test! When applying your stop loss, drag the stop line to small arrow of the signal callout.
Trading Session
The indicator was designed for beginners to trade during the New York Session (08:30 – 16:00 CST). However, the indicator will ONLY show signals AFTER opening and BEFORE close (09:00 – 14:30 CST). The reason for this is that there is greater volatility during the open and I do not recommend to be in a trade at the end of the session.
Buy and Sell Alerts
Alerts can also be set, when an entry can be made. This prevents a person from having to watch the charts for an extended period of time.
Faults of this strategy:
Time of RANGES/CONSOLIDATION periods and EXTREME VOLITITY KILLs this strategy!! Do not trade this strategy during these periods!!
Disclaimer:
NO strategy is 100% effective! I am not responsible for any loss trades or malfunctions of this code. I recommend to paper trade any new strategy before trading with real money! I am not a financial advisor, trading can be very risky!
Zlema Strateg Long 5mJust putting this out there.
I created this Strategy based on Everget Zlema.
Opens long trade when Zlema changes color.
It is profitable as it is, but just putting it out to the community to see if someone else has ideas to make it better.
How to make this strategy better?
1. FInd a way to filter ranging bad trades.
2. Trades would be more profitable if entry point had an entry on the candle the zlema changes color.
3. I had to put TP 5 limit, but the optimal would be when the zlema changes color back to red (if ranging trades can we filtered that is).
In any case, just putting it out there, hope it is useful for someone, and I am open to suggestions.
Follow the Crypto ShortsThis script allows to test the impact of variations in the number of BTCUSD Shorts Positions on its price. In particular, it compares the number of short positions with its moving average to decide if shorts are being liquidated. In case the number of short positions crosses below its moving average, it will generate a Long Position, which will be closed if shorts crosses above its moving average.
Mayer Multiple StrategyCreated by Trace Mayer, the Mayer Multiple is calculated dividing the current price of Bitcoin by its 200-day moving average. This simple script allows to backtest strategies based on Mayer Multiple levels, which can be easily adjusted. It can be tested on any chart and any timeframe.
Co-relation and St-deviation Strategy - BNB/USDT 15minThis indicator based on statistical analysis. it uses standard deviation and its co-relation to price action to generate signals. and following indicators has been used to calculate standard deviation and its co-relation values. finally it is capable to identify market changes in bottoms to pic most suitable points.
1. Parabolic SAR (parabolic stop and reverse)
2. Supertrend
3. Relative strength index (RSI)
4. Money flow index (MFI)
5. Balance of Power
6. Chande Momentum Oscillator
7. Center of Gravity (COG)
8. Directional Movement Index (DMI)
9. Stochastic
10. Symmetrically weighted moving average with fixed length
11. True strength index (TSI)
12. Williams %R
13. Accumulation/distribution index
14. Intraday Intensity Index
15. Negative Volume Index
16. Positive Volume Index
17. On Balance Volume
18. Price-Volume Trend
19. True range
20. Volume-weighted average price
21. Williams Accumulation/Distribution
22. Williams Variable Accumulation/Distribution
23. Simple Moving Average
24. Exponential Moving Average
25. CCI (commodity channel index)
26. Chop Zone
27. Ease of Movement
28. Detrended Price Oscillator
29. Advance Decline Line
30. Bull Bear Power
ddosok10 1min start(1볼추 매매법) 1분봉 볼밴 +3% 매매 체크 (유튜버 리또속10)
+거미줄 200틱마다 걸어놓기(익절+3 지정)
상단 볼밴 찍고 중앙선 터치 후
캔들 종가가 중앙선 아래에 있을때
숏 진입 후 하단 볼밴 터치할때쯤 익절(+3% 지정)
(허리에 들어가 무릎에 팔기)
하단 볼밴 찍고 중앙선 터치 후
캔들 종가가 중앙선 위에 있을때
롱 진입 후 상단 볼밴 터치할때쯤 익절(+3% 지정)
(허리에 들어가 가슴에 팔기)
* 포지션 동시 2개들어가서 하나 익절 하나 들고가기도 가능
BEAM DCA Strategy MonthlyThis strategy is based on BEAM bands for BTC. The space between the original BEAM bands is broken up into 10 bands representing levels of risk for investing fresh capital.
The strategy will buy bitcoin when the price is in the bottom 5 bands, increasing the amount investmented as the price approaches the 1400 D SMA.
The strategy will limit sell bitcoin when the price is in the top 5 bands, increasing the amount sold as the price approaches the upper BEAM band.
Best used on Daily timeframe and on a chart with history of price data, i.e. INDEX:BTCUSD or BITSTAMP:BTCUSD
To use the strategy:
Set start date
Set day of month to invest
Set the maximum amount to be invested on any given month
Toggle buy/sell orders
Observe the backtest
You can see how the strategy backtests via the information boxes in the bottom right.
There is also functionality to adjust the bands for diminishing returns. Note, this should be used with great skepticism, as the adjustments were made by simple function fitting and not rigorous statistical processes.
That about sums it up! As you can see, even with just a small amount of capital invested at regular intervals can lead to huge realised gains using this version of BEAM bands!
Combo 2/20 EMA & Adaptive Price Zone This is combo strategies for get a cumulative signal.
First strategy
This indicator plots 2/20 exponential moving average. For the Mov
Avg X 2/20 Indicator, the EMA bar will be painted when the Alert criteria is met.
Second strategy
The adaptive price zone (APZ) is a volatility-based technical indicator that helps investors
identify possible market turning points, which can be especially useful in a sideways-moving
market. It was created by technical analyst Lee Leibfarth in the article “Identify the
Turning Point: Trading With An Adaptive Price Zone,” which appeared in the September 2006 issue
of the journal Technical Analysis of Stocks and Commodities.
This indicator attempts to signal significant price movements by using a set of bands based on
short-term, double-smoothed exponential moving averages that lag only slightly behind price changes.
It can help short-term investors and day traders profit in volatile markets by signaling price
reversal points, which can indicate potentially lucrative times to buy or sell. The APZ can be
implemented as part of an automated trading system and can be applied to the charts of all tradeable assets.
WARNING:
- For purpose educate only
- This script to change bars colors.
Chanu Delta RSI StrategyThis strategy is built on the Chanu Delta RSI , which indicates the strength of the Bitcoin market. The problem with the previous Chanu Delta Strategy was that it was simply based on the price difference between the two Bitcoin markets, so there was no universality. However, this new Chanu Delta RSI strategy solves the problem by introducing an RSI that compares the price difference trend.
When the Chanu Delta RSI hits “Bull Level” and “Bear Level” and closes the candle, long and short signals are triggered respectively. The example shown on the screen is a default setting optimized for a 4-hour candlestick strategy based on the Bybit BTCUSDT futures market. You can use it by adjusting the setting value and modifying it to suit you.
This strategy is selectable from both reference and large amplitude BTCUSD markets in order to enable fine backtesting. I recommend using BYBIT:BTCUSDT for the reference market and COINBASE:BTCUSD for the large amplitude market.
(Note) Using the "Chanu Delta RSI" to know the current indicator value in real time, it is convenient to predict the signal of the strategy.
(Note) Because the Chanu Delta RSI represents the price difference based on the Bybit BTCUSDT futures market, backtesting is possible from March 2020.
_____________________________________________________________
이 전략은 비트코인 시장의 강점을 나타내는 Chanu Delta RSI를 기반으로 합니다. 기존 Chanu Delta 전략의 문제점은 단순히 두 비트코인 시장의 가격차를 기준으로 하여 보편성이 없었다는 점이다. 하지만 이번 새로운 Chanu Delta RSI 전략은 가격차이 추세를 비교하는 RSI를 도입해 문제를 해결했습니다.
Chanu Delta RSI가 "Bull Level"과 "Bear Level"에 도달하고 봉마감하면 롱, 숏 신호가 각각 트리거됩니다. 화면에 보이는 예시는 Bybit BTCUSDT 선물 시장을 기반으로 한 4시간 캔들스틱 전략에 최적화된 기본 설정입니다. 설정값을 조정하여 자신에게 맞게 수정하여 사용하시면 됩니다.
이 전략은 정밀한 백테스팅을 가능하게 하기 위해 참조 및 큰 진폭 BTCUSD 시장에서 모두 선택할 수 있습니다. 참조 시장에는 BYBIT:BTCUSDT를 사용하고 큰 진폭 시장에는 COINBASE:BTCUSD를 사용하는 것이 좋습니다.
(주) "Chanu Delta RSI"를 이용하여 현재 지표 값을 실시간으로 알 수 있어 전략의 시그널을 예측하는데 편리합니다.
(주) Chanu Delta RSI는 바이비트 BTCUSDT 선물시장을 기준으로 가격차이를 나타내므로 2020년 3월부터 백테스팅이 가능합니다.
Ichimoku 4H crypto strategy -- LONG ONLYThis is a LONG ONLY strategy for 4h timeframe of any Cryptocurrency/USD pairs. The strategy opens only 1 position at a time with the following conditions.
Open Long Position when:
1. Closed price above cloud AND
2. Green cloud ahead AND
3. Conversion line above Baseline AND
4. Lagging span above cloud and price action AND
Close trade when:
1. Lagging span gets below price action or cloud OR
2. Price gets inside the cloud OR
3. Price gets below baseline
You can use it on a lower timeframe at YOUR OWN RISK. My optimal timeframe is 4 Hour candles.
Cheers.
Santanu StrategyThis script use for crypto market, its use ema and supertrend to find the current trend in the market