Sierra Chart toolbar modifications - Sierra Chart | futures io social day trading
futures io futures trading


Sierra Chart toolbar modifications
Updated: Views / Replies:1,671 / 9
Created: by Big Mike Attachments:1

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

Reply
 
Thread Tools Search this Thread
 

Sierra Chart toolbar modifications

  #1 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,218 received

Sierra Chart toolbar modifications

@ktrade, I was wondering - do you think it is possible to modify the toolbar (menu bar) of Sierra, like what is popularly done with Ninja these last few years?

Initial idea is mainly to add buttons - like toggle switches for hide on/off indicators.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #2 (permalink)
Elite Member
glostrup, denmark
 
Futures Experience: Advanced
Platform: Custom platform
Broker/Data: CQG
Favorite Futures: Futures, Options, Stocks
 
ktrader's Avatar
 
Posts: 249 since Aug 2011
Thanks: 151 given, 274 received


Big Mike View Post
@ktrade, I was wondering - do you think it is possible to modify the toolbar (menu bar) of Sierra, like what is popularly done with Ninja these last few years?

Initial idea is mainly to add buttons - like toggle switches for hide on/off indicators.

Mike

Yes, I believe something along those lines is possible. Although we would need to thread carefully as there are frequent updates to sierra so when modifying things outside the published api might break in future releases.

Also, a study can define 4 toolbar buttons through the api, but they will belong to the study, meaning more general functionality would not be possible.

--ktrader

Reply With Quote
 
  #3 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,218 received



ktrader View Post
Yes, I believe something along those lines is possible. Although we would need to thread carefully as there are frequent updates to sierra so when modifying things outside the published api might break in future releases.

Also, a study can define 4 toolbar buttons through the api, but they will belong to the study, meaning more general functionality would not be possible.

--ktrader

And I want to clarify because my terminology may be wrong...

I use undocked charts only. So I am NOT talking about the main Sierra "toolbar" (as they call it). I am instead talking about each undocked chart window, the menubar of that window (Edit, Tools) having some buttons added to the right to control some stuff, like switching on/off studies or a nice one would be sharing a chart (ftp) etc.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #4 (permalink)
Elite Member
glostrup, denmark
 
Futures Experience: Advanced
Platform: Custom platform
Broker/Data: CQG
Favorite Futures: Futures, Options, Stocks
 
ktrader's Avatar
 
Posts: 249 since Aug 2011
Thanks: 151 given, 274 received


Big Mike View Post
And I want to clarify because my terminology may be wrong...

I use undocked charts only. So I am NOT talking about the main Sierra "toolbar" (as they call it). I am instead talking about each undocked chart window, the menubar of that window (Edit, Tools) having some buttons added to the right to control some stuff, like switching on/off studies or a nice one would be sharing a chart (ftp) etc.

Mike

Something like the attached screenshot?

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

Reply With Quote
 
  #5 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,218 received


ktrader View Post
Something like the attached screenshot?

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

Yup. Was thinking right-justified, but yes.

Doesn't even have to be icons, can just be buttons if easier.



Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #6 (permalink)
Elite Member
glostrup, denmark
 
Futures Experience: Advanced
Platform: Custom platform
Broker/Data: CQG
Favorite Futures: Futures, Options, Stocks
 
ktrader's Avatar
 
Posts: 249 since Aug 2011
Thanks: 151 given, 274 received


Big Mike View Post
Yup. Was thinking right-justified, but yes.

Doesn't even have to be icons, can just be buttons if easier.



Mike

They can be right justified too . Icons are the same difficulty - the screenshot is an actual screenshot of my sierra so they are already there (the background blitting, is off by a pixel so it looks odd - but its possible to fix (thats why the icons background are a bit off - the whole mess is because the bitmaps can not be transparent here, so i copy the backbackgroup draw the icon and put the bitmap back, but is off by a pixel) - also as you might notice the menubar is higher than normal, to fit the 32x32 icons - but any size is ofcourse possible if it is prefered to keep the menubar the original size.

What kind of functionality did you have in mind to attach to these buttons , the one I made and took the screen shot off, switches the chart symbol between 4 currency futures.

--ktrader

Reply With Quote
 
  #7 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,218 received


ktrader View Post
They can be right justified too . Icons are the same difficulty - the screenshot is an actual screenshot of my sierra so they are already there (the background blitting, is off by a pixel so it looks odd - but its possible to fix (thats why the icons background are a bit off - the whole mess is because the bitmaps can not be transparent here, so i copy the backbackgroup draw the icon and put the bitmap back, but is off by a pixel) - also as you might notice the menubar is higher than normal, to fit the 32x32 icons - but any size is ofcourse possible if it is prefered to keep the menubar the original size.

What kind of functionality did you have in mind to attach to these buttons , the one I made and took the screen shot off, switches the chart symbol between 4 currency futures.

--ktrader

A shortcut to the Edit - Screen Images - Upload with Overlays would be nice.

I'd also like buttons to turn on/off indicators (hide them), if it is possible to tie a button to a specific indicator # that would be nice.

Shortcut buttons to change chart templates (Analysis -> template) to a predefined template.

I am sure others can come up with great ideas.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #8 (permalink)
Elite Member
las vegas
 
Futures Experience: Intermediate
Platform: Sierra Chart
Broker/Data: Velocity/IB
Favorite Futures: 6E
 
Posts: 1,147 since Feb 2010
Thanks: 304 given, 836 received

Can you provide example code of how you made the buttons? I would like to be able to make my own chart trader.

Reply With Quote
 
  #9 (permalink)
Elite Member
glostrup, denmark
 
Futures Experience: Advanced
Platform: Custom platform
Broker/Data: CQG
Favorite Futures: Futures, Options, Stocks
 
ktrader's Avatar
 
Posts: 249 since Aug 2011
Thanks: 151 given, 274 received


Big Mike View Post
A shortcut to the Edit - Screen Images - Upload with Overlays would be nice.

I'd also like buttons to turn on/off indicators (hide them), if it is possible to tie a button to a specific indicator # that would be nice.

Shortcut buttons to change chart templates (Analysis -> template) to a predefined template.

I am sure others can come up with great ideas.

Mike

It sounds like it would be best to define a generic way to add buttons and hook it into calling functions in sierra, either through the api or by making lower levels hooks into sierra - so we get a more customizable solution.

I will try to make an initiel version that displays the different handles we can attach to in sierra and then we can hopefully get some ideas and input to how it is best utilized.

--ktrader

Reply With Quote
 
  #10 (permalink)
Elite Member
glostrup, denmark
 
Futures Experience: Advanced
Platform: Custom platform
Broker/Data: CQG
Favorite Futures: Futures, Options, Stocks
 
ktrader's Avatar
 
Posts: 249 since Aug 2011
Thanks: 151 given, 274 received



vegasfoster View Post
Can you provide example code of how you made the buttons? I would like to be able to make my own chart trader.

Sure...

they are not actually buttons in this case, but I had to make them as menu-items as they went to the menu-bar:

To get the menu i get the window handle of the chart-window inside the study (this is for detached charts)

 
Code
HWND hwnd = sc.ChartWindowHandle;
then i get the main menu:

 
Code
HMENU menu = GetMenu(hwnd);
then i add the 4 menu-items as bitmap items:

 
Code
		MENUINFO menuinfo;
		GetMenuInfo(menu,&menuinfo);
		menuinfo.cyMax=36;
		menuinfo.fMask |= MIM_MAXHEIGHT;
		SetMenuInfo(menu,&menuinfo);

		h= LoadImage(NULL, L"c:\\img\\usd.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE|LR_LOADTRANSPARENT);
		AppendMenu(menu,MF_BITMAP,103992,(LPCWSTR) h);
		h= LoadImage(NULL, L"c:\\img\\eur.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
		AppendMenu(menu,MF_BITMAP,103993,(LPCWSTR) h);
		h= LoadImage(NULL, L"c:\\img\\gbp.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
		AppendMenu(menu,MF_BITMAP,103994,(LPCWSTR) h);
		h= LoadImage(NULL, L"c:\\img\\yen.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE|LR_LOADTRANSPARENT);
		AppendMenu(menu,MF_BITMAP,103995,(LPCWSTR) h);
I just load the icons from my disk as it makes it easier to change for me , you can also have them as resources directly in your dll.



notice you would need to check if you already added something for, a very simple check would be the menu item count:
 
Code
int x=GetMenuItemCount(menu);


Notice I gave my menu items id's 103992-103995, i just chose them arbitrarily as numbers not conflicting with sierra.

To be able to listen if anyone pressed your menu items you would need to hook into the message loop by:
 
Code
	if (hook==NULL && hwnd!=NULL) {
		unsigned long processID = 0;
		GetWindowThreadProcessId(hwnd, &processID);
		hook =SetWindowsHookEx(WH_CALLWNDPROC ,&CallWndProc,inst,GetCurrentThreadId());
		if (hook==NULL) {
			sc.AddMessageToLog("hook not installed",0);
		} else {
			sc.AddMessageToLog("hook installed",0);
		}
}
When a menu item is selected you would get WM_COMMAND so your CallWndProc would need to listen to this:

 
Code
LRESULT CALLBACK CallWndProc(int code,WPARAM wParam,LPARAM lParam) {
	if (code<0) {
		return CallNextHookEx(0,code,wParam,lParam);
	}

	CWPSTRUCT* msg = (CWPSTRUCT*) lParam;
	switch (msg->message) {
		case WM_COMMAND:
			// check if it one of your buttons here. Also you might want to check if its the right hwnd
		break;

	}
	return CallNextHookEx(hook,code,wParam,lParam);
}
As this requires you to keep some data outside of sierra I would have my own datastructures in the dll, to keep track of which windows i have buttons in (and thus not use the study's capabailities of storing data).

you also need to unhook your wndproc hook when you are done.

 
Code
UnhookWindowsHookEx(hook);

Also, a sierra study is a normal dll, so you can do some initialization and other things as normal in DLLMain:

 
Code
static HINSTANCE inst;

BOOL WINAPI DllMain( HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) {
	switch (fdwReason) {
	case DLL_PROCESS_ATTACH:
		inst = hinstDLL;
		break;
	}
	return TRUE;

}
I just choose to save dll instance in a static instance, as it will only be loaded once. You could choose to clean up, if you had saved all the structures "yourself" (as oppose to save them with the study) when you are detached.


Another, much simpler way, would be to use the built-in capabilities to add 4 buttons pr study to a study toolbar, but they dont give you the same degree of flexibility, but you can have buttons and get notified when they are pressed directly in the study.

--ktrader


Last edited by ktrader; June 13th, 2012 at 02:27 PM. Reason: Clarification
Reply With Quote
The following 6 users say Thank You to ktrader for this post:

Reply



futures io > > > > Sierra Chart toolbar modifications

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a 2nd Toolbar on a NT chart? fosch NinjaTrader Programming 6 October 6th, 2016 01:38 PM
Sierra Chart feature requests Big Mike Sierra Chart 211 July 25th, 2016 04:16 PM
How to disable top most status line of chart in Sierra Chart Big Mike Sierra Chart 9 April 16th, 2013 07:07 PM
Sierra Chart crashes my computer arnie Tech Support 72 June 12th, 2012 10:30 AM
Getting reference to NT7 internal like ToolBar or Chart Trader column Adamus NinjaTrader Programming 6 November 17th, 2011 06:45 PM


All times are GMT -4. The time now is 02:40 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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 2017-12-12 in 0.13 seconds with 20 queries on phoenix via your IP 54.90.207.75