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)
**I was going to place this as private message, but this may help others in the forum, so I am posting this in a public thread.**
My name is Jake, I am brand new to future.io and brand new to programming/ninja script.
I have pretty much zero experience with ninja script or coding in general. I found out about programming ninja script maybe a few weeks ago and I am very excited to learn.
First off - Thank you for uploading your indicator I am sure it will help a lot of us here in the forums reach new heights in our trading!
I'm hoping you [or another expert] can help me or point me in the right direction:
I have NT 8 and I recently downloaded your indicator SupDemZones. I gotta say that is some impressive coding skills. It's a great indicator, and it's exactly what I needed for a strategy I want to build.
The problem: I don't know how to call it in the strategy. for example, I am attempting to add it onto my screen:
else if (State == State.DataLoaded)
{ //begin state.dataloaded
//here is where you can add indicators and visuals to charts
AddChartIndicator(SupDemZones(Input, useMTF, barType, barPeriod, demandColor, supplyColor, activeLineOpacity, activeAreaOpacity, brokenLineOpacity, brokenAreaOpacity, lineWidth, extendZones, hideActiveZones, hideBrokenZones, indicatorVersion));
and I get a compile error: Indicator 'SupDemZones': Error on calling 'OnStateChange' method: Object reference not set to an instance of an object.
not sure what that means. Any ideas?
Also - If I want to get values of the demand zone that just appeared: ie - demandzone[0] and get the high and low values of it, how would I do that?
i.e. - i.e. - Variable1 = demandzone[0].high, variable2 = demandzone[0].Low
I am not sure of the syntax here for this indicator.
Also - Would it be possible for you to help me out by sending me the syntax or a reference/location/website where i can find out if the zones have been tested already or not for this particular indicator?
i.e.- bool ZoneTested (set to false if no retests, set true if retested already).
Again, not sure of the syntax here.
For my strategy, I only want to set an entry in a zone that is going with the direction, preferrably EARLY in the direction, and zone is UNTESTED.
I have updated NT7 to NT8 and was looking mkSupDemZones for NT8. As you have mentioned that you have downloaded for NT8.
Could you please forward the link where to find the mkSupDemZones for NT8 or attach the indicator file.
1. If the high of a active supply zone is below EMA enter short with a limit order at the low of the supply zone.
2. If the low of a active demand zone is above EMA enter long with a limit order at the high of the demand zone.
3. If long, stop loss is 1 tick below the demand zone.
4. If short, stop loss is 1 tick above the supply zone zone.
5. Profit target is twice the risk.
The EMA filter for longs or shorts is optional to enable or disable. Enjoy and lmk if you want me to make different rules for it.
***To run the strategy, you may have to remove the original SupDemZones indicator from NT8 as the strategy includes the indicator within it and some identical methods conflict. If there's enough interest I may try to fix the issue.
Could you not modify the original indicator (SupDemZones) in order to expose the most recent zone above price or below price to make your strategy less complicated and easier to read?
Can you clarify further what you mean by expose? In the original indicator the active zones are more saturated and less translucent than the broken zones. The nearest active zones are the zones the next trade will use as a entry and exit calculations in the basic strategy I provided.
Honestly the only reason you may have to remove the original indicator file if you already have it is because the only reasonable way I found to create a strategy from it was from embedding the strategy within the indicator itself. I’m sure a better coder would know how to do it more efficiently.
If you just want to know where I added the strategy logic let me know and I can give you the line numbers.