NexusFi: Find Your Edge


Home Menu

 





A little help with Marney Volume Indicator for MC


Discussion in EasyLanguage Programming

Updated
    1. trending_up 3,567 views
    2. thumb_up 4 thanks given
    3. group 1 followers
    1. forum 6 posts
    2. attach_file 5 attachments




 
Search this Thread

A little help with Marney Volume Indicator for MC

(login for full post details)
  #1 (permalink)
 
Laurus12's Avatar
 Laurus12 
Norway
 
Experience: Advanced
Platform: MultiCharts, CQG, NinjaTrader
Broker: CQG, DTN IQFeed
Trading: EURO
Posts: 376 since Nov 2010
Thanks Given: 562
Thanks Received: 363

I am wondering if someone could please help me with the layer order of the volume bars and time adjusted moving average in Marney's volume indicator. With the original code and MC the time adjusted moving average is in the back of the volume bars, but I would like to have it in the front.

I am aware that TS and MC has opposite layer order from which order the plotting is set up in the code, but with this indicator I am not able to figure out how to reverse it.

Another thing is that it is not possible to change the weight of the time adjusted average line. If this could be done something with, that would have been nice.

I have only added RGB color control to the code, which is not in the original code:

 
Code
{***********************************************}
{Marney Indicator(TM) - Marney Volume Indicator(TM)
Copyright Caspar Marney, Marney Capital 2010(C)} 
{***********************************************}

input: avgLen(25), mins.in.session(1440), autobars(False), upcolor(RGB(0, 140, 0)), dncolor(RGB(230, 0, 0));
var: start(0), end1(0), end2(0), x(0), p(-1), count(0), avg(0), barsinday(0), DayNumber(0); 
array: xv[199,1440](0);  
 
if bartype < 2 then begin 
 
start= (sessionstarttime(1,1)); 
end1= (sessionendtime(1,1)); 
end2= (sessionendtime(1,2)); 
 
value1 = timetominutes(start); 
value2 = timetominutes(end2); 
if start > end2 then 
value3 = 1440+(value2-value1); 
 
if start < end2 then 
	value3 = -(value1-value2); 
if autobars = false then value3 = mins.in.session; 
	 
barsinday = ceiling(value3/barinterval); 
 
 
if d<>d[1] then begin  
    if count=barsinday then begin  
        p=iff(p<avgLen-1,p+1,0);  
        for x=1 to barsinday begin  
            xv[p,x]=ticks[barsinday+1-x];  
        end;  
    end;  
    count=1;  
end else count=count+1;  

if xv[avgLen-1,count]>0 then begin  
    avg=0;  
    for x=0 to avgLen-1 begin  
        avg=avg+xv[x,count];  
    end;  
    avg=avg/avgLen;
   plot2(ticks,"ticks",default,1);
   plot1(avg,"avg",yellow,default,1);
end; 

if close > open then setplotcolor(2,upcolor); 
if close < open then setplotcolor(2,dncolor); 
 
end; 
 
if bartype > 1 then begin 
    avg = averagefc(v,avglen); 
    plot2(v,"ticks",default,1); 
    plot1(avg,"avg",yellow,default,1);
     
    if close > open then setplotcolor(2,upcolor); 
    if close < open then setplotcolor(2,dncolor); 
end;
Thanks,
Laurus

“If you wish to see the truth, then hold no opinions for or against anything.” - Hsin Hsin Ming
Attached Thumbnails
Click image for larger version

Name:	moving average to the front.png
Views:	298
Size:	6.3 KB
ID:	53607  
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trader Dale [email protected] or Scammer Dale
Trading Reviews and Vendors
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Request for MACD with option to use different MAs for fa …
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Tao te Trade: way of the WLD
30 thanks
Supertradersams Thread Journal on NQ/MNQ
25 thanks
Deaddogs Stock Trading
23 thanks
GFIs1 1 DAX trade per day journal
22 thanks
Daytrading ES & NQ
13 thanks

(login for full post details)
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Posts: 50,234 since Jun 2009
Thanks Given: 33,106
Thanks Received: 101,351


Maybe I am not understanding.... but if Plot2 is "on top of" Plot1, then why not just make Plot2 -> Plot1, and Plot1 -> Plot2.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor


For the best trading education, watch our webinars
Searching for trading reviews? Review this list


Lifetime Elite Membership: Sign-up for only $149 USD
Receive exclusive offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
The following user says Thank You to Big Mike for this post:
(login for full post details)
  #4 (permalink)
 
Laurus12's Avatar
 Laurus12 
Norway
 
Experience: Advanced
Platform: MultiCharts, CQG, NinjaTrader
Broker: CQG, DTN IQFeed
Trading: EURO
Posts: 376 since Nov 2010
Thanks Given: 562
Thanks Received: 363

Thank you for the reply Mike.

I have tried the normal layer order procedure, but for some reason I do not understand the coloring becomes wrong.

When I do like in the code below the average is on top and both the volume and the average displays correct values as shown in the attached picture, but as one can see the coloring is somewhat reversed. The insert settings is correct.

 
Code
avg=avg/avgLen; 
   plot1(ticks,"ticks",default,1);
   plot2(avg,"avg",black,default,1); 
end;
 
 
if close > open then setplotcolor(2,upcolor);
if close < open then setplotcolor(2,dncolor);
 
end;
 
if bartype > 1 then begin
       avg = averagefc(v,avglen);
       plot1(v,"ticks",default,1);
       plot2(avg,"avg",black,default,1);
               
if close > open then setplotcolor(2,upcolor);
if close < open then setplotcolor(2,dncolor);
 
end;
Laurus

“If you wish to see the truth, then hold no opinions for or against anything.” - Hsin Hsin Ming
Attached Thumbnails
Click image for larger version

Name:	average ok, but colors wrong.png
Views:	182
Size:	6.7 KB
ID:	53705  
Started this thread Reply With Quote
(login for full post details)
  #5 (permalink)
 
Laurus12's Avatar
 Laurus12 
Norway
 
Experience: Advanced
Platform: MultiCharts, CQG, NinjaTrader
Broker: CQG, DTN IQFeed
Trading: EURO
Posts: 376 since Nov 2010
Thanks Given: 562
Thanks Received: 363

For those interested in knowing some more about Caspar Marney's Volume and Range indicators I would recommend starting here.

Caspar Marney's website with more articles are here.

Note that Mr. Marney is mainly going into the relationship between actual trade volume and tick volume for Spot FX, but his indicators and the principle behind them can be used with other markets and volatility also.


Laurus

“If you wish to see the truth, then hold no opinions for or against anything.” - Hsin Hsin Ming
Started this thread Reply With Quote
(login for full post details)
  #6 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Posts: 50,234 since Jun 2009
Thanks Given: 33,106
Thanks Received: 101,351

the SetPlotColor() code would need to be updated to the new plots (2 --> 1, 1 --> 2). Also you need to be removing the indicator and re-adding it to MultiCharts, as changing Plots without doing so doesn't always work.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor


For the best trading education, watch our webinars
Searching for trading reviews? Review this list


Lifetime Elite Membership: Sign-up for only $149 USD
Receive exclusive offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
The following 2 users say Thank You to Big Mike for this post:
(login for full post details)
  #7 (permalink)
 
Laurus12's Avatar
 Laurus12 
Norway
 
Experience: Advanced
Platform: MultiCharts, CQG, NinjaTrader
Broker: CQG, DTN IQFeed
Trading: EURO
Posts: 376 since Nov 2010
Thanks Given: 562
Thanks Received: 363

Great! That's more like it. Thanks a lot Mike. Learned something new here.


Attaching both the Volume and Range indicators in "MC style" with the time adjusted moving average on top.

With Futures one have to set "autobars" to "true". Then for the FX futures I have set average to 24 periods and "mins.in.session" to 1380.

Unfortunately the indicators are only meant to be used with 60 minute bars. From what I have read Mr. Marney has not come up with a solution for like 15 and 5 minute bars yet.


Laurus

“If you wish to see the truth, then hold no opinions for or against anything.” - Hsin Hsin Ming
Attached Thumbnails
Click image for larger version

Name:	Marney Volume and EURO.png
Views:	214
Size:	11.7 KB
ID:	53928  
Attached Files
Register to download File Type: pla _Marney Volume Indicator.pla (5.6 KB, 31 views)
Register to download File Type: pla _Marney Range Indicator.pla (5.6 KB, 25 views)
Started this thread Reply With Quote
The following user says Thank You to Laurus12 for this post:





Last Updated on November 2, 2011


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts