Site Administrator Swing Trader Data Scientist & DevOps
Manta, Ecuador
Experience: Advanced
Platform: Custom solution
Trading: Futures & Crypto
Posts: 49,960 since Jun 2009
Thanks: 32,433 given,
98,143
received
I am hoping my friend @ktrader will come to the rescue once more
@vvhg has just made his NinjaTrader auto-screenshot capture tool, and I created a simple PHP handler on the backend to hold and serve the images.
I know Sierra Chart has a built-in option for using their server, but what I want is to use bmcharts.com and to have the bbcode output automatically put into my clipboard, without user interaction other than pressing the hotkey on the chart.
This little indicator can save a screenshot of a chart (the chart the indicator is applied to) to a user selected folder.
It works with a little button on the chart:
93004
or with the hotkey Alt+P (this can be changed in line 160 of the code).
These …
The code is there that shows the HTTP POST to bmcharts, it is very straightforward and could be used here as well.
I'd desire the ability to put this on all my charts, and then activate with a keypress like Alt-P for printscreen.
@ktrader, if you are up to this, please let me know
I need a little info of how the post should look to upload - also I notice bmcharts supports a user can register, so i assume there are some kind of login for the user to have the image uploaded to their own vault - or is it part of the post?
--ktrader
The following 2 users say Thank You to ktrader for this post:
This study, when added to a chart, will upload a screenshot to the chart to which it is added to bmcharts.
A url to the image on bmcharts is on the clipboard when the upload is finished, ready to paste into forum posts.
Discussion thread:
http …
This study, when added to a chart, will upload a screenshot to the chart to which it is added to bmcharts.
The hot-key is ctrl-alt-p
A url to the image on bmcharts is on the clipboard when the upload is finished, ready to paste into forum posts.
you have the option to:
- choose if a sound should be played when uploaded
- if the url to the image on bmcharts should be enclosed by
- choose if the caption of the window should be hidden while taking the screenshot.
The zip contains source cdoe (must be compiled with visual studio)
and screenshot.dll (i precompiled this for those who doesnt have visual studio) - just put it in the sierrachart data directory and the custom study will be available.
---
I am thinking its not very convenient to have to add it to each chart to be able to make a screenshot - if there are any interest I can make it to be a global process such that it will work with any window, regardless if a study is attached to a chart or not. It will also open to have the feature of assigning specific hotkeys to specific charts (so for instance ctrl-alt-1 screenshots and uploads one chart where ctrl-alt-2 does the same with another).
--ktrader
The following 2 users say Thank You to ktrader for this post:
Site Administrator Swing Trader Data Scientist & DevOps
Manta, Ecuador
Experience: Advanced
Platform: Custom solution
Trading: Futures & Crypto
Posts: 49,960 since Jun 2009
Thanks: 32,433 given,
98,143
received
To answer earlier question - Yes, global would be great so I don't have to add it to each chart. But I really don't mind doing that, if global is a big problem.
So at this point my only real request is configurable key and to hide the menu bar along with title bar/status bar.
Thx again, you rock! This will be an enormous time saver!
This study, when added to a chart, will upload a screenshot to the chart to which it is added to bmcharts.
A url to the image on bmcharts is on the clipboard when the upload is finished, ready to paste into forum posts.
Discussion thread:
http …
The shortcut key can now be chosen as a combination between a modifier (ctrl,alt,ctrl-alt,shift-alt,ctrl-shift) and a key (a-z,0-9,f1-f12). Default shortcut key is ctrl-alt-k.
Also, the menu disappears along with the titlebar if that options is set.
To install the precompiled dll, just overwrite the old screenshot.dll with the new (identified by build 2 in the custom-study list in sierra)
--ktrader
The following 3 users say Thank You to ktrader for this post:
Site Administrator Swing Trader Data Scientist & DevOps
Manta, Ecuador
Experience: Advanced
Platform: Custom solution
Trading: Futures & Crypto
Posts: 49,960 since Jun 2009
Thanks: 32,433 given,
98,143
received
Forgot to do this, so will need to wait until after the close, again. My understanding is I can't replace the DLL without closing Sierra.
Also, @josh gave me a good idea - making the hot key the middle mouse button. If you could tell me where in the code and what to change for this, would be awesome... if it is not an easy change, then don't worry about it, I can live with the current hotkey just fine.
I don't know if this is along the lines of what you are doing, but I set my keyboard shortcuts in Sierra (Ctrl+G is evening session for example), and then I use my logitech setpoint software to map a mouse button to this keyboard combination. Logitech has suckily made it impossible to map certain keys, but I hacked the xml file for their software to make it still possible to do so.
The following user says Thank You to josh for this post:
Site Administrator Swing Trader Data Scientist & DevOps
Manta, Ecuador
Experience: Advanced
Platform: Custom solution
Trading: Futures & Crypto
Posts: 49,960 since Jun 2009
Thanks: 32,433 given,
98,143
received
It seems most of the time when the window is active (me clicking on it), the hot key does not work. But I click on another window (outside of Sierra), then come back to the window, it registers the click?
I hate to keep asking for favors -- but in light of above, would it be possible to add a context menu item to the right-click menu? So I can just right-click and hit 'Upload to bmcharts' type thing?
Unless you have a fix for the issue I've tried it on multiple charts and seems to happen consistently.
The issue is I only read key state when the study i called. (as oppose to register a key handler - which would be what I would do in the "global" solution, but when its added many times I didnt want to have keyhooks lying all over).
So if you hold the hot-key a little longer, on the initial press (like 0,5s) it should go through.
I can add a menu too, and I will see if I can handle a keyhook in a nice way from different studies but i am a bit afraid its going to be a mess, unless i have one global hook that handles all charts...
--ktrader
The following user says Thank You to ktrader for this post:
A new version is available in the download section.
Added:
- Map a mouse button to start the capture and upload.
The mouse button can be left,right,middle and x button 1 and x button 2 (these are the two extra buttons often available on mice, useally operated by the thumb).
The mouse button can have a modifier key, so you can choose ctrl as modifier and left button as mouse, will activate the capture and upload with ctrl-left click.
If the mouse buttons are used an explicit left click to gain focus is *not* needed, so if you map the middle button a press of the middle button is enough to start the capture/upload.
If you keep holding the shortcut key or mouse-activation button the capture/upload will be repeated (one at a time, sequentially).
The study reads the shortcuts/hot-buttons in the study, so it the key/button is read when the study is called (this is opposed to register a hook and receive input even when the study is not called by sierra). The interval at which the study is called is configurable in sierra, it defaults to 500ms (its a global setting) - it can be modified in global settings -> general settings.
If after some time of usage we find its annoying I will change to a global hook, adding the benefit that any window on the screen can captured by the hot key (if chosen to) as the hotkey is not limited to the study.
No, mine is 50ms, but when a chart window gets focus, there seems to be a slight delay in sierra before it calls the study the first time. Since its all one thread I am guessing its doing some housekeeping with the focus.change which holds up the calling of the study for a short while.
if you hold the key a short while, I assume it goes through?
Site Administrator Swing Trader Data Scientist & DevOps
Manta, Ecuador
Experience: Advanced
Platform: Custom solution
Trading: Futures & Crypto
Posts: 49,960 since Jun 2009
Thanks: 32,433 given,
98,143
received
When I use the scrollbars in a chart, I am getting all the keypresses that never worked queued up all at once, and about a zillion screenshots sent all at once...
@ktrader I loaded the study on a chart this morning and tried it out, but nothing is happening when I press ctrl+alt+k? Nothing is copied to the clipboard. I am fairly new to SC, so I don't know if I missed something. I copied the dll into the data folder, then I loaded the custom user study on the chart. Kept the default setting, and ctrl+alt+k did not upload. Appreciate it.
I am working on automatic posting of pics to bmcharts in the frame of a more general project involving automatic posting on futures.io (formerly BMT) throught futures.io (formerly BMT) API.
This little indicator can save a screenshot of a chart (the chart the indicator is applied to) to a user selected folder.
It works with a little button on the chart:
93004
or with the hotkey Alt+P (this can be changed in line 160 of the code).
These …
If not let me know. And feel free to throw your findings in the main API thread as well as it really should be in there:
Just starting this thread as a placeholder so as I make progress on this I can update the thread. It will be a while as I've been sick for a while now, and am quite behind on other things like emails and PM's.
However, if no mistake, its specifications are not presented on the other thread. You probably sent them to @vvhg by PM, and he used this information to build his code.