Visual backtest in Ninja Trader - NinjaTrader | futures io social day trading
futures io futures trading


Visual backtest in Ninja Trader
Updated: Views / Replies:2,873 / 10
Created: by peglegtrading Attachments:3

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
 3  
 
Thread Tools Search this Thread
 

Visual backtest in Ninja Trader

  #1 (permalink)
Trading for Fun
ho chi minh city
 
Futures Experience: Intermediate
Platform: Metatrader 4
Favorite Futures: Forex
 
Posts: 52 since Mar 2011
Thanks: 16 given, 9 received

Visual backtest in Ninja Trader

What is the best way to visually backtest an indicator? Is there some marking arrow function which will stamp the price on the chart? I know it's rather rudimentary but I have no programming skills to work with so this is the best I can do for now.

Reply With Quote
 
  #2 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received

Answer
This post has been selected as an answer to the original posters question Answer


peglegtrading View Post
What is the best way to visually backtest an indicator? Is there some marking arrow function which will stamp the price on the chart? I know it's rather rudimentary but I have no programming skills to work with so this is the best I can do for now.

Not sure how much of an explanation you wanted, but here is a very BASIC way to accomplish what you want and is a very simple example.

If you wanted to do this, you would need to create an arrow via NT script to plot based on some conditions you want to test. For example if you wanted to test a MACD crossing above 0, you would write a script with the following lines of code:
 
Code
if(  MACD(34,89,9).Value[0] > 0 &&  MACD(34,89,9).Value[1] < 0)
  {
      DrawArrowUp("arrow"+CurrentBar, true, 0, Low[0]-12*TickSize, Color.Green);
   }

That is just the entry. Say you wanted to exit when the MACD crosses back below 0. I like to plot a different chart marker for my exits so I use an opposing direction triangle. You would add this line of code:
 
Code
if(  MACD(34,89,9).Value[0] < 0 &&  MACD(34,89,9).Value[1] > 0)
  {
     DrawTriangleDown("arrow"+CurrentBar, true, 0, High[0]+12*TickSize, Color.Black);
   }
You could also print the closing price of the bar with the arrow there by appending the first statement above with this "DrawText" line to print the price so it will be easier to see:
 
Code
if(  MACD(34,89,9).Value[0] > 0 &&  MACD(34,89,9).Value[1] < 0)
  {
      DrawArrowUp("arrow"+CurrentBar, true, 0, Low[0]-12*TickSize, Color.Green);
      DrawText("text0"+CurrentBar, ""+Close.ToString(), 0, Low[0]-30*TickSize, Color.Black);
   }

You also want to set a flag so that your script knows weather or not a trade has been triggered.... but for the purposes of this example, since we are just using the 0 crossing of an oscillator, it knows long if above zero, and flat if below.

Attached is what that looks like on a chart.

Attached Thumbnails
Visual backtest in Ninja Trader-prime2011-09-23_052836.png  

Last edited by forrestang; September 23rd, 2011 at 07:42 AM.
Reply With Quote
 
  #3 (permalink)
Trading for Fun
ho chi minh city
 
Futures Experience: Intermediate
Platform: Metatrader 4
Favorite Futures: Forex
 
Posts: 52 since Mar 2011
Thanks: 16 given, 9 received


Basically why I ask is that I want to create a visual backtest using the following indicators when they are in trend mode. The reason I ask just for a visual backtest is that I am not sure if the past two days are extremely trendy or if I found some really sweet combination of entries and exits.

JeffsADXv2
HeikenAshi
EMA_Colors_V3_No_Repaint_Bars

When they are all signalling together just follow the trend.

Huge results the past two days.

Reply With Quote
 
  #4 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received

Well, as far as programming this goes, you would have to be more specific on how you want these things to work.

Initially it sounded like you wanted explicit entry/exit signals painted on your chart?

It sounds like now what you are wanting is more of a 'trendMeter' of sorts based on those 3 indicators being up or down.

But at any rate, you would need to provide more definition on what conditions EACH of these 3 indicators would be displaying individually, that would make up the sum of your trend definition.

Reply With Quote
 
  #5 (permalink)
Trading for Fun
ho chi minh city
 
Futures Experience: Intermediate
Platform: Metatrader 4
Favorite Futures: Forex
 
Posts: 52 since Mar 2011
Thanks: 16 given, 9 received


forrestang View Post
Well, as far as programming this goes, you would have to be more specific on how you want these things to work.

Initially it sounded like you wanted explicit entry/exit signals painted on your chart?

It sounds like now what you are wanting is more of a 'trendMeter' of sorts based on those 3 indicators being up or down.

But at any rate, you would need to provide more definition on what conditions EACH of these 3 indicators would be displaying individually, that would make up the sum of your trend definition.

Yes, it seems my original idea is much more about an indicator than a "backtest." Apologies for being so vague.

As you can see from the screenshot, if the heiken ashi bar is red, the adx indicator is blue and the ema slope bars are red, that would be a good time to short.

For long the Heiken Ashi would be Yellow, the Adx blue and the EMA Slope Green.

I actually tried to do this in strategy mode using the bool command (these are all true false conditions) but I got stopped at the beginning when it asked for the input series and I didn't know how to tell it what to do.

Anyways, I feel like I should pay someone to do this or at least find someone to pay to teach me, this seems like awfully tedious work for someone who actually knows how to program on ninjatrader.

Attached Thumbnails
Visual backtest in Ninja Trader-tf-12-11-8-range-9_23_2011-short.jpg   Visual backtest in Ninja Trader-tf-12-11-8-range-9_23_2011long.jpg  
Reply With Quote
 
  #6 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received


peglegtrading View Post
Yes, it seems my original idea is much more about an indicator than a "backtest." Apologies for being so vague.

As you can see from the screenshot, if the heiken ashi bar is red, the adx indicator is blue and the ema slope bars are red, that would be a good time to short.

For long the Heiken Ashi would be Yellow, the Adx blue and the EMA Slope Green.

I actually tried to do this in strategy mode using the bool command (these are all true false conditions) but I got stopped at the beginning when it asked for the input series and I didn't know how to tell it what to do.

Anyways, I feel like I should pay someone to do this or at least find someone to pay to teach me, this seems like awfully tedious work for someone who actually knows how to program on ninjatrader.

This isn't complicated at all to accomplish. Post the links to the indicators you are currently using so that I can download the ones you are using.

Reply With Quote
 
  #7 (permalink)
Trading for Fun
ho chi minh city
 
Futures Experience: Intermediate
Platform: Metatrader 4
Favorite Futures: Forex
 
Posts: 52 since Mar 2011
Thanks: 16 given, 9 received


forrestang View Post
This isn't complicated at all to accomplish. Post the links to the indicators you are currently using so that I can download the ones you are using.

I have gone ahead and pm'd you the indicators as one of them cannot be found on the elite section but I am almost certain I found it there.

I think the big deal about this combination is that it has 2 indicators which deal with nothing but avoiding chop. Not that they avoid it but they seem to put the odds in your favor when you trade high volume times of day (or night in my case).

Also keep in mind that the signal for the bar must be in alignment with the trend. So if it's a buy signal the close of the signal bar should be bullish (a close higher than it opens) and reversed for a bearish signal. The OHLC bars are extremely useful for alerting us to this.

Although I am completely new to NinjaTrader I have been with Metatrader for more than 5 years so I have a pretty good idea about trading Forex. I am really tired of bad brokers though so I am trying to transition to a more open market, namely futures markets.


Last edited by peglegtrading; September 23rd, 2011 at 09:52 AM.
Reply With Quote
 
  #8 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received

So do you want an up arrow on the chart when all these conditions are true and vice versa for a short?

Or do you want a meter of sorts that for example is green when all of these conditions are true and red for short?

You have defined so far to trend states.... either up where all of these conditions are true, and dn when the reverse of these conditions are true.

If say two of 3 of these criteria are true, does this put it into a third state where say the trend meter would be yellow?

Do this, mark up a chart with these indicators of what you want to see on your chart with the indicators on them when your conditions are met.

Either you plot an arrow, or you just have a meter on the bottom of the price panel showing the color of your desired state.

Reply With Quote
 
  #9 (permalink)
Trading Apprentice
Frankfurt/Main
 
Futures Experience: Advanced
Platform: MultiCharts
Favorite Futures: ES, EC, CL
 
Posts: 1 since Jun 2011
Thanks: 1 given, 0 received

Edit Test

Thanks for your PM answer.

Reply With Quote
 
  #10 (permalink)
Trading for Fun
ho chi minh city
 
Futures Experience: Intermediate
Platform: Metatrader 4
Favorite Futures: Forex
 
Posts: 52 since Mar 2011
Thanks: 16 given, 9 received



cyberspy View Post
Thanks for your PM answer.

I sent the PM to the wrong guy? Confused...

Reply With Quote

Reply



futures io > > > > Visual backtest in Ninja Trader

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ninja Trader and Australia Treggs NinjaTrader 17 January 30th, 2015 10:29 PM
Ninja Trader chart trader toggle? GaryD NinjaTrader 5 December 17th, 2011 12:40 AM
First Time Ninja Trader Runner4 NinjaTrader 5 August 29th, 2011 05:46 PM
Ninja Trader 7.0 keeps crashing MrBean NinjaTrader 5 November 23rd, 2010 05:03 AM
how to use ninja trader 6.5 abdul NinjaTrader 1 May 24th, 2010 04:18 PM


All times are GMT -4. The time now is 10:27 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-15 in 0.16 seconds with 40 queries on phoenix via your IP 54.221.76.68