Ninjatrader - page 3

 

can someone please add an input to that asc-indicator? it asctrend2_2_on_jurik.mq4should limit the bars for calculation, because indi works perfect on the weekend, but slows down my platform during market hours. if i put it on 5 charts at the same time mt4 freezes. i have to restart windows then.

can someone translate the following ninjatrader indicator to mt4?

// Developed by Art Runelis

// TradingStudies - Welcome

// info@tradingstudies.com

// 2009

using System;

namespace NinjaTrader.Data

{

public class MedianRenkoBarsType : BarsType

{

#pragma warning disable 169

// ReSharper disable InconsistentNaming

private static bool registered = Register(new MedianRenkoBarsType());

// ReSharper restore InconsistentNaming

#pragma warning restore 169

public override void Add(Bars bars, double open, double high, double low, double close, DateTime time,

int volume, bool isRealtime)

{

if (bars.Count < 2)

{

AddBar(bars, open, high, low, close, time, volume);

return;

}

Bar bar = (Bar)bars.Get(bars.Count - 1);

Bar bar1 = (Bar)bars.Get(bars.Count - 2);

double tickSize = bars.Instrument.MasterInstrument.TickSize;

double rangeValue = Math.Floor(10000000.0 * bars.Period.Value * tickSize) / 10000000.0;

double mymax = bar1.Close >= bar1.Open ? bar1.Close : bar1.Close + rangeValue;

double mymin = bar1.Close <= bar1.Open ? bar1.Close : bar1.Close - rangeValue;

if (bars.Instrument.MasterInstrument.Compare(close, mymax + rangeValue) >= 0)

{

UpdateBar(bars, open, mymax + rangeValue, low, mymax + rangeValue, time, 0);

bool isLastNewBar = close < mymax + 2 * rangeValue;

double newBarOpen = (mymax + bar.Close) * 0.5;

double newClose = Math.Min(bar.Close + rangeValue, close);

double oldClose = bar.Close;

do

{

AddBar(bars, newBarOpen, newClose, newBarOpen, newClose, time, isLastNewBar ? volume : 0);

newBarOpen = (newClose + oldClose) * 0.5;

oldClose = newClose;

newClose = Math.Min(newClose + rangeValue, close);

isLastNewBar = close == newClose;

}

while (bars.Instrument.MasterInstrument.Compare(close, newClose) > 0);

}

else

if (bars.Instrument.MasterInstrument.Compare(mymin - rangeValue, close) >= 0)

{

UpdateBar(bars, open, high, mymin - rangeValue, mymin - rangeValue, time, 0);

double newClose = Math.Max(bar.Close - rangeValue, close);

double newBarOpen = (mymin + bar.Close) * 0.5;

double oldClose = bar.Close;

bool isLastNewBar = close > mymin - 2 * rangeValue;

do

{

AddBar(bars, newBarOpen, newBarOpen, newClose, newClose, time, isLastNewBar ? volume : 0);

newBarOpen = (newClose + oldClose) * 0.5;

oldClose = newClose;

newClose = Math.Max(newClose - rangeValue, close);

isLastNewBar = close == newClose;

}

while (bars.Instrument.MasterInstrument.Compare(newClose, close) > 0);

}

else

UpdateBar(bars, open, high, low, close, time, volume);

}

public override PeriodType BuiltFrom

{

get { return PeriodType.Tick; }

}

public override string ChartDataBoxDate(DateTime time)

{

return time.ToString(Cbi.Globals.CurrentCulture.DateTimeFormat.ShortDatePattern);

}

public override string ChartLabel(Gui.Chart.ChartControl chartControl, DateTime time)

{

return time.ToString(chartControl.LabelFormatTick, Cbi.Globals.CurrentCulture);

}

public override object Clone()

{

return new MedianRenkoBarsType();

}

public override int DaysBack

{

get { return Gui.Chart.ChartData.DaysBackTick; }

}

public override int DefaultValue

{

get { return 4; }

}

public override string DisplayName

{

get { return "MedianRenko"; }

}

public override bool IsIntraday

{

get { return true; }

}

public override bool IsTimeBased

{

get { return false; }

}

public override int MaxLookBackDays

{

get { return 10; }

}

public override int MaxValue

{

get { return -1; }

}

public override double GetPercentComplete(Bars bars, DateTime now)

{

throw new ApplicationException("GetPercentComplete not supported in " + DisplayName);

}

public MedianRenkoBarsType() : base(PeriodType.Custom5) {}

public override int SortOrder

{

get { return 13007; }

}

public override string ToString(Period period)

{

return String.Format("MedianRenko {0} Ticks", period.Value);

}

}

}

Files:
 

Coding help regarding mt4 and ninjatrader indicators

Hello,

I need help converting some mt4 indicators into ninjatrader indicators.

Please PM me if anyone is able to help me. I cannot post the indicators, because they are private but i can share them with a willing to help me coder.

My Best and Kindest Regards,

dAb_1493

 

Polarized Fractal Efficiency

I have seen several polarized fractal efficiency indicator codes in mql forums including the TSD based on Hans Hannula formula.Then I read this interesting discussion in Ninja Trader forum Polarized Fractal Efficiency Indicator - Commodities Futures Trading the person declaring Hans Hannula formula as inchoherent based upon William Eckhardt's article Fin Articles: William Eckhardt: The C-Test Eckhardt's formula converted in C# for Ninja trader platform and it looks like the correct formula ,coders maybe find it interesting and convert the formula into mql4.

 
ztdep:
Dear friends:

Could you please provide me a broker with NinjaTrader

Regards

Hello!

Please, take a look on their official web-site, here: NinjaTrader stock, futures and forex charting software and online trading platform. NinjaTrader Partners.

 

Anybody here using ninjtrader in live trading?

What brokers? What are the live experiences?

 
sebastianK:
Anybody here using ninjtrader in live trading? What brokers? What are the live experiences?

I use ninjatrader in live with amp/global futures broker. I am fully happy of the platform

 

seems interesting

time to try it out

 

After all that metatrader does any trading platform starting to look better than metatrader now

 

Guys

I like ninjatrader but the codding language it is using is #C. If you are not familiar with that type of coding languages, you are not going get used to it in a short time. And, do not forget, that they did a very similar thing as metatrader (when they migrated from ninjatrader 7 to ninjatrader 8 : almost all code had to be rewritten there too)

 

iam not understand ninjatrader?

whetever is MT4 or Indicator?

and how tu use ninjatrader?

Please reply?

Reason: