NexusFi: Find Your Edge


Home Menu

 





"Hide/Show studies" Buttons Study


Discussion in Sierra Chart

Updated
      Top Posters
    1. looks_one Rrrracer with 20 posts (9 thanks)
    2. looks_two slickiam with 16 posts (30 thanks)
    3. looks_3 swandro with 8 posts (17 thanks)
    4. looks_4 ejtrader with 3 posts (0 thanks)
      Best Posters
    1. looks_one swandro with 2.1 thanks per post
    2. looks_two mkata with 2 thanks per post
    3. looks_3 slickiam with 1.9 thanks per post
    4. looks_4 Rrrracer with 0.5 thanks per post
    1. trending_up 20,689 views
    2. thumb_up 65 thanks given
    3. group 20 followers
    1. forum 60 posts
    2. attach_file 20 attachments




 
Search this Thread

"Hide/Show studies" Buttons Study

  #41 (permalink)
 
Rrrracer's Avatar
 Rrrracer 
On the road
Webinar Host
Trading Nomad
 
Experience: Intermediate
Platform: TradingView
Broker: Oanda
Trading: FX
Posts: 2,512 since Feb 2017
Thanks Given: 17,582
Thanks Received: 9,752

OK man, thanks, will take it for a test drive and report back!

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Quantum physics & Trading dynamics
The Elite Circle
What broker to use for trading palladium futures
Commodities
Better Renko Gaps
The Elite Circle
Cheap historycal L1 data for stocks
Stocks and ETFs
Trade idea based off three indicators.
Traders Hideout
 
  #42 (permalink)
 
Rrrracer's Avatar
 Rrrracer 
On the road
Webinar Host
Trading Nomad
 
Experience: Intermediate
Platform: TradingView
Broker: Oanda
Trading: FX
Posts: 2,512 since Feb 2017
Thanks Given: 17,582
Thanks Received: 9,752

OK, the build failed.. here's the message:

The remote build did not succeed. Result:

hideDrwng_b2.cpp: In function 'void scsf_hideDrwng_b2(SCStudyInterfaceRef)':
hideDrwng_b2.cpp:41:6: error: 'struct s_sc' has no member named 'SetACSToolButtonText'
sc.SetACSToolButtonText(1, sc.Input[0].GetString());
^
hideDrwng_b2.cpp:42:6: error: 'struct s_sc' has no member named 'SetACSToolToolTip'
sc.SetACSToolToolTip(1, sc.Input[1].GetString());
^

-- End of Build -- 16:57:28

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #43 (permalink)
 
slickiam's Avatar
 slickiam 
Tomsk, Russia
 
Experience: Beginner
Platform: custom
Trading: gold
Posts: 273 since Dec 2010
Thanks Given: 133
Thanks Received: 435



Rrrracer View Post
OK, the build failed.. here's the message:
The remote build did not succeed. Result:
hideDrwng_b2.cpp: In function 'void scsf_hideDrwng_b2(SCStudyInterfaceRef)':
hideDrwng_b2.cpp:41:6: error: 'struct s_sc' has no member named 'SetACSToolButtonText'
sc.SetACSToolButtonText(1, sc.Input[0].GetString());
^
hideDrwng_b2.cpp:42:6: error: 'struct s_sc' has no member named 'SetACSToolToolTip'
sc.SetACSToolToolTip(1, sc.Input[1].GetString());
^
-- End of Build -- 16:57:28

SC ver?

and

*.dll attached and it was build on Debian 9 using mingw32 cross-compiler

so you need to run SC 32 bit to load it onto a chart to test

Scientia Libertas Prosperitas
Attached Files
Elite Membership required to download: hideDrwng_b2.dll
Started this thread Reply With Quote
Thanked by:
  #44 (permalink)
 
slickiam's Avatar
 slickiam 
Tomsk, Russia
 
Experience: Beginner
Platform: custom
Trading: gold
Posts: 273 since Dec 2010
Thanks Given: 133
Thanks Received: 435


Rrrracer View Post
OK, the build failed.. here's the message:
The remote build did not succeed. Result:
-- End of Build -- 16:57:28

It has been tested locally and using remote compiler with no issue vs SC ver 1860.

and I've sent this link to SC Team to solve it.

Scientia Libertas Prosperitas
Started this thread Reply With Quote
Thanked by:
  #45 (permalink)
 
Rrrracer's Avatar
 Rrrracer 
On the road
Webinar Host
Trading Nomad
 
Experience: Intermediate
Platform: TradingView
Broker: Oanda
Trading: FX
Posts: 2,512 since Feb 2017
Thanks Given: 17,582
Thanks Received: 9,752

I'm on SC1875, it's the 64 bit version... that's why I had to enlist the assistance of @swandro, he converted your original Hide Studies study to 64 bit.

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #46 (permalink)
 
slickiam's Avatar
 slickiam 
Tomsk, Russia
 
Experience: Beginner
Platform: custom
Trading: gold
Posts: 273 since Dec 2010
Thanks Given: 133
Thanks Received: 435


slickiam View Post
It has been tested locally and using remote compiler with no issue vs SC ver 1860.

and I've sent this link to SC Team to solve it.

I see it is not compiled since 1865 due to ACSIL changes (damn it all )

so I need some time to add the changes to get it right on 1875 and above.

Scientia Libertas Prosperitas
Started this thread Reply With Quote
Thanked by:
  #47 (permalink)
 
slickiam's Avatar
 slickiam 
Tomsk, Russia
 
Experience: Beginner
Platform: custom
Trading: gold
Posts: 273 since Dec 2010
Thanks Given: 133
Thanks Received: 435


Rrrracer View Post
I'm on SC1875, it's the 64 bit version... that's why I had to enlist the assistance of @swandro, he converted your original Hide Studies study to 64 bit.

_beta3 for v.1875 and above

 
Code
#include <windows.h>
#include "sierrachart.h"

SCDLLName("hideDrwng_b3");

SCSFExport scsf_hideDrwng_b3(SCStudyInterfaceRef sc) {		
	
	if(sc.SetDefaults) {
		sc.GraphName="hideDrwng_b3";
		sc.StudyDescription="Hide/Show drawings for v. 1875 and above >>beta3<< @ganz  ";		
		sc.AutoLoop = 0;
		sc.GraphRegion = 0;		
		
		sc.Input[0].Name = "Button#1 Name";
		sc.Input[0].SetString("Name");
		
		sc.Input[1].Name = "Button#1 Description";
		sc.Input[1].SetString("Dscr");
		
		sc.Input[2].Name = "drawing type number";
		sc.Input[2].SetInt(0);
		sc.Input[2].SetIntLimits(0, 46);	
			
		return;
	}	
	
	int& drwng_last = sc.GetPersistentInt(1); sc.SetPersistentInt(1, 0);
	int& drwng_type = sc.GetPersistentInt(2); sc.SetPersistentInt(2, 0);
	
	int& isHide = sc.GetPersistentInt(3); sc.SetPersistentInt(3, 0);	
	
	s_UseTool ChartDrawing;
	if (sc.GetUserDrawnChartDrawing(sc.ChartNumber, DRAWING_UNKNOWN, ChartDrawing, -1) > 0) {				
		
		if ( drwng_last == ChartDrawing.LineNumber ) return;
		else sc.SetPersistentInt(1, ChartDrawing.LineNumber);
	
		if ( sc.Input[2].GetInt() ) sc.SetPersistentInt(2, sc.Input[2].GetInt());
		else sc.SetPersistentInt(2, ChartDrawing.DrawingType);		
	
		sc.SetCustomStudyControlBarButtonText(1, sc.Input[0].GetString());
		sc.SetCustomStudyControlBarButtonHoverText(1, sc.Input[1].GetString());
			
		if  ( sc.MenuEventID == ACS_BUTTON_1 ) {
			if (sc.PointerEventType == SC_ACS_BUTTON_ON ) sc.SetPersistentInt(3, 1);
			else sc.SetPersistentInt(3, 0);
	
			for (int lineNumber = drwng_last; lineNumber < 0 ; lineNumber++) {
					if ( sc.GetUserDrawnChartDrawing(sc.ChartNumber, drwng_type, ChartDrawing, lineNumber) > 0 ) {
						ChartDrawing.HideDrawing=isHide; // hide  drwng				
						sc.UseTool(ChartDrawing);			
					}
			}
		}		
	}
	return;
}
so try this one

ps: i see some another changes for _buttons but i'll test it later

Scientia Libertas Prosperitas
Attached Files
Elite Membership required to download: hideDrwng_b3.cpp
Started this thread Reply With Quote
Thanked by:
  #48 (permalink)
 
Rrrracer's Avatar
 Rrrracer 
On the road
Webinar Host
Trading Nomad
 
Experience: Intermediate
Platform: TradingView
Broker: Oanda
Trading: FX
Posts: 2,512 since Feb 2017
Thanks Given: 17,582
Thanks Received: 9,752

Compiled and working! I was able to turn lines on and off using drawing code 1. It works on different charts as long as the charts have the Hide Drawing study applied.

OK a couple of things...

Can we have the ACS buttons start at #11? I have ACS 1-10 associated with the Hide Studies buttons.


Can we add more ACS buttons? I don't use all of the tools SC offers but I bet I use at least 10 of them...



Thank you!

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #49 (permalink)
 
bobwest's Avatar
 bobwest 
Western Florida
Site Moderator
 
Experience: Advanced
Platform: Sierra Chart
Trading: ES, YM
Frequency: Several times daily
Duration: Minutes
Posts: 8,172 since Jan 2013
Thanks Given: 57,525
Thanks Received: 26,292


Rrrracer View Post
Compiled and working! I was able to turn lines on and off using drawing code 1. It works on different charts as long as the charts have the Hide Drawing study applied.

I'm enjoying just watching this happening. Haven't put it to use yet, but I'm lurking and appreciating. (I'll wait for you to get it finalized.)

Nice work, @Rrrracer and @slickiam.

Bob.

Reply With Quote
Thanked by:
  #50 (permalink)
 
slickiam's Avatar
 slickiam 
Tomsk, Russia
 
Experience: Beginner
Platform: custom
Trading: gold
Posts: 273 since Dec 2010
Thanks Given: 133
Thanks Received: 435



Rrrracer View Post
Can we add more ACS buttons? I don't use all of the tools SC offers but I bet I use at least 10 of them...

_beta4 to multiple the Button

Scientia Libertas Prosperitas
Attached Files
Elite Membership required to download: hideDrwng_b4.cpp
Started this thread Reply With Quote
Thanked by:




Last Updated on November 26, 2023


© 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