Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
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.
Can you help answer these questions from other members on NexusFi?
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:
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:
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:
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.
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.
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.
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.