
You would be able to explore code made by other users. You will be able to use some of these codes on your chart.
What are variables? - BOOL, INT, FLOAT, STRING, SERIES
Variable Assignment.
What type of variables we are dealing in PINESCRIPT? - BUILTIN , USER DEFINED
How basic operations will be carried out in PINESCRIPT? - BAISC PLUS, MINUS ETC
Type of operators
Result of a logical operator
What if some decision has to be taken ! choose between two !
Another example using pine script
What is Algorithm ? Flow of data / work.
Visual representation of Algorithm.
A simple example.
We will make our first code ! You would be able to combine multiple indicators in one code. It would allow you to bypass restrictions on maximum number of indicators imposed in free version of pinescript.
This function fills color between two plots or two lines or plot and a line.
In this lecture two color functions - color.new() abd color.rgb() have been discussed. These functions enables creating new color with transperency.
Repetitive work are boring.
Example of repetitive work.
Do once and ask someone to repeat. But you have to define how many times you want it to repeat
Doji is a candlestick pattern. In this code the script will try to identify Doji pattern based on our criteria.
Refining Doji code created in last lecture.
This lecture provides an introduction to the functions in PINESCRIPT. Here inbuilt functions and functions already studied have been discussed.
Learn to make your own functions in PINESCRIPT
Version differences have been discussed. An example of ZigZag indicator has been taken for explanation of the concept.
Create a new indicator from scratch with a new idea
A sample code for screening GAP UP in NIFTY 50 stocks has been discussed in the lecture. The code can be modified to develop your own screener.
Simple CrossCover Strategy Example
We fix our backtesting period from 1 Jan 2015 to 31 Jan 2015
After fixing backtesting period for 5 years.
Close all open trade and use entire $100,000 capital for backtesting
Now profit is 183% , total trades are 128 and profit per trade is $1433. total 48.44% trades were profitable - that means more than half of the trades were not successful
Limit Entry Order is applied and result is 84% profit, total trades 116 and profit per trade is $726. total 49.14% trades were profitable.
On same above example , reworking is done
Learn to implement Stop order. Discussed use of stop order and stop order along with limit order.
The result has improved, 214% profit in 88 trades . overall profit per trade has also increased to $2412 , however profitable number of trades are more or less at the same level i.e. 46.59%.
Improved result to 138% profit with 100 trades and profitable trades are 57%. This is improvement as now our more than half trades are closing in profit. The average number of days we were holding trade have also come down.
Added RSI to filter entry signals , reduced number of trades, in the process profit reduced to 87% but profitable trades increased to 62%. I just gave an example on how to add another indicator as filter. You may choose some other filter.
If you have a version 4 script or you know version 4 of pinescript. Take this introduction lecture for migration of script from version 4 to version 5.
TradingView is a free platform for creating your own indicators and trading strategies. Other similar platforms are paid therefore TradingView is the first choice of all learners and traders for backtesting their own strategies.
You may have some strategy in your mind but cannot backtest using a manual paper pen. You may sometimes feel the need to change your trading method and you are not sure. You may want to take a calculated risk in the market with your hard-earned money then perhaps you need to code and backtest your strategy on historical data to validate results.
This course will equip you with all the tools needed to code on TradingView, create and improve strategy, and backtest your strategy. Once you could finetune your trade strategy you would be able to trade with confidence and would be able to earn huge profits.
The time and energy you spend on this course would be less than the cost of DataSources and coding and validating platforms you may need to buy for doing the same staff, however, in TradingView both DataSources and platforms are free to use.
Why choose PineScript and TradingView over other platforms?
It's online, no need to download & install
No need to buy live datasources that are often costly.
TradingView has many builtin indicators that you may use for free!
Users share their codes for free and you may re-use full or part of their codes in your own indicators and strategies to save time and coding efforts.