NexusFi: Find Your Edge


Home Menu

 





Text on tick/Volume Charts


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one ABCTG with 5 posts (5 thanks)
    2. looks_two c12345 with 2 posts (0 thanks)
    3. looks_3 Bodil with 2 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 2,392 views
    2. thumb_up 5 thanks given
    3. group 3 followers
    1. forum 9 posts
    2. attach_file 3 attachments




 
Search this Thread

Text on tick/Volume Charts

  #1 (permalink)
c12345
PA
 
Posts: 81 since Sep 2009
Thanks Given: 4
Thanks Received: 47

Hello fellow futures.io (formerly BMT) members;

I am working on an indicator for VOlume charts, to return the % complete of the bar. I have it working, BUT its not staying w/ the price bar, I believe that this is due to the bar type is a volume bar vs a time based bar. so I've been playing with the TEXT_NEW field, to get the setting correct, based off the Close of the previous bar, but when I do this it doesn't show.
Any ideas on how to correct this, below is the code.

Attached Files
Elite Membership required to download: complete.pla
Elite Membership required to download: Complete_not_working.pla
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Futures True Range Report
The Elite Circle
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Deepmoney LLM
Elite Quantitative GenAI/LLM
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
59 thanks
Funded Trader platforms
37 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623


Hi c12345,

the problem is that you are using Text_New. This uses time information accurate to the minute only. On non time based charts like volume charts, where you can't know the ending time of a bar in advance, this will shift the text too far to the right with your code.
I would suggest using Text_New_Dt for accurate text placement and Text_SetStyle to draw it to the right of the current bar.
Something like this will do it:
 
Code
vars:
	Var0( 0), Var1(  - 1), Var2( 0), Var3( 0);


begin
	;
	If Var1 =  - 1 then  begin
		Var1 = Text_New_DT(DateTime, ( HIGH  +  LOW ) / 2, "   0%");
			Text_SetStyle(Var1, 0, 2);
			
	end
	else
	 begin
		Var3 = ( HIGH  +  LOW  +  CLOSE ) / 3;
		Var0 = MINLIST( 100, 100 *  TICKS  / BARINTERVAL);
		Var2 = TEXT_SETSTRING(Var1, "   " + NUMTOSTR(Var0, 1) + "%");
		Var2 = TEXT_SETLOCATION_DT(Var1, DateTime, Var3);
		end;
	end;
Regards,
ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

The image displays what happens with the original code and the modified version (posted in the post above) on the bottom.



Regards,
ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #5 (permalink)
c12345
PA
 
Posts: 81 since Sep 2009
Thanks Given: 4
Thanks Received: 47

Many thanks, I didn't know that keyword in MC / EL, its working great!!


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

You are welcome. This keyword is fairly new and was only introduced with the current MC 8.7.
It will give the most precision possible with charts that have millisecond accuracy.

Regards,
ABCTG

Follow me on Twitter Reply With Quote
  #7 (permalink)
 
Bodil's Avatar
 Bodil 
Oslo, Norway
 
Experience: Advanced
Platform: TradeStation / MultiCharts
Trading: Forex / Futures
Posts: 26 since Aug 2012
Thanks Given: 5
Thanks Received: 0

Can this be done in TS as well?

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

Bodil,

not with this reserved word, but you can do it with TS 9.1 Update 20 and higher using OOEL and classes from the elsystem.drawingobjects namespace.

Regards,
ABCTG


Bodil View Post
Can this be done in TS as well?


Follow me on Twitter Reply With Quote
Thanked by:
  #9 (permalink)
 
Bodil's Avatar
 Bodil 
Oslo, Norway
 
Experience: Advanced
Platform: TradeStation / MultiCharts
Trading: Forex / Futures
Posts: 26 since Aug 2012
Thanks Given: 5
Thanks Received: 0

That sounds a bit too advanced for my knowledge of EL.... Any idea where I can find a place to start learning about OOEL?

Thanks anyway!!!

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


Bodil,

the Tradestation Forum and Wiki are your best bet in my opinion.

Regards,
ABCTG

Follow me on Twitter Reply With Quote
Thanked by:




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