NexusFi: Find Your Edge


Home Menu

 





Shaved Bar Indicator for Tradestation?


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one lselalum with 8 posts (1 thanks)
    2. looks_two ABCTG with 4 posts (1 thanks)
    3. looks_3 kronie with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 6,400 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 10 posts
    2. attach_file 0 attachments




 
Search this Thread

Shaved Bar Indicator for Tradestation?

  #1 (permalink)
lselalum
Houston, Texas/USA
 
Posts: 5 since Jul 2013
Thanks Given: 1
Thanks Received: 1

Hi all,

I have tried to code a Show Me alert that shows up when the close of the candle is within 5% of the high or low of the same candle. I thought I could modify the existing Doji "Show Me" but somehow I messed it up. The alert should ignore doji candles (open=close), and should not consider the other wick (ie. bull candle only checks the upper wick, bear candle only checks the lower wick. This indicator seems to exist in mq4 but I can't find it for Easy Language and cant seem to get it right.


If any of you have thoughts on how I could code this or have the code yourself I would really appreciate it.

Thanks from a Newbie!

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Are there any eval firms that allow you to sink to your …
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Deepmoney LLM
Elite Quantitative GenAI/LLM
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
Battlestations: Show us your trading desks!
26 thanks
The Program
18 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623


lselalum,

this should do what you have in mind or at least could be tweaked towards doing it:

 
Code
Inputs: 
	double Percent	( 5 );

Variables:
	double Percentage	( 0 );

once Percentage = Percent / 100 ;
	
//up bar
if Close > Open and Close >= ( High - ( High * Percentage ) ) then
	Plot1( Low );
//down bar
if Close < Open and Close <= ( Low + ( Low * Percentage ) ) then
	Plot2( High );
Regards,
ABCTG

Follow me on Twitter Reply With Quote
  #4 (permalink)
lselalum
Houston, Texas/USA
 
Posts: 5 since Jul 2013
Thanks Given: 1
Thanks Received: 1

ABCTG,

Thank you so much. I put the code in as is and it showed an alert (dot) on every single candle on the daily chart. Not sure what went wrong.

Any thoughts?



ABCTG View Post
lselalum,

this should do what you have in mind or at least could be tweaked towards doing it:

 
Code
Inputs: 
	double Percent	( 5 );

Variables:
	double Percentage	( 0 );

once Percentage = Percent / 100 ;
	
//up bar
if Close > Open and Close >= ( High - ( High * Percentage ) ) then
	Plot1( Low );
//down bar
if Close < Open and Close <= ( Low + ( Low * Percentage ) ) then
	Plot2( High );
Regards,
ABCTG


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

lselalum,

what symbol did you test? A bar closing within 5% from the high or 5% from the low is very common by the way. In fact I'd expect almost all bars to trigger this condition, expect the dojis that are ruled out in the code. Think about a bar that makes a high of 1000, as long as the close is within 50 points of the high your condition is valid.

Maybe you could clarify the condition you are looking for and give an example.

Regards,
ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #6 (permalink)
lselalum
Houston, Texas/USA
 
Posts: 5 since Jul 2013
Thanks Given: 1
Thanks Received: 1

Excellent point

I think the filter here that makes them more rare is the close has to be in the direction of the bar. For instance, using your example of a high of 1000. The close would need to be between 95 to 100 points. It has to be in the direction of the bar for it to filter.

I tested USD/JPY on a daily chart, btw.

I hope my explanation helped to clarify things a bit.

Thanks again for the hel

Reply With Quote
  #7 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

lselalum,

can you show a picture of a bar you'd like to see labeled? The code checks for up bars or down bars, which is in the direction of the bar in my opinion.

Regards,
ABCTG

Follow me on Twitter Reply With Quote
  #8 (permalink)
lselalum
Houston, Texas/USA
 
Posts: 5 since Jul 2013
Thanks Given: 1
Thanks Received: 1

ABCTG,

Shaved Bars shown with blue dots.



Video:
Shaved Bars | Ninjacators.com

Reply With Quote
  #9 (permalink)
 
kronie's Avatar
 kronie 
NYC + NY / USA
 
Experience: Advanced
Platform: "I trade, therefore, I AM!"; Theme Song: "Atomic Dog!"
Trading: EMD, 6J, ZB
Posts: 796 since Oct 2009

take a snapshot and post a picture of what these bars look like to you.


perhaps we can identify them or associate them with other types already in evidence...


there are volume bars, and
there are skinny bars, and

there are fat bars, and

there are inside bars, and
there are outside bars, and
there are volume bars, oh, did I say that already?

Reply With Quote
  #10 (permalink)
lselalum
Houston, Texas/USA
 
Posts: 5 since Jul 2013
Thanks Given: 1
Thanks Received: 1


Thanks everyone,

Got it to work with some additional assistance.

In case anyone wants it here is the code:

__
Inputs: HighPct( .95 ), LowPct( .05 );
var: CloseNearHigh( false ), CloseNearLow( False );

CloseNearLow = Close <> Open and Close <= Range * LowPct + Low;
CloseNearHigh = Close <> Open and Close >= range * HighPct + low;

If CloseNearHigh then plot1( High,"",Green );
If CloseNearLow then plot1( Low,"",Red );

if CloseNearHigh then
Alert( "CloseNearHigh" )
else if CloseNearLow then
Alert( "CloseNearLow" ) ;
___

I would suggest changing the plot color as it currently shows up as the same color as the bar.

Reply With Quote
Thanked by:




Last Updated on July 7, 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