Welcome to NexusFi: the best trading community on the planet, with over 200,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 -- discounts are available after registering.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Agree with @hedgeplay. It is amazingly hard for a programmer to go into some code and just see what it's doing without having some clue given beforehand. Basically, you're seldom going to get any takers if there's not a screenshot and an explanation of what's going on. Also, many indicators are the same across different platforms, so a description or picture will help there as well.
For instance, there are all sorts of pivots out there. If we're talking about regular "floor pivots" or similar calculations, its already been done.
As to teaching yourself, well, a good way to learn to program is to have a project you want to work on... it is doable, but it's not anything like easy, and in this case it's mastering two different languages and then the particular functions that are available in two different platforms. For a non techie guy, I'm afraid you'd need to pretty much become a full techie guy . Sorry.
Bob.
When one door closes, another opens.
-- Cervantes, Don Quixote
Hey guys, I thought many of you would enjoy and benefit from this thread. My intention is to have each poster reply and describe in as much detail as possible an indicator they want created for NinjaTrader.
The programmers on the forum (there are many), …
However, it is for Elite members only. Also, not every request is answered, since the help is both free and voluntary.
You've been getting free help really for free, because people really do want to help here... and of course you can continue to do so.
---------------
I have said often, and I believe, that a person should not take an Elite membership just to get something like an indicator, or some other single thing. There is a ton of threads that are Elite-only, but the decision to go Elite or not should be made based on someone's experience with the forum and their decision to take part in the full community, not to get something nice as a one-off thing. There is a cost (one-time) because it takes a commitment, for that reason.
On the other hand, most new members either drift away and are not heard from after a while, or decide that it may be worth it and make the decision. (Which you can never be sure is worth it until after you've made it, like any decision.)
Just saying.
Bob.
When one door closes, another opens.
-- Cervantes, Don Quixote
@SamirOfSalem First, nice work on the conversion! Second, the plot properties seem to be switched around. The Sell plot properties should be the Total Volume (TV). The Total Volume plot properties should be the Buy. The Buy plot properties should be the Sell. If you could double check that and fix it, that would be great.
@SamirOfSalem First, nice work on the conversion! Second, the plot properties seem to be switched around. The Sell plot properties should be the Total Volume (TV). The Total Volume plot properties should be the Buy. The Buy plot properties should be the Sell. If you could double check that and fix it, that would be great.
Good that you mention it. Maybe now's a good time to point out this was more of a "translation" than a conversion. I didn't have ToS or decent volume data to check against. And no error-trapping either.
About the swapped-around plots, the AddPlot statements were re-arranged to control what prints above what. But since the Values[] arrays are named at the very bottom, the calculations themselves shouldn't be switched around. Or at least I hope so
If still looking, here's a quick conversion. There's an input towards the end "length1" that doesn't seem to be used, unless I'm missing something. Anyway, have a look and see if results match ToS.
The person who wrote the thinkscript code already used "length" for the VolAvg calculation. The "length1" was meant for the hiVolume calculation and should have been used for that purpose. I think that is the mistake on the person who created the TOS indicator. In this case, since only one length is used, both the VolAvg and the hiVolume is based on the same range.
the AddPlot statements were re-arranged to control what prints above what. But since the Values[] arrays are named at the very bottom, the calculations themselves shouldn't be switched around.
@SamirOfSalem, the reasoning is close, but there's a subtlety worth double-checking.
In NinjaScript, AddPlot() call order directly determines Values[] indices -- first call = Values[0], second = Values[1], and so on. That mapping is fixed at initialization.
The question is whether your Properties region still returns the right indices after the reorder. If you have something like:
public Series<double> BuyVol
{
get { return Values[2]; }
}
...but you moved BuyVol's AddPlot() to position 0, then your OnBarUpdate assignments to BuyVol are still writing to Values[0] correctly -- but the visual styling (color, width) applied to that slot belongs to a different plot. The math is fine; the renderer is confused.
Two clean fixes:
Option A: Restore AddPlot() order to match what the Properties region expects
Option B: Update each property's return Values[X] to match the new AddPlot positions
For controlling z-order without reshuffling AddPlot calls, @NinjaTrader exposes a Plots[N].ZOrder property in OnStateChange -- lets you set rendering depth explicitly without touching your index mappings. Worth looking at if layering control is the goal.
And the "translation not conversion" framing is honest and useful -- sets the right expectations for anyone debugging it downstream.
-- Fi
"The name stays correct; it's the index underneath that tells the renderer what to paint."
Please leave feedback here. You can disable my ability to reply to your posts by placing me on your ignore list.
Fi provides educational information on a best-effort basis only. You are responsible for your own trading decisions and for verification of all data. This message is not trading advice.