This is the original code for Amibroker by Karthik. If you are interested you can program something for NT7 or make improvements for NT 6.5 code, which you can download here in the forum. I have noticed the VSA Indicator for NT 6.5 has often times false signals/ alerts. For example it tells you sometimes that there is a test bar, but there should be by definition not or vice versa. And many more little definition mistakes.
Hey Guys,
This indicator was developed by eDanny on the Ninja Support forum and it's something I was looking for for a while and finally found it.
It allows you to change the color of the candle outline to match the color of the candle. ie up candle green, outline/wick is green and so forth. Also you can adjust if the body is filled or hollow. It's very helpful for those who like to have a black background similar to tradestation.
Below is the Ninja Support forum link: http://www.ninjatrader-support2.com/vb/showthread.php?t=14122&highlight=candle+outline+eDanny
Let me know if you have any questions.
Nick Faria
COMPATIBILITY: NinjaTrader6.5: Not tested, yet
NinjaTrader7: Yes- ZTrade101
Renko charts are price charts with rising and falling diagonal lines of boxes that are either filled or hollow. Renko charts are "time independent" charts that do not have constantly spaced time axes.
The word "Renko" comes from "Renga", the Japanese word for "brick". The filled and hollow squares that make up a Renko chart are often referred to as "bricks." Renko charts were popularized by Steve Nison in his book "Beyond Candlesticks".
Renko charts have a pre-determined "Brick Size" that is used to determine when new bricks are added to the chart. If prices move more than the Brick Size above the top (or below the bottom) of the last brick on the chart, a new brick is added in the next chart column. Hollow bricks are added if prices are rising. Black bricks are added if prices are falling. Only one type of brick can be added per time period. Bricks are always with their corners touching and no more than one brick may occupy each chart column.
It's important to note that prices may exceed the top (or bottom) of the current brick. Again, new bricks are only added when prices completely "fill" the brick. For example, for a 5-point chart, if prices rise from 98 to 102, the hollow brick that goes from 95 to 100 is added to the chart BUT the hollow brick that goes from 100 to 105 is NOT DRAWN. The Renko chart will give the impression that prices stopped at 100.
It's also important to remember that Renko charts may not change for several time periods. Prices have to rise or fall "significantly" in order for bricks to be added.
Here's some code I came up with from various samples to give me some peace of mind if you were to run your strategies unattended.
Nothing fancy, but it can be easily personalized with your own messages, input variables, etc.
Please test before using with real money!!!
Place in the Variables section...
private double priorCumProfit = 0;
Place at the beginning of the OnBarUpdate() section...
// At the start of a new session calculate the prior cum profit so it won't be included in the
// calculation. Need this for historical testing.
if (Bars.FirstBarOfSession)
{priorCumProfit = Performance.AllTrades.TradesPerformance.Currency.CumProfit;}
// *** Calculate the toal profit (cumulative profit minus prior profit plus the current position profit
double myMaxProfit = (double) 1000;
double myMaxLoss = (double) -1000;
double cumProfit = (double) Performance.AllTrades.TradesPerformance.Currency.CumProfit;
double curPosition = (double) Position.GetProfitLoss(Close[0], PerformanceUnit.Currency);
double totCumProfit = (double) cumProfit - priorCumProfit + curPosition ;
// *** STOP the strategy! if a total profit or loss exceeds the max
if (totCumProfit <= myMaxLoss || totCumProfit >= myMaxProfit)
{
if (Position.MarketPosition == MarketPosition.Long) {ExitLong("DMA: Exit Long - max Profit/Loss exceeded", "");}
if (Position.MarketPosition == MarketPosition.Short) {ExitShort("DMA: Exit Short - max Profit/Loss exceeded", "");}
Print(Time[0] + ": EXIT STRATEGY - Max Profit/Loss exceeded: $" + myMaxProfit + "/$" + myMaxLoss + ", Current: $" + totCumProfit);
return;
}