SC Custom Menu Items - Sierra Chart | futures io social day trading
futures io futures trading

SC Custom Menu Items
Updated: Views / Replies:638 / 0
Created: by josh Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Thread Tools Search this Thread

SC Custom Menu Items

  #1 (permalink)
Elite Member
Georgia, US
Futures Experience: None
Platform: Various
Favorite Futures: Various
josh's Avatar
Posts: 4,940 since Jan 2011
Thanks: 5,210 given, 11,539 received
Forum Reputation: Legendary

SC Custom Menu Items

In this thread, a generous user contributed some code that takes advantage of Sierra's new ACS functionality which allows catching mouse events when a custom button is pressed.

The thing is, I hate toolbars, particularly those in Sierra. So, I decided to implement what I needed as a menu. Basically, I wanted a way to hide/show 2 or more studies at the same time. The region data line right-click show/hide menu in SC is helpful but it only shows/hides one study at a time, and if you are using several to implement shading, etc., then you may have 5 or more that need to all work together. So, this was the reason to explore this option.

Here is the SC documentation. It is not scary, and is pretty easy to understand. I encourage you to read it. The relevant section is the first one, though the subsequent sections are related:
Advanced Custom Study Interaction With Menus, ToolBar Buttons, Mouse Pointer Events - Sierra Chart

The first code block on that page really tells the story. You use a persistent variable, and add a menu item. Do this for as many menu items as you need. Then, you listen for a menu click and if it's the particular one you want, then you perform some action. Here is my code block for the "VWAP RTH" menu item:

if (sc.MenuEventID != 0 && sc.MenuEventID == MenuID1)
		sc.SetStudyVisibilityState(CH01_STDY_01, t);
		sc.SetStudyVisibilityState(CH01_STDY_02, f);
		sc.SetStudyVisibilityState(CH01_STDY_03, f);
		sc.SetStudyVisibilityState(CH01_STDY_04, f);
		sc.SetStudyVisibilityState(CH01_STDY_05, f);
		sc.SetStudyVisibilityState(CH01_STDY_06, f);
		sc.SetStudyVisibilityState(CH01_STDY_07, f);
		sc.SetStudyVisibilityState(CH01_STDY_08, f);
I use #define at the top to define CH01_STDY_ZZ as study numbers in my chart that I want to hide or show. You could take these as input variables but I prefer just to put them in the code as it's easy to change if using a #define or variable. So I have

#define CH01_STDY_01 4
#define t 0
"4" is the study ID of a study I will want to hide or show. In this case it's the RTH VWAP. 2-8 are the ETH VWAP, SD bands, and shading studies. For some reason in the SetStudyVisibilityState(num, state) function, 0 appears to set the study visible and 1 makes it invisible, so I am able to quickly change true and false if SC changes this by using the #define at the top.

As the SC documentation mentions in the 2nd section and as shown in the code block, you need to remove whatever menu items you are not using when the study unloads.

That's it! Just use this to hide/show whatever study you like! If I can answer any questions I'll be happy to. The best thing to do is fire up the CPP editor in Sierra and give it a go. For a single menu item the code shouldn't be more than 30 or 40 lines long, it is very simple, as shown above.

Please register on to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
The following 9 users say Thank You to josh for this post:


futures io > > > > SC Custom Menu Items

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

Updating schedule soon for June


Similar Threads
Thread Thread Starter Forum Replies Last Post
Thanks to SC josh Sierra Chart 3 April 9th, 2013 02:42 AM
Multiple Menu selection for NT7 indicators gavetso NinjaTrader Programming 2 June 26th, 2012 02:01 PM
The Fed's Secret Phone Menu Big Mike Off-Topic 1 June 15th, 2012 11:57 AM
Greek Restructuring: Off the Table, Not Off the Menu Quick Summary News and Current Events 0 June 1st, 2011 05:50 AM
NT-7 Context Menu Items Prtester NinjaTrader Programming 10 January 13th, 2010 10:02 AM

All times are GMT -4. The time now is 01:06 AM.

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
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.
no new posts
Page generated 2018-06-21 in 0.06 seconds with 19 queries on phoenix via your IP