Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Ninjatrader 'Save Workspace' does not seem to save files to disk immediately (bug?). If NT crashes or terminates abnormally, your workspace may not have been saved, and sometimes after crashes, the workspace will be corrupted, and you will have lost your setup. Using 'Save Workspace As' instead does not seem to have this issue, so I created a AuotHotKey script to use save as instead. It saves the workspace as 'zbak<workspace>', then saves it again using the original workspace name, so you have a backup of the workspace with the save operation. The z in the backup name is to force the backup names to sort at the end when listed.
The script also shows how to pop up a user message input box with a timeout, and read the yes, no cancel user response.
Hi, I would like to experiment with this script but cannot get it to work. AutoHotKey complains about line 57, saying that "pwr.ResponseText" contains an illegal character. I am not a programmer but a quick search of your script shows no other reference to that variable. Can you tell me what I might be missing. I am using Windows XP SP3.
With NT, you can scroll a chart horizontally along the time axis using the arrow keys or the mouse wheel, but you cannot scroll a chart vertically along the price axis using these keys. Why not? One of the things I do every day after market is scroll through my charts to review every signal I took and/or missed etc. I also do this to train my eye to see my signals as they are developing by scrolling the candles in one at a time from the right edge of the chart. You can do this exercise with market replay, but I find Market Replay slow, cumbersome, buggy and works only half of the time for me. So, I wrote this AutoHotKey script to scroll a chart vertically using the Up/Down Arrow keys, or Conrtrol-MouseWheel.
By the way I also use a customized version of this awesome NT indicator to scroll charts properly like with the mouse like a truly first rate charting software vendor would implement:
You are probably passing in a weird character to the function, or the website is returning a weird character. If you feel comfortable sharing the info, what is the url of the web page you are trying to access?
One of the things I do everyday during, and after market, is markup all my charts with every signal that occurred during the day. I generally use the NT Line Segment Tool, the Ellipse, and the Line Arrow tools to do the majority of this markup. I like the ellipse tool, because you can draw a straight horizontal line, a straight vertical line or a colored ellipse, all using the single ellipse tool. I combine these to show a trade as winner, loser, BE, trail stopped, etc. So, I created this script to remap my mouse buttons to switch between these tools. I use a 5 button mouse, and use the side buttons for this. Single click of the left side button selects the Ellipse tool, a Double Click selects the Line Arrow, a single click of the Right side button deselects any draw tool.
I have also programmed my Middle mouse button to place a trade ruler on the chart, with risk/reward and trade position sizing, but that functionality is programmed in this indicator: TradeRuler, indicator in the nexusfi.com (formerly BMT) download section.
Here's how I save my charts. Ctrl-S to save the current chart, Ctrl-Shift-S to save the entire desktop for multiple charts. The image names are automatically named using the chart name, the current date/time, and an optional user specified tag. This might help if you record charts in your journal. This naming convention allows me to list and review charts by date, instrument, or other specific criteria. Uses Microsoft Paint to save the chart window or desktop 'c:\tmp\' folder.
Very useful. I have noticed that although you request the image to be a jpg file, it is always a bmp file with the extension jpg. I tried changing to png file in oder to get a smaller file, but it still saves very large bmp files.
Is there a way around this ?
Here's how I save my charts. Ctrl-S to save the current chart, Ctrl-Shift-S to save the entire desktop for multiple charts. The image names are automatically named using the chart name, the current date/time, and an optional user specified tag. This might help if you record charts in your journal. This naming convention allows me to list and review charts by date, instrument, or other specific criteria. Uses Microsoft Paint to save the chart window or desktop 'c:\tmp\' folder.
;############################################################
;###
;### Save current chart or desctop image to c:\tmp folder
;###
;############################################################
save_type=
^+s::
save_type = (desktop)
^s::
WinGetActiveTitle, activeWin
if ( GetKeyState("ScrollLock","T") and RegExMatch(activeWin, ".*?\(.*?\).*?\d+/\d+/\d+") ) ;### NinjaTrader Chart or Control Center
{
symbol := SubStr(activeWin,1,RegExMatch(activeWin, " ")-1)
if ( RegExMatch(save_type, "desktop") )
Send {PrintScreen} ;### Capture entire desktop for multiple charts
else
Send !{PrintScreen} ;### Capture chart window
Sleep 250
run mspaint.exe,,Min,pid
InputBox, tag, Save %save_type% Image Tag
WinWait, ahk_pid %pid%, ,10
IfWinExist, ahk_pid %pid%
{
WinActivate
WinWaitActive
WinGet, win_id, ID, A
Send ^v
WinMenuSelectItem, ahk_pid %pid%, , File, Save As,
Sleep 1000
SendInput c:\tmp\%symbol%_%tag%_%A_MMM%%A_DD%_%A_Hour%h%A_Min%m%A_Sec%.jpg{Enter}
Sleep 500
SendInput {y}
Sleep 500
SendInput {n}
WinClose, ahk_id %win_id%
}
else {
MsgBox Could not start Microsoft Paint to save Print Screen
}
}
save_type=
return
Is there a way to auto capture part of the screen based on coordinates and dimensions (x,y,w,h)?
Very useful. I have noticed that although you request the image to be a jpg file, it is always a bmp file with the extension jpg. I tried changing to png file in oder to get a smaller file, but it still saves very large bmp files.
Is there a way around this ?
In Vista the default save type rom MS Paint is .jpg, it might be .bmp in Windows XP. I can add a couple of lines to force to save as .jpg or .png