Convert MQ4 to Ninjatrader - NinjaTrader | futures io social day trading
futures io futures trading


Convert MQ4 to Ninjatrader
Updated: Views / Replies:1,413 / 14
Created: by Realtimetrader Attachments:8

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 8  
 
Thread Tools Search this Thread
 

Convert MQ4 to Ninjatrader

  #1 (permalink)
Elite Member
Overijssel
 
Futures Experience: Master
Platform: Ninja
Favorite Futures: FDAX
 
Posts: 14 since Aug 2010
Thanks: 3 given, 1 received

Convert MQ4 to Ninjatrader

I need help tot convert a MQ4 indicator tot Ninjatrader format.

Thanks for helping me:

//+------------------------------------------------------------------+
//| Chande_Kroll_Stop_v1.mq4 |
//| Copyright © 2006, Forex-TSD.com |
//| Written by IgorAD,igorad2003@yahoo.co.uk |
//| http://finance.groups.yahoo.com/group/TrendLaboratory |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, Forex-TSD.com "
#property link "http://www.forex-tsd.com/"
//----
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
//---- input parameters
extern int Length =20;
extern int ATRPeriod =10;
extern double Kv =3;
//---- indicator buffers
double UpTrend[];
double DnTrend[];
double smin[];
double smax[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
string short_name;
//---- indicator line
SetIndexStyle(0,DRAW_LINE);
SetIndexStyle(1,DRAW_LINE);
IndicatorBuffers(4);
SetIndexBuffer(0,UpTrend);
SetIndexBuffer(1,DnTrend);
SetIndexBuffer(2,smin);
SetIndexBuffer(3,smax);
//---- name for DataWindow and indicator subwindow label
short_name="Chande Kroll Stop("+Length+","+ATRPeriod+","+Kv+")";
IndicatorShortName(short_name);
SetIndexLabel(0,"UpTrend");
SetIndexLabel(1,"DnTrend");
//----
SetIndexDrawBegin(0,Length);
SetIndexDrawBegin(1,Length);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Chande_Kroll_Stop_v1 |
//+------------------------------------------------------------------+
int start()
{
int shift,limit, counted_bars=IndicatorCounted();
//----
if(counted_bars > 0) limit=Bars-counted_bars;
if(counted_bars < 0) return(0);
if(counted_bars ==0) limit=Bars-Length-1;
//----
for(shift=limit;shift>=0;shift--)
{
smin[shift]=High[Highest(NULL,0,MODE_HIGH,ATRPeriod,shift)] - Kv*iATR(NULL,0,ATRPeriod,shift);
smax[shift]=Low [Lowest (NULL,0,MODE_LOW ,ATRPeriod,shift)] + Kv*iATR(NULL,0,ATRPeriod,shift);
//
UpTrend[shift]=-10000000;
DnTrend[shift]= 10000000;
//----
for(int i=Length-1;i>=0;i--)
{
UpTrend[shift]=MathMax( UpTrend[shift], smin[shift+i]);
DnTrend[shift]=MathMin( DnTrend[shift], smax[shift+i]);
}
}
return(0);
}
//+------------------------------------------------------------------+

Reply With Quote
 
  #2 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,219 received

You are likely to have better luck posting in the "Want your NT indicator created free" thread:

https://futures.io/elite-circle/1261-want-your-ninjatrader-indicator-created-free.html

But you need to include at least a couple charts, so people can reference them.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #3 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,600 received
Forum Reputation: Legendary


I had a quick look at the formula and then produced a first version for NinjaTrader.

The chart is shown below.

Could you please compare it to a MetaTrader chart in order to confirm that it looks right?

If it is correct, I will finish the indicator and publish it in the downloads.


Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
  #4 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,600 received
Forum Reputation: Legendary

Chande-Kroll versus Chandelier Stop

The Chandelier Stop is based on a similar concept.

However, it does not require a lookback period for determining the highest high and lowest low, as it uses the highest high since the last trend change.

The chart below shows a comparison between the Chande-Kroll Stop and the Chandelier Stop (which was used by systems trader Charles LeBeau and has nothing to do with Tushar Chande).


Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
The following 4 users say Thank You to Fat Tails for this post:
 
  #5 (permalink)
Elite Member
Overijssel
 
Futures Experience: Master
Platform: Ninja
Favorite Futures: FDAX
 
Posts: 14 since Aug 2010
Thanks: 3 given, 1 received

Hi Fat Tails,

Yes this looks greath. 100% Perfect.

Thanks for helping the code converting.

Chade kroll stop are a very good indicator. I could find it for Ninjatrader.

Thanks again.

Martien

Reply With Quote
 
  #6 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,600 received
Forum Reputation: Legendary


Realtimetrader View Post
Hi Fat Tails,

Yes this looks greath. 100% Perfect.

Thanks for helping the code converting.

Chade kroll stop are a very good indicator. I could find it for Ninjatrader.

Thanks again.

Martien


If you found it, was the ATR calculation based on a SMA of the true range (as Chande & Kroll) or was it based on an exponential moving average (classic or Wilder)?

Reply With Quote
 
  #7 (permalink)
Elite Member
Overijssel
 
Futures Experience: Master
Platform: Ninja
Favorite Futures: FDAX
 
Posts: 14 since Aug 2010
Thanks: 3 given, 1 received


Fat Tails View Post
If you found it, was the ATR calculation based on a SMA of the true range (as Chande & Kroll) or was it based on an exponential moving average (classic or Wilder)?


I've used in the past ProRealTime. In that program are the Chande Kroll Stop indicator.

https://www.prorealtime.com/en/

I can not give 100% certainty answer your question. What I do know is that the lines of this Chande Kroll Stop sometimes suddenly comes to lie above or below the rates. This is often a signal for a trend change. I have often thought that this indicator ProRealTime volume was related.

You can take a free subscription (day close dates) on ProRealTime to see the version of this Chande Kroll Stop.

I will send you a screenshot of it (Prorealtime)

Send you later.

Reply With Quote
 
  #8 (permalink)
Elite Member
Overijssel
 
Futures Experience: Master
Platform: Ninja
Favorite Futures: FDAX
 
Posts: 14 since Aug 2010
Thanks: 3 given, 1 received


Realtimetrader View Post
I've used in the past ProRealTime. In that program are the Chande Kroll Stop indicator.

https://www.prorealtime.com/en/

I can not give 100% certainty answer your question. What I do know is that the lines of this Chande Kroll Stop sometimes suddenly comes to lie above or below the rates. This is often a signal for a trend change. I have often thought that this indicator ProRealTime volume was related.

You can take a free subscription (day close dates) on ProRealTime to see the version of this Chande Kroll Stop.

I will send you a screenshot of it (Prorealtime)

Send you later.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
 
  #9 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,600 received
Forum Reputation: Legendary

The NinjaTrader chart looks similar. I will finish the indicator and post it.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
 
  #10 (permalink)
Elite Member
Overijssel
 
Futures Experience: Master
Platform: Ninja
Favorite Futures: FDAX
 
Posts: 14 since Aug 2010
Thanks: 3 given, 1 received



Fat Tails View Post
The NinjaTrader chart looks similar. I will finish the indicator and post it.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Oke thanks for progam this indicator. I am with this !!!!

Greatings,

Martien

Reply With Quote

Reply



futures io > > > > Convert MQ4 to Ninjatrader

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mq4 indicator Conversion To Ninjatrader 7 stef NinjaTrader Programming 1 June 22nd, 2015 09:49 AM
MQ4 to Ninjatrader conversion bryce NinjaTrader Programming 37 September 4th, 2014 05:22 PM
[help] Still unable to convert this MQ4 indicator to Thinkscript Ardian1899 ThinkOrSwim Programming 0 July 3rd, 2014 06:10 AM
Convert MQ4 indicator to Ninjascript rookietrader11 NinjaTrader Programming 3 May 3rd, 2013 06:35 PM


All times are GMT -4. The time now is 08:40 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-12 in 0.24 seconds with 40 queries on phoenix via your IP 54.90.207.75