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)
This is a general question regarding indicators, but wanted to find out why someone couldn't just combine 2 of the indicators into one. For instance, I was trying to combine the Darvas and DynamicSRLines indicators into one indicator and wondering why it wouldn't be as simple as combining the code together into one. When I moved the 'variables' and 'properties' of one indicator over into the other indicator and compile, I get no errors, but when I move the 'OnBarUpdate' information over, I get errors, most pertaining to error code CS1519.
I'm new to coding and don't know how the syntax works well, but was trying to figure out why consolidating the code into one indicator doesn't work like I thought it would.
My rationale for trying to combine the 2 indicators was to figure out how to draw a Darvas box around a resting period to set-up for a possible trade up or down. I couldn't find an indicator that did this, and was trying to figure out a way to show this without the continuous drawing. I have included 2 examples of what I'm trying to accomplish.
I'm aware that more would need to be done to fine tune the indicator, but just trying to get this to draw boxes around resting periods, sideways areas. Any advice or help in pointing me in the direction to create this indicator would be greatly appreciated. Thanks.
Below are my parameters based on trading crude:
1) Once Equal or Lower highs are created, begin creating box at first equal or lower high if at least the next 3 bars are formed fit this criteria.
2) Minimum number of ticks to start creating box - 10 ticks
3) Maximum number of ticks to start creating box - 25 ticks
4) Mark the boxes high or low point if the next 3 bars make LH/HL
5) Once the next bar breaks above/below the box, signal long/short trade.
I'm just trying to make the Ninja Darvas indicator a little less noisy.
Hey Cory. Thanks for the attachment. I just have one question about the attachment since I'm still trying to understand how to look at and create code Was I suppose to change the value portion of the code based on the indicator you attached or did you do that when you inputted the value [2] and value [3] sections to the region variable code? I'm just wondering if there was something still needing to be done since when I tried to compile the code to add to my indicators, I still got the CS1519 error for the bottom portion of the OnBarUpdate section. I have attached a screenprint so you can see what I'm referring to. Thanks again for helping me get started on what I'm trying to create.
My apologies. The indicator does work, but didn't plot the SR Lines. I will work on it tomorrow to see if I can get the SR Lines to show up when the indicator is running. Thanks again for your help and getting me started in what I'm trying to do.
Ok. Now that I got some sleep, I can see what my confusion was last night in not seeing the indicator on my chart. I have attached a screenprint of the SRLines indicator I was trying to combine with the Darvas Box Indicator. I have also included the SRLines Indicator as well.
daynamicSR is more complex so I copy darvas code to dynamicSR, the is no value[0]..etc in SR so I don't have to change any number. Only thing you have to pay attention is in copying the whole #region over make sure the structure still looks the same, use +/- sign next to #region to maximize/minimize them to see which is where.
Thank you very much for your help again. It looks great. Now I just have to get the Darmas Boxes to plot like the boxes I created. I took the 2 positions in CL in the SIM account based on the indicators I have included and got 50+ tick runs in both directions. I have included the screen print for everyone's review. Thanks again, you rock.
in order to look like a fantastic indicator it has to adjust/repaint to accommodate new high, new low as market prints more and more bars, nothing to do.