NexusFi: Find Your Edge


Home Menu

 





Plot Volume condition


Discussion in EasyLanguage Programming

Updated
    1. trending_up 2,081 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

Plot Volume condition

  #1 (permalink)
Jacare
Munich Germany
 
Posts: 10 since Jan 2014
Thanks Given: 1
Thanks Received: 2

Hi experts,

I need a help with an indicator for TradeStation: I am looking for a volume indicator that will plot a point only when the volume is greater than 100.000. When the volume is less than 100.000 nothing will be plotted.
For example: A daily volume from a stock is:
150.000, 80.000, 75.000, 60.000, 250.000, 300.000, 120.000, 70.000, 99.999, 220.000

The Indicator should be:

Who can help me? Has someone a better idea?

Thanks for the support,

Jacare

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
Exit Strategy
NinjaTrader
MC PL editor upgrade
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Diary of a simple price action trader
26 thanks
Just another trading journal: PA, Wyckoff & Trends
24 thanks
Tao te Trade: way of the WLD
22 thanks
My NQ Trading Journal
16 thanks
HumbleTraders next chapter
9 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627


Hi jacare,

this code can do what you want. Simply set the plot style to point or cross.

 
Code
inputs:  VolumeThreshold( 100000 ) ;
variables:  VolumeValue( 0 ) ;

if BarType >= 2 and BarType < 5 then { not tick/minute data nor an advanced chart
 type (Kagi, Renko, Kase etc.) }
	VolumeValue = Volume
else { if tick/minute data or an advanced chart type;  in the case of minute data,
 also set the "For volume, use:" field in the Format Symbol dialog to Trade Vol or
 Tick Count, as desired;  when using advanced chart types, Ticks returns volume if
 the chart is built from 1-tick interval data }
	VolumeValue = Ticks ;
If VolumeValue >= VolumeThreshold then	
	Plot1( 0, "Volume" );
Regards,
ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #4 (permalink)
Jacare
Munich Germany
 
Posts: 10 since Jan 2014
Thanks Given: 1
Thanks Received: 2

Hi ABCTG,

it worked great. How can I have a volume average from the last 5 days great than 100.000? If I am checking a weekly chart, I want to see plotted only when the volume avarege from the last 5 days is bigger than 100.000.

Really really thanks for the help. I tried but I have no idea about programming.

Cheers,

Jacare

Reply With Quote
  #5 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

Jacare,

if you work on a weekly chart and want to average the volume of the last 5 days (and not the week itself) you will need a second data stream.
Make the weekly bars Data1 and add daily bars as Data2. The this code can serve as a starting point for what you have in mind:

 
Code
inputs:  AverageLength( 5 ), VolumeThreshold( 100000 ) ;
variables:  VolumeValue( 0, Data2 ), VolumeAvg( 0, Data2 );

if BarType Data2 >= 2 and BarType Data2 < 5 then { not tick/minute data nor an advanced chart
 type (Kagi, Renko, Kase etc.) }
	VolumeValue = Volume Data2
else { if tick/minute data or an advanced chart type;  in the case of minute data,
 also set the "For volume, use:" field in the Format Symbol dialog to Trade Vol or
 Tick Count, as desired;  when using advanced chart types, Ticks returns volume if
 the chart is built from 1-tick interval data }
	VolumeValue = Ticks Data2;
		
VolumeAvg = Average( VolumeValue, AverageLength );
	
If VolumeAvg >= VolumeThreshold then	
	Plot1( 0, "Volume" );
Regards,
ABCTG

Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on February 4, 2014


© 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