This is a simple strategy that alerts you when you go over your daily loss limit. You can run it on a chart, keep it minimized so that you don't have to look at your profit if you don't wish. You can select the account, and the limit. It will alert in the alert window and play a sound too. I had this coded for me, so please let me know if there could be any improvements. I hope you find this of some benefit.
To highlight again, this runs as a Strategy, not an indicator.
This is a bar type for NinjaTrader, based on the superb BetterRenko by Aslan. (I only changed the size of the reversal brick, the name and set the PeriodType to Custom9)
It simply paints evenly sized bricks/bars if the price fills the specified range of ticks up or down from the last close.
Instead of only creating ladders (like a regular Renko does) one also gets sideways movement if the market is flat or oscillating. I creates a bit more noise but also helps to identify possible turning points when the market hesitates.
Because these bars are drawn from real ticks, there are some times shorter bars or even small gaps. In my experience it does not influence the correct alignment of the bars.
The BricksBars should be as reliable in backtesting as are the original BetterRenko.
Check, whether you have any other PeriodType registered as Custom9 before importing the script. (If so, you can easily change the number in Notepad.)
If you have any suggestions how to improve the code, feel free to contact me.
This Indicator exposes two methods that can be called from any indicator or strategy to make a post to BMT. Current Version: 2.6
There are various overloads to these methods, so you don't need to use all arguments.
The two methods are:
and Changes:
makepicpost now needs "this.ChartControl" instead of just "this"as argument.
makepost will no longer require "this" as argument.
The first will post a screenshot of the chart it has been called from (with optional message), the second will post a plain message.
Edit: Added a third method, uploadimg(), as the other two it has some overloads.
It returns the url of the img (with image tags) with an event. The event can be used like:
myposter.ReturnUrlChange += new vvBMTAutoPost.ReturnUrlChangedEventHandler(MyReturnUrlChangedEvent);
private void MyReturnUrlChangedEvent(object sender, ReturnUrlChangeEventArgs returnurl)
{
//do whatever you want here...
Print ("Change detected "+returnurl);
//this prints the returnurl, three values are possible:
//"Working" , "Error" and the actual img wrapped url of the uploaded img.
}
There is the possibility to use a specific file with your API key in it when API key is either "" or not specified in the calling method.
For this to work create the following file:..."Your Home Directory"\Documents\NinjaTrader 7\bin\Custom\BMTAPIKEY.txt
Then put your API key in it, nothing else.
To use these methods you first need to add this line to your variables:
private vvBMTAutoPost myposter = new vvBMTAutoPost();
You then can call them like:
myposter.makepost(...
and myposter.makeimgpost(...
There is a custom EventHandlerfor the response error code. You can implement it like this:
1. paste this line into OnStartUp (initializes the EventHandler):
myposter.ErrorCodeChange += new vvBMTAutoPost.ErrorCodeChangedEventHandler(MyErrorCodeChangedEvent);
2. create the EventHandler method:
private void MyErrorCodeChangedEvent(object sender, ErrorCodeChangeEventArgs error)
{
//do whatever you want here...
Print ("Change detected "+error.ErrorCode);//this prints the change detect and the error code
}
3. paste this line into OnTermination (removes the EventHandler):
myposter.ErrorCodeChange -= new vvBMTAutoPost.ErrorCodeChangedEventHandler(MyErrorCodeChangedEvent);
The error codes are:
0 = no error
1 = Upload to BMCharts failed
2 = Web Client Exception
3 = Time constraint or wrong API key
4 = (not set yet)
5 = other not closer specified error in makeimgpost
6 = tried posting on historical data
9 = busy
Please use the provided EventHandler to do stuff on errors as an error will not occur the moment the method is called but maybe a few seconds later.
There is also all the info on the API in that thread.
Changelog:
19 Dec 2012
Disabled posting on historical data.
21 Dec 2012
Fixed a bug where other windows in front of the chart got caught in the screenshot. Does not (yet) work with minimized charts.
29 Dec 2012
v1.5
added an error code variable that can be accessed (it is thread safe) from the calling indicator.
v1.6
extended errorcode with 9 = busy.
v1.7
Fixed some stuff in the screenshot code
1. Jan 2013 v1.8
Fixed line break issue. Please use <br> for line breaks.
3. Jan 2013 v1.9
Now also works on minimized charts.
4. Jan 2013 v2.0
Made various overloads of the two methods for easier implementation.
Introduced an EventHandler for the error code.
Possibility to use file with API key when API key is either "" or not specified.
For this to work create the following file:..."Your Home Directory"\Documents\NinjaTrader 7\bin\Custom\BMTAPIKEY.txt
Then put your API key in it, nothing else.
(all no code breaking changes)
15. Jan 2013 v2.1
Corrected bug where price axis got cut off under some circumstances.
01. Feb 2013 v2.2
Changed the indicator argument for makepicpost to ChartControl, so use "this.ChartControl".
Deleted indicator argument for makepost, so this will not require a chart to work.
04. Feb 2013 v2.3
Introduced new argument into all methods (historial) This is the historical check so that a strategy or indicator does not try to post 100 messages when it starts up! Please pass the "Historical" attribute like makepostI(.....this, Historical);
v2.4
fixed bug in makeimgpost()
13. Feb 2013 v2.5
Added method uploadimg()
17. May 2013 v2.6 Critical update, update immediately
Changed addresses from http to https, should work again.
Posted some examples on how to use in reading charts and action https://nexusfi.com/elite-circle/27433-k_bettervolume-tos-new-version-downloads.html
Here's an interesting view of volume that I've been watching for a while. Added to the K_BetterVolume indicator I posted here a while back.
Instead of watching the classic volume bar by bar plot, I started watching the average buy vs sell for a period, which I found much more insightful. A stronger/more sustained price move is usually associated with a net volume avg forming in the same direction, also moves with no strong volume supporting them will possibly be short-lived- this simple way to view volume is especially useful when there's no easy way to track volume at bid/ask level, or if you don't want to go that deep...
Changes in this version:
A simple way to track Buy vs Sell volume for a given length of bars, "Directional Volume, or Volume Pressure or VXNet", which is the net of ratio of buy vs sell avg volume (WMA) to the overall volume average. inspired by a similar concept in one of Elder's study
added a volume buzz label calculation (the closest I could get to a VolBuzz calc in ToS, impossible to do in custom WatchLists or scans). By Changing the chart aggregation, I can check the VolBuzz (basically current bar's volume vs longer average volume of same time interval)
VXNet can be displayed on top of the "classic" volume plot, or separately .. changing plot settings enables to view it as a histogram, or just a simple green/red cloud.. see screencap for examples of how this study can be set
VXNet is zero-lag smoothed, however keep smoothing as small as possible (3 to 5) not to lose traction to actual volume trend change
informative labels, can be turned on or off - Dynamic coloring
this algo does test well and provides a better signal (sometimes up to 3 bar improvment) than taking the whole volume bar as a buy or sell volume based on the close vs open technique in prior version..
The Dynamics coloring of the info labels still there, provides visual clue for major volume spikes that deserve attention
code is commented.. TOS Study setup "baloon mini-guide" also included.
With the help of Fat Tails, managed to get a Multi-MA DMI that uses the different MAs for the calculations of ADX, DM and ADXR.
From Fat Tails:
Quoting
For the Period & Wilder's period
If you select "EMA / Wilder's period = true / average period = 14", then you will get the original ADX. The "Wilder's period = true" setting internally converts the period 14 to the value 27, which is then used by the moving averages.
If you select"EMA/Wilder's period = false/ average period = 27", then you will also get the original ADX. This time there is no conversion, but an EMA(27) is used, which is identical with the Wilder's average(14).
Some of Moving Averages:
Butterworth Filter
DEMA
Ehlers Filter
EMA
Gaussian Filter
HoltEMA
LowLag MA
SMA
SuperSmoother
T3
TEMA
TMA
VIDYA
VWMA
WMA
ZeroLag MA
You can specify the thresholds of the upper and lower lines, as well as the colors for the various DM and ADX lines (transparent if you don't want to see them).
Enjoy! =)
P.S. Click the Thanks button if it was helpful to you =)
This is a chart style for hollow candles. It is not an indicator, but a chart style! This means that it will not add CPU load, but in fact reduce it compared to the standard candlesticks.
Candles where Open=Close will color based on Hi/Lo rejection, so if the top wick is longer it will print as sell bar (as the high got rejected) and vice versa.
June 7th, 2015 05:26 PM ShaunG Been looking for a "Tick volume indicator" to help with me with reading price action! Hope this might help! Thank you.
December 6th, 2013 08:10 PM texastodd Perfect! Just in time for Christmas!
December 23rd, 2014 09:13 AM davespain Wonderful tool. Thanks!
March 26th, 2014 11:23 AM Blash Sorry to say but you can do the exact same thing in a Market Analyzer without any programming whatsoever. Just add an Al
ert condition to the ProfitLoss or UnrealizedProfitLoss or RealizedProfitLoss column(s).