REQ: Can Someone Please Just Tweak A Code Line Here?

everything that doesn't belong elsewhere cometh here

Moderator: moderators

Gauer
rank: <50 posts
rank: <50 posts
Posts: 13
Joined: Wed Nov 21, 2018 4:30 pm
Reputation: 10
Gender: None specified

REQ: Can Someone Please Just Tweak A Code Line Here?

Postby Gauer » Thu Dec 06, 2018 11:00 pm

Hey guys, don't know if this is the right forum to place a request, but here it goes.

I have this indicator here which I found at forexfactory called zigzag counter, which displays the total volume of each leg of the zigzag.

What I wanted was for it to show the AVERAGE volume of each leg, not the total sum. Because the total sum does not give a real reading, for example, if you have one up swing with a leg formed by 4 bars, each bar with 2000 volume so total 8000, then you have a down swing with a leg made of 3 bars, two bars with 3000 and one with 2000, also with 8000 total. You would think that it has the same power that the up leg, but no, it is more powerful, it has 33% more power, in this case, if you calculate the average. up leg 8000/4 = 2000, down leg 8000/3 = 2.666

Can someone please tweak this indicator? I think it is easy, you just need to remove the code for summing and replace with a division code, for it to divide the total volume of the leg by the numbers of bars of the leg.

Thanks a lot!
Attachments
zigzag_counter-mod.mq4
(11.17 KiB) Downloaded 197 times

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

Gauer
rank: <50 posts
rank: <50 posts
Posts: 13
Joined: Wed Nov 21, 2018 4:30 pm
Reputation: 10
Gender: None specified

Re: REQ: Can Someone Please Just Tweak A Code Line Here?

Postby Gauer » Sat Dec 08, 2018 12:26 am

Hi there,

Someone told me I need to change line 81 of this indicator to:

string Str = (string)(vol / (Nbar1 - Nbar2)); //string Str=vol;

Then it will show the average volume of the legs instead of total sum. But seriously, I am no coder, I have no clue of how and in which software open this file, find line 81 and then save the file the right way.

If you know how to do that, please, it will take LESS THAN A MINUTE of your life, and the indicator is great for VSA analysis.

Thanks

User avatar
dojirock
rank: 1000+ posts
rank: 1000+ posts
Posts: 1921
Joined: Tue Nov 17, 2009 10:11 pm
Reputation: 726
Gender: None specified
Contact:

Re: REQ: Can Someone Please Just Tweak A Code Line Here?

Postby dojirock » Sat Dec 08, 2018 3:16 am

Try this.

dojirock
Attachments
zigzag_counter-mod.mq4
(11.31 KiB) Downloaded 191 times
It always takes Momentum to break Momentum!
"A small loss is just as satisfying as a large gain" -MO
"Sometimes we need to stop learning and start thinking...."
"Once you stack, you'll never go back!"

Gauer
rank: <50 posts
rank: <50 posts
Posts: 13
Joined: Wed Nov 21, 2018 4:30 pm
Reputation: 10
Gender: None specified

Re: REQ: Can Someone Please Just Tweak A Code Line Here?

Postby Gauer » Sat Dec 08, 2018 10:23 am

dojirock wrote:Try this.

dojirock



Thanks dojirock, you are the best! :)

=D>

God Bless!

User avatar
Leoheart
rank: 150+ posts
rank: 150+ posts
Posts: 446
Joined: Thu Feb 23, 2017 10:54 pm
Reputation: 416
Gender: None specified

Re: REQ: Can Someone Please Just Tweak A Code Line Here?

Postby Leoheart » Sat Dec 08, 2018 4:01 pm

Gauer wrote:Hey guys, don't know if this is the right forum to place a request, but here it goes.

I have this indicator here which I found at forexfactory called zigzag counter, which displays the total volume of each leg of the zigzag.

What I wanted was for it to show the AVERAGE volume of each leg, not the total sum. Because the total sum does not give a real reading, for example, if you have one up swing with a leg formed by 4 bars, each bar with 2000 volume so total 8000, then you have a down swing with a leg made of 3 bars, two bars with 3000 and one with 2000, also with 8000 total. You would think that it has the same power that the up leg, but no, it is more powerful, it has 33% more power, in this case, if you calculate the average. up leg 8000/4 = 2000, down leg 8000/3 = 2.666

Can someone please tweak this indicator? I think it is easy, you just need to remove the code for summing and replace with a division code, for it to divide the total volume of the leg by the numbers of bars of the leg.

Thanks a lot!


Curiosity drop kicked the cat. Hey Man, I like the way you think. Now that you are all set - Thanks Dojirock, Can you show us what you see on the charts? Interesting stuff.

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

Gauer
rank: <50 posts
rank: <50 posts
Posts: 13
Joined: Wed Nov 21, 2018 4:30 pm
Reputation: 10
Gender: None specified

Re: REQ: Can Someone Please Just Tweak A Code Line Here?

Postby Gauer » Sat Dec 08, 2018 4:28 pm

Google for a book called "The Secret Science of Price and Volume" by Tim Ord. I was studying more about volume after I became a VSA and Wyckoff nerd. Very good book. He created this indicator which he calls Ord Volume which is basically a zigzag with leg counter, but instead of giving the cumulative value of the leg (like the Weis Wave), it gives the average of the leg, which shows true power. Then you can clearly see the imbalances of supply and demand, which are the forces that drive the market. You can see when you are approaching a top, when the energy of the move is fading and switching to the other side.

User avatar
Mira
rank: 1000+ posts
rank: 1000+ posts
Posts: 1729
Joined: Thu Nov 10, 2016 8:37 pm
Reputation: 1608
Gender: None specified
Contact:

Re: REQ: Can Someone Please Just Tweak A Code Line Here?

Postby Mira » Mon Dec 10, 2018 8:53 am

Gauer wrote:Google for a book called "The Secret Science of Price and Volume" by Tim Ord. I was studying more about volume after I became a VSA and Wyckoff nerd. Very good book. He created this indicator which he calls Ord Volume which is basically a zigzag with leg counter, but instead of giving the cumulative value of the leg (like the Weis Wave), it gives the average of the leg, which shows true power. Then you can clearly see the imbalances of supply and demand, which are the forces that drive the market. You can see when you are approaching a top, when the energy of the move is fading and switching to the other side.



Intriguing :mrgreen:
__________ THE :smt096 IS A LIE__________

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 15555
Joined: Sun May 14, 2006 9:31 pm
Reputation: 3035
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Re: REQ: Can Someone Please Just Tweak A Code Line Here?

Postby TheRumpledOne » Mon Dec 10, 2018 5:29 pm

there you go....
Attachments
zigzag_counter-mod.mq4
(11.31 KiB) Downloaded 224 times
IT'S NOT WHAT YOU TRADE, IT'S HOW YOU TRADE IT!

Please do NOT PM me with trading or coding questions, post them in a thread.

Gauer
rank: <50 posts
rank: <50 posts
Posts: 13
Joined: Wed Nov 21, 2018 4:30 pm
Reputation: 10
Gender: None specified

Re: REQ: Can Someone Please Just Tweak A Code Line Here?

Postby Gauer » Mon Dec 10, 2018 10:27 pm

TheRumpledOne wrote:there you go....


Thanks brother! God Bless. =D>

User avatar
paulcarissimo
rank: <50 posts
rank: <50 posts
Posts: 7
Joined: Mon Mar 25, 2019 11:28 pm
Reputation: 1
Location: Kampala, Uganda
Gender: Male

Re: REQ: Can Someone Please Just Tweak A Code Line Here?

Postby paulcarissimo » Sun Mar 31, 2019 7:03 pm

TheRumpledOne wrote:there you go....


Hello @TheRumpledOne, may I request a modification to the indicator you posted ? it wont take a minute of your time....

After reading an article of "stocks and commodities" magazine, Tim Ord posted some pictures which instead of showing the volume at the lows and highs , showed the percentage of volume and in addition is volume % in the middle of the leg(which I assume is continuously updated as price moves along).

I've tried to modify the indicator myself, however I keep getting wrong values;
The changes I request are as follows,
1. volume % instead of volume itself.
2. volume % in the middle of the leg as it moves along

Thanks for your help in advance if you do decide to tweak it. Please see the attachment.
Attachments
ord.PNG
ord.PNG (159.56 KiB) Viewed 4037 times
"Learning is Like Rowing Upstream; Not to Advance is to Fall Back"
学習は上流漕ぎのようなものです。前進しないことは後退することです

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.


Return to “general”