NexusFi: Find Your Edge


Home Menu

 





Plot Volume condition


Discussion in EasyLanguage Programming

Updated
    1. trending_up 2,090 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?
How to apply profiles
Traders Hideout
What broker to use for trading palladium futures
Commodities
Better Renko Gaps
The Elite Circle
REcommedations for programming help
Sierra Chart
About a successful futures trader who didnt know anythin …
Psychology and Money Management
 
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629


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,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

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