Sessions and news markersHello,
I use this script daily so I thought it might help some of you guys out!
WHAT IS THE SCRIPT
This script can show two custom trading sessions and up to three specific dates and hours to keep in mind while trading (for example a news release).
WHY USE THE SCRIPT
My trading plan tells me to trade from 08:00am to 10:00am (GMT+1) and not to let open trades during a high impact news release, this script allows me to show my trading session and mark the news releases on the chart before trading so I don't forget about them while in the heat of trading.
HOW TO USE THE SCRIPT
It is very straightforward:
How to set up the TRADING SESSIONS:
- Tick the trading sessions that you want to use (one or two)
- Specify the trading hours
- Choose the color of the trading sessions
- Choose the color to fill outside of the trading sessions
- Choose the time zone (GMT, GMT+1, UTC, UTC+2...)
How to set up the NEWS MARKERS:
- Tick the news markers you want to use (up to three)
- Specify the date and hours of the news
- Choose the color of the news markers
- No need to choose the time zone, it will use the timezone of the chart
PS: As you can see in the settings, each session and news marker can have their own color
I hope this helps you out as much as it helps me! If you have any recommendations I would be glad to hear them :)
Help
Entry helperHello traders,
This is a script I use daily as a scalper and it helps me a lot, maybe it can help you, this is why I am sharing it!
PART 1 - DESCRIPTION
This program is specifically designed to help scalpers but can be used for all types of trading but won't be as useful.
This script is what I call an entry helper as it calculates dynamically the position size, stop loss and take profit levels and more.
When scalping and placing market entry orders, the price can move significantely while you are calculating your position size according to your stop loss, capital, risk and especially close price that changes very quickly, this results in a risk that is not ideally controlled and personally was a source of frustration and stress. I wanted to enter my quantity and stop loss values as fast as possible and make the process easier.
This script automates the calculation of the position size, stop loss and take profit levels according the the users input and prints the data visibly on the screen so it is easy to copy by the trader. It allows the trader to be confident that his risk is as controlled as possible.
The script is easy to use and set up, this guide will help you if you have any difficulies or questions.
PART 2 - HOW TO USE THE SCRIPT
- SET THE CAPITAL SETTINGS
1 - Set your capital value in $
- SET THE TRADE SETTINGS
2 - Set your trade side (BUY or SELL)
3 - Set you desired risk in % of your capital
- ENTRY SETTINGS
4 - Set your entry from 2 different options
|MARKET| (default option)
This option will place the entry level at the last available price
|LIMIT|
This option allows you to input a fixed price level for the entry
- STOP LOSS SETTINGS
5 - Select your stop loss placement from 4 different options
|EXTREMA STOP LOSS| (default option)
This option will place the stop loss at the highest/lowest (extrema) price level within the last N candles
|ATR EXTREMA|
This option uses the same price level as the EXTREMA STOP LOSS but will add/soustract the last ATR value (calculated on the N last candles) multiplied by a coefficient that you input
|TICKS EXTREMA|
This option uses the same price level as the EXTREMA STOP LOSS but will add/soustract a number of ticks that you input
|PRICE LEVEL|
This option allows you to input a fixed price level for the stop loss
- TAKE PROFIT SETTINGS
6 - Select your take profit from 3 different options
|NONE| (default option)
This option will not display any take profit level, I have added this option as I don't have take profit targets
|RR|
This option uses a risk to reward ratio (reward/risk) that you input, it will automatically calculate the take profit level that corresponds
|PRICE LEVEL|
This option allows you to input a fixed price level for the take profit
- QUANTITY AND FEE SETTINGS
7 - Set the quantity settings, it represents the quantity in a lot (usually 100 000 in forex, 100 in stocks 1 for crypto currencies)
8 - Set the fee per quantity (turning lot)
- VISUAL SETTINGS
9 - Show or remove the tab
- TAB SETTINGS
10 - Select the data that you want to display in the tab (the tab will adapt automatically)
NOTES:
The vertical dashed line shows what candle has been used for the calculation of the stop loss, it allows you to visualize what candle the script has selected in case of an EXTREMA stop loss option.
I hope this helps you out! Any suggestions are welcome and I hope that the guide is clear enough.
Happy trading!
Invisible FriendLooking into a question from user Alex100, i realized many people do want some kind of values displayed on chart when they hover the mouse over different bars.
As pinescript does not have any feature like pop up box, the only way is to plot a line and than see indicator values at top left. So when mouse is moved around the value displayed changes. As we just need the value, we do not want to clutter the chart with another line.
Using display.none will hide the value from indicator value also
Using color.white will also color the indicator value to white, making it invisible
So the solution is very simple, and requires a bit of creativity. We create an invisible line, in any color we like :)
This indicator is a tutorial on how to display indicator values without the line showing up and also this can be implemented as displaying data for each bar on mouse hover.
-----
Check My Public Creations In The Meantime:
Buy Monday Exit Tuesday with StopLoss and TakeProfit
Close Combination Lock Style Visual Appeal Indicator
High-Low Box between Earnings with ability to Add Custom Boxes
CC - Consolidated Interval Display (CID)Ever wish you didn't have to rapidly flip between 6 different intervals to get the full picture?
Yeah, me too. Do you also wish that you kind of understood how the shift / unshift function works for arrays?
Yeah, I did too. Both of those birds are taken care of with one stone!
The Consolidated Interval Display uses the new Array structure and security to display data for 5m, 15m, 45m, 1h, 4h and 1d intervals SIMUTANEOUSLY! Regardless of which interval you're looking at you can get the full picture of numerical data without flipping around to get it.
This is my first script trying to use arrays. It basically shows the following for the given ticker:
ATR14, RSI7, RSI14, SMA50, SMA200 and VWAP at the 5 minute level.
ATR14, RSI7, RSI14, SMA50, SMA200 and VWAP at the 15 minute level.
ATR14, RSI7, RSI14, SMA50, SMA200 and VWAP at the 45 minute level.
ATR14, RSI7, RSI14, SMA50, SMA200 and VWAP at the 1 hour level.
ATR14, RSI7, RSI14, SMA50, SMA200 and VWAP at the 4 hour level.
ATR14, RSI7, RSI14, SMA50, SMA200 and VWAP at the 1 day level.
To make it more or less busy, I've allowed you to toggle off any of the levels you wish. I've also chosen to leave this as open source, as it's nothing too experimental, and I hope that it can gain some traction as an Array example that the public can use! If you don't like the different values that are shown, use this source code example as a spring-board to put values that you do care about onto the labels.
If this code has helped you at all please drop me a like or some constructive criticism if you do not think it's worth a like.
Good luck and happy trading friends.
If this gets traction, I will post something similar for a combination of SPY, VIX, GOLD, QQQ, IWM and TLT.
Barssince Context TestThis is just published for visibility as a public service until the Pine devs are able to fix or document this behavior. The barssince() function returns different values when inside a conditional context. As long as it can be documented (and relied upon), this could be a pretty cool feature, but right now this is now how I read the help documentation to describe the function's intended behavior.
Anyway, in the script you'll see that test and test2 agree on red bars, but on green bars test gets a much lower value, which was pretty shocking to me until I traced down this particular cause within my larger script.
Trader Set - Choppiness Index HelperThis is simply a helper indicator that sits on the chart to mimic the color code of the choppiness index oscillator. It can be used when you maximize the chart to better focus on the chart and other parts of the system.
Please don't ask for getting access, these indicators are available only for my students. The English website and the related learning materials are under development and soon they will be published and I will announce it in the comment section of every related indicator.
CM_Ultimate_MA_MTF_V2 with Alert Long and Short Hello All,
Here is a scirpt of ChrisMoody modified with the alerts of purchases and sales.
I just have a problem with automation. At the bottom of my script my alerts "Buy1" and "Sell2" give alerts constantly and I wish to have a single alert before the order is completed. Before "Sell1" or Buy2 ".
I found the function "barstate.isfirst" that could possibly work?
Does anyone have an idea ? :)
Bollinger Band Open Gap Alert V1This is the bare bones of what I'm trying to achieve through pine script. The purpose of the script is to:
1. On a 15m chart, calculate and plot upper & lower Bollinger bands and simple moving average of 20 periods. (DONE)
2. On a new day, when the first 15m candle of a session forms, I want to check if a) the low of the new candle is outside the upper Bollinger band (also known as an open gap up) or b) if the high of the candle is the outside the lower Bollinger band (also known as open gap down). In other words, I want to know if the Bollinger Bands are not touching the new candle's wicks/shadows. (DONE)
3. Alert me if the above happens. (DONE)
4. Run the indicator through an entire watch list. I'm not sure if that's possible, yet. (HELP)
For the above job, this is what I could come up with. I need guidance for the last step . And any suggestions for corrections or improvements would be greatly appreciated!