NexusFi: Find Your Edge


Home Menu

 





Sierra Chart Help - Show text under candle bar


Discussion in Sierra Chart

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




 
Search this Thread

Sierra Chart Help - Show text under candle bar

  #1 (permalink)
 foreverlearner 
Rio de Janeiro. Brazil.
 
Experience: Beginner
Platform: NinjaTrader, Sierra Chart
Trading: Emini ES
Posts: 30 since Sep 2019
Thanks Given: 10
Thanks Received: 37

I am trying to show Ask ratio above bar and Bid ratio below bar if they are above a specific value of 0.5.

The problem is, only the "IF" argument is working.

What I am trying to do is: If ask ratio is greater than 0.5 show above bar, if Bid ratio is greater than 0.5 show below bar.

How can I make both arguments to work in the same indicator?

This is my code:

 
Code
float AskVolM = ((sc.AskVolume[sc.Index] / sc.BidVolume[sc.Index]) - 1);
float BidVolM = ((sc.BidVolume[sc.Index] / sc.AskVolume[sc.Index]) - 1);

// Input_limit is set to 0.5
if (AskVolM > Input_Limit.GetFloat()) 
 {
    Subgraph_DeltaValue[sc.Index] = AskVolM;
    Array_TextPosition[sc.Index] = sc.High[sc.Index] + (Input_OffsetInTicks.GetInt() * sc.TickSize);  // top of text
 }
 else
 {
     Subgraph_DeltaValue[sc.Index] = 0;
 }

 
 if (BidVolM > Input_Limit.GetFloat())
 {
    Subgraph_BidMAsk[sc.Index] = BidVolM;
    Array_TextPosition1[sc.Index] = sc.Low[sc.Index] - (Input_OffsetInTicks.GetInt() * sc.TickSize);  // top of text
 }
 else
 {
     Subgraph_BidMAsk[sc.Index] = 0;
 }

Started this thread Reply With Quote
The following user says Thank You to foreverlearner for this post:

Can you help answer these questions
from other members on NexusFi?
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Request for MACD with option to use different MAs for fa …
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
58 thanks
Battlestations: Show us your trading desks!
55 thanks
NexusFi site changelog and issues/problem reporting
48 thanks
What percentage per day is possible? [Poll]
31 thanks
GFIs1 1 DAX trade per day journal
29 thanks

  #2 (permalink)
 Anka Software   is a Vendor
 
Posts: 19 since Jan 2013
Thanks Given: 0
Thanks Received: 9

Hi,
Please share your full code.
Make sure the subgraph..DrawStyle is set to DRAWSTYLE_VALUE_ON_HIGH / DRAWSTYLE_VALUE_ON_LOW, for the Ask/Bid subgraphs.

Reply With Quote
  #3 (permalink)
 foreverlearner 
Rio de Janeiro. Brazil.
 
Experience: Beginner
Platform: NinjaTrader, Sierra Chart
Trading: Emini ES
Posts: 30 since Sep 2019
Thanks Given: 10
Thanks Received: 37


Thanks for your reply @Anka Software.

I was using Custom Value At Y, and it seems this Draw Style can only be applied to Subgraph[0].

My Subgraph_DeltaValue was Subgraph[0] and Subgraph_BidMAsk was Subgraph[1].

I changed the code to this and it worked

 
Code
float AskVolM = ((sc.AskVolume[sc.Index] / sc.BidVolume[sc.Index]) - 1);
float BidVolM = ((sc.BidVolume[sc.Index] / sc.AskVolume[sc.Index]) - 1);

// Input_limit is set to 0.5
if (AskVolM > Input_Limit.GetFloat())
	 {
		Subgraph_DeltaValue[sc.Index] = AskVolM;
		Array_TextPosition[sc.Index] = sc.High[sc.Index] + (Input_OffsetInTicks.GetInt() * sc.TickSize);  // top of text
		Subgraph_DeltaValue.DataColor[sc.Index] = Subgraph_DeltaValue.PrimaryColor;
	 }
	 else if (BidVolM > Input_Limit.GetFloat())
	 {
		Subgraph_DeltaValue[sc.Index] = BidVolM;
		Array_TextPosition[sc.Index] = sc.Low[sc.Index] - (Input_OffsetInTicks.GetInt() * sc.TickSize);  // bottom of text
		Subgraph_DeltaValue.DataColor[sc.Index] = Subgraph_DeltaValue.SecondaryColor;
	 }
	 else
	 {
		 Subgraph_DeltaValue[sc.Index] = 0;
	 }

Started this thread Reply With Quote





Last Updated on July 29, 2021


© 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