TradingView Alerts to MT4 MT5 + dynamic variables NON-REPAINTINGAccidentally, I’m sharing open-source profitable Forex strategy. Accidentally, because this was aimed to be purely educational material. A few days ago TradingView released a very powerful feature of dynamic values from PineScript now being allowed to be passed in Alerts. And thanks to TradingConnector, they could be instantly executed in MT4 or MT5 platform of any broker in the world. So yeah - TradingConnector works with indices and commodities, too.
The logic of this EURUSD 6h strategy is very simple - it is based on Stochastic crossovers with stop-loss set under most recent pivot point. Setting stop-loss with surgical precision is possible exactly thanks to allowance of dynamic values in alerts. TradingConnector has been also upgraded to take advantage of these dynamic values and it now enables executing trades with pre-calculated stop-loss, take-profit, as well as stop and limit orders.
Another fresh feature of TradingConnector, is closing positions only partly - provided that the broker allows it, of course. A position needs to have trade_id specified at entry, referred to in further alerts with partial closing. Detailed spec of alerts syntax and functionalities can be found at TradingConnector website. How to include dynamic variables in alert messages can be seen at the very end of the script in alertcondition() calls.
The strategy also takes commission into consideration.
Slippage is intentionally left at 0. Due to shorter than 1 second delivery time of TradingConnector, slippage is practically non-existing. This can be achieved especially if you’re using VPS server, hosted in the same datacenter as your brokers’ servers. I am using such setup, it is doable. Small slippage and spread is already included in commission value.
This strategy is NON-REPAINTING and uses NO TRAILING-STOP or any other feature known to be faulty in TradingView backtester. Does it make this strategy bulletproof and 100% success-guaranteed? Hell no! Remember the no.1 rule of backtesting - no matter how profitable and good looking a script is, it only tells about the past. There is zero guarantee the same strategy will get similar results in the future.
To turn this script into study so that alerts can be produced, do 2 things:
1. comment “strategy” line at the beginning and uncomment “study” line
2. comment lines 54-59 and uncomment lines 62-65.
Then add script to the chart and configure alerts.
This script was build for educational purposes only.
Certainly this is not financial advice. Anybody using this script or any of its parts in any way, must be aware of high risks connected with trading.
Thanks @LucF and @a.tesla2018 for helping me with code fixes :)
Stochastic Oscillator
Apirine Stochastic MACD w/ MA Selection by Cryptorhythms📊 Apirine Stochastic MACD w/ MA Selection by Cryptorhythms
Intro
Had to re-release due to moderation.
This happens to be my first open source indicator, hope you all enjoy it!
Description
This indicated is ported from November 2019 issue of TASC. “The Stochastic MACD Oscillator” in this issue, author Vitali Apirine introduces a new indicator created by combining the stochastic oscillator and the MACD . He describes the new indicator as a momentum oscillator and explains that it allows the trader to define overbought and oversold levels similar to the classic stochastic but based on the MACD .
Options
-You can enable bar coloration for trade state (signal conditions setup in the "long" and "short" variables).
-You can choose histogram or columns for the convergence/divergence display.
-You can turn on/off and adjust the overbought / oversold zones.
-You can choose what type of moving average to use in the calculation from a small selection of options. This gives you more flexibility to adapt the indicator to your needs.
👍 We hope you enjoyed this indicator and find it useful! We post free crypto analysis, strategies and indicators regularly. This is our 70th script on Tradingview!
🤐Check my Signature for other information
DiNapoli Preferred Stochastic Oscillator [ChuckBanger]In the late 1950s, George Lane developed stochastics, an indicator that measures the relationship between an issue's closing price and its price range over a predetermined period of time. This is Joe DiNapoli version of stochastic oscillator. Use it as you wold use a regular stochastic indicator.
Easy to Use Stochastic + RSI StrategyA simple strategy that yields some great results.
CODE VARIABLES
LINE 2 - Here you can change your currency and amount you want to invest on each entry.
LINE 10/11/12 - Here we establish what date we want to start backtesting from. Simply change the defval on each line to change the date (In the code below we start on Jan 1st, 2014).
LINES 19 through 27 - Here we set our Stochastic and RSI sensitivity (Currently %K = 14, %D = 3, RSI = 14). Change these to your preference.
LINE 39/41 - Here we execute our orders (Currently set when %K crosses %D under the 20 value and RSI is less than 50 to BUY, %K crosses %D above the 80 value and RSI is greater than 60 to SELL). Change these to your preference.
NOTE: As a beginner you may not want to short stock, therefore LINE 6 was added to only allow long positions.
I didn't overlay the RSI value over the Stochastics because it was too cluttered. Just add the RSI indictor seperately to your layout.
As always, couple this with trend following and exit/entry rules to make the profitability even higher!
Cheers!
PtahX's Slow Stochastic with AlertsPtahX Slow Stochastic
converted to Pinescript Version 4
initial code thanks to Oshri17 !!
PtahX Version
converted to version 4
modified color scheme
Upper and lower band crossing alerts added (Entrance & Exit)
Modified Stochastic MACD Oscillator - Vitali ApirineFor all MACD enthusiasts out there, hot off the press, I present this next generation "Modified Stochastic MACD Oscillator" employing PSv4.0, originally formulated by Vitali Apirine for TASC - November 2019 Traders Tips. Just when you may have thought it was the end of the evolutionary line for MACD technology, it's not! Basically it's a NEW hybridization of a MACD and stochastic rolled into one, maintaining scale symmetry to support overbought/oversold defined levels across time frames and assets, unlike the ordinary MACD. On the ordinary MACD, this is virtually impossible to do properly, and trust me, I have tried with zero success. My less than 40 line implementation, at initial release, is a heavily modified version of the original indicator using novel techniques, surpassing not only Apirine's original intended design, but also the "contemporary MACD" provided by TV, visible on the bottom of the chart.
Utilizing the "Power of Pine", I included the maximum amount of features I could surmise in an ultra small yet powerful package. I provided an abundance of control over each feature as an attempt to create another heavenly MACD experience in an open source package, only rivaled by my "Ultimate MACD Super Pack". Configurations are displayed above in multiple scenarios that should be suitable for most traders. Of notable mention, I rescaled the oscillator more towards a zero mean unity scale, while still leaving the waveforms completely intact.
Features List Includes:
Dark Background - Easily disabled in indicator Settings->Style for "Light" charts or with Pine commenting
AND much, much more... you have the source!
For those of you who are new to Pine Script, this script also may help you understand advanced programming techniques in Pine and how they may be utilized in a most effective manner. I would like to see Tradingview become the go to platform for the best MACD indicators attainable with this contribution to the TV community. This is commonly what my dense intricate code looks like behind the veil, and if you are wondering why there is no notes, that's because the notation is in the variable naming. If you wish to contribute additional ideas, please do so below in the comments about all things MACD in Pine.
NOTICE: Copy pasting bandits who may be having nefarious thoughts, DO NOT attempt this, because this may violate Tradingview's terms, conditions and/or house rules. "WE" are always watching the TV community vigilantly for mischievous behaviors and actions that exploit well intended authors for the purpose of unscrupulously increasing brownie points in reputation scores. Hiding behind a "protected" wall may not protect you from investigation and account penalization by TV staff. Be respectful, and don't just throw a meaningless feature in there branding it as "your" gizmo. Fair enough? Alrighty then... I firmly believe in "innovating" future state-of-the-art indicators, and please contact me if you wish to do so.
The comments section below is solely just for commenting and other remarks, ideas, compliments, etc... regarding only this indicator, not others. When available time provides itself, I will consider your inquiries, thoughts, and concepts presented below in the comments section if you do have any questions or comments regarding this indicator. When my indicators achieve more prevalent use by TV members, I may implement more ideas when they present themselves as worthy additions. As always, "Like" it if you simply just like it with a proper thumbs up, and also return to my scripts list occasionally for additional postings. Have a profitable future everyone!
Schaff Trend Cycle [ChuckBanger]The Schaff Trend Cycle is a method, developed by Doug Schaff and based on the concept that trends also have repeating high and low patterns, or cycles. This is a modified MACD line, run through a modified stochastic algorithm and smoothed with Wilders’ smoothing in order to estimate the final Schaff Trend Cycle (STC) indicator. Its purpose is to identify the direction, in which a trend cycle is moving and possible peaks and bottoms within this cycle.
If this is interesting you should also take a look at MACD Leader:
For more info about Schaff Trend Cycle Indicator:
www.investopedia.com
CBCI RSI ParallelParallel version of CBCI Cu + RSI w/ SMA and EMA. It's both indicators, but combined into one indicator space with an adjustable bidirectional offset for the spacing and location.
According to Constance Brown, both the CBCI and RSI are technically supposed to be used in tandem to easily spot divergences - this is an attempt to put that into practice, in one indicator, in the context of tradingview subscription limitations for non Pro/Premium users.
cbci-mModified CBCI with the Composite disabled by default and two additional optional EMAs + hlc3 default source.
[Coingrats]RSI Divergence + StochRSIThis indicator shows the RSI and StochRSI. RSI divergence will also be marked.
- Bullish divergence - green triangle,
- Hidden bullish divergence - gray triangle
- Bearish divergence = red triangle
- Hidden bearish divergence - gray triangle
Credits to BabyWhale83 for the code to spotting divergence
WANNA TIP ME? BUY ME SOME BEERS!
BTC: 3BMEXX5JrX94ziUSoQMLEmi51WcYwphAg3
ETH: 0x541e504bb461aa141de6ddce09dc89eb16f58f9c
LTC: LPBJXzUZJksCuCK27AY2qAVYGGGiUfejok
DON'T FORGET TO LOOK AT OUR SITE MYCRYPTODARAR.COM
Function : Stochastic Oscillator Here is the Stochastic Oscillator function.
Now you can easily use length with mutable variables !!
Stochastic [Gu5]To know if we are in range, I recommend my other indicator "Trend Channel Gu5"
Stochastic shows overbought / oversold
--
Para saber cuando no hay tendencia y estamos en rango, recomiendo usar mi indicador "Trend Channel Gu5"
El cruce de K & D nos muestra cundo el mercado esta en sobre-compra o sobre-venta
Las alertas con banderas ayudan a visualizar mas claramente, evitando las alertas duplicadas
CCI Stochastic and a quick lesson on Scalping & Trading SystemsHello traders
Still on holidays but I don't and will never forget you <3
I realize more and more that you guys don't only want some indicators and learn about pinescript. You also want some guidance and get some mentors providing you with comprehensive and simple trading methods and tricks.
I'm against those posting many scripts a day that in the end will make you lose your money because they don't give you the methodology to use them
It might look nice on the charts but we're not here to do some painting.... but to improve our lifestyle right :)
The today indicator is based on an indicator that I used for scalping : Fxcodebase CCI Stochastic
A CCI stochastic is very reactive and allows us to take many scalps trades per day with a few pips/USD gain for each trade. I don't recommend novice traders to use it and I strongly recommend everyone reading my disclaimer below basically saying "I'm not a financial advisor, don't be dumb, stay safe"
(I also recommend the few scripts copy-pasters to read my disclaimer as well)
What's a novice trader, sir? Well... thanks for asking. A novice trader is any trader with less than 5 years of live trading experience
From a pinescript perspective, this script will be however interesting for everyone :)
How to use it?
The indicator gives 3 possible entries for Longs and Shorts:
- Arrows at Enter - Will give signals whenever the Stoch CCI will enter in the BUY/SELL zone
- Arrows at Exit - Will give signals whenever the Stoch CCI will exit the BUY/SELL zone
- Arrows at Center - Signals whenever the Stoch CCI will cross the mid-line (50)
All arrows have different colors because ... painting is cool and nice.... kidding.... it gives clearer and more readable signals on the chart (but painting sir...)
A possible trading method could be to use the 3 modes at the same time to get the maximum of opportunities.
The safer bet is to use the "Arrows at Exit" only mode but for those who want to accumulate more scalping positions, adding the "Arrows at Enter" mode is an option as well. In other words, you accumulate a few scalping positions whenever the Stoch CCI get in the BUY/SELL zone and will stop accumulating whenever it will exit the BUY/SELL zone
You can add a few extra positions whenever the Stoch CCI will cross the mid-line as it often translates in a trend continuation
Life hack
Very important note : (probably the most important gem I shared until now) The inputs set by default will have to be changed for your asset/timeframe and can't be generic for everything. You have to play with the inputs until the signals will make sense to you
The indicator/strategy with a unique configuration that you'll never check or update according to the market condition DOES NOT exit.
If you find such a tool and prove me that you're making constant gains with it over a year, please patent it and then show it to me as I'd like to study it to replicate :) But most likely this is a myth/unicorn
Who I am to say this? Well, I worked in a Bank with real traders and I have a good sense of what works and what will certainly not work
My guru said scalping crypto in 1 second timeframe was the way to get rich quick. Do you agree sir?
But in trading, this is not because you take the maximum of trades possible that your gains will increase. This is the contrary.
There is a strong and proven inverse correlation between the number of trades taken and how fast you'll burn your capital. A swing trader taking 2/3 trades a month is more likely to beat 99% of the scalpers out there trying to predict all market movements. (and I'm not even talking about how dangerous it is to scalp with leverage)
You're starting to know me a bit more right now. I prefer to tell you what you need to hear vs what you want to hear because the second option doesn't allow to stay in the game very long.
I might lose some futures clients along the way by saying that but for my own conscience and ethics, I prefer to warn about the true risks of trading and to select who you listen very carefully (the advice also works for me, if you feel what I said doesn't make sense, this is totally your right but I hope this is because I'm french and not because of the content ^^).
See you tomorrow for another indicator or idea
Love you all
Dave
____________________________________________________________
Be sure to hit the thumbs up. Building those indicators take a lot of time and likes are always rewarding for me :) (tips are accepted too)
- If you want to suggest some indicators that I can develop and share with the community, please use my personal TRELLO board
- I'm an officially approved PineEditor/LUA/MT4 approved mentor on codementor. You can request a coaching with me if you want and I'll teach you how to build kick-ass indicators and strategies
Jump on a 1 to 1 coaching with me
- You can also hire for a custom dev of your indicator/strategy/bot/chrome extension/python
Disclaimer:
Trading involves a high level of financial risk, and may not be appropriate because you may experience losses greater than your deposit. Leverage can be against you.
Do not trade with capital that you can not afford to lose. You must be aware and have a complete understanding of all the risks associated with the market and trading. We can not be held responsible for any loss you incur.
Trading also involves risks of gambling addiction.
Please notice I do not provide financial advice - my indicators, strategies, educational ideas are intended to provide only some source code for anyone interested in improving their trading
The proprietary indicators and strategies developed by Best Trading Indicator, the object of intellectual property rights are and remain the exclusive property of Best Trading Indicator, at the exclusion of images and videos and texts free of rights or provided by the Company or external legal or physical person.
No assignment of intellectual property rights is carried out through these Terms and Conditions.
Any total or partial reproduction, modification or use of these properties for any reason whatsoever is strictly prohibited without the express written authorization of the Company.
Double StochasticUses two sets of stochastic's to find bull/bear conditions tested on BTC daily and Gold etf weekly charts
Absolute Strength Histogram v2 | jhv2 changes the way the histogram is plotted.
Histogram shows the strength and can be used to identify trending or ranging periods.
Absolute Strength Histogram | jhOriginal ASH code from alexgrover
Some changes:
- Change the price to SMA with Period of 1 with reference to the original MT4 code
- Added a few more MAs
True Strength V2True strength using two stochastic's and a VWMA , can use for cycle indication as well
Plain Stochastic Divergence Stochastic Divergence
Plain simple way of calculating divergences
We all have times when we want to see just the divergences and nothning else
This script is minimalised to visualize that
references :
// stochastic // divergence // stoch //
Function StochRSI Stochastic Relative Strength Index developed by Tushar Chande and Stanley Kroll.
This script has been written to eliminate the period variable.(Integer)
Thus, it can be used comfortably in adaptive period scripts ! (For example : Adaptive Moving Average , KAMA , FAMA .. etc. )
All efforts goes to ChaosTrader () ,
RicardoSantos () ,
Hpotter for barcolor codes (iff) ()
I hope it will help your new ideas . Best regards ! Noldo .
Stochastic RSI (with alerts)This is a modification of original Stochastic RSI oscillator, but with addition of highlighted death and golden crosses. It also allows you to receive alerts: "Stochastic RSI: Death cross on 4hours"