I have strategy monitor running fine for a while. I am using 15 mins data so the code executes every 15 mins. I don't really need all it to run all that often. I don't see anything obvious for me to control it to run only at say 1pm and 2pm and don't run in between.
Is it doable ?
Size:
Color:
This is not supported for intraday scale. You can schedule EOD strategies in the SM at any time (WL UG > Strategy Monitor > Strategy Pane:
Daily Strategy Scheduling).
But there are certain workarounds:
1. In your WealthScript code, establish a time condition and a check for running in the SM using
GetMode2 function from C.Components. Skip the processing of your trade logic before 3:45pm (simple and reliable)
Something like this (untested on-the-fly code):
CODE:
Please log in to see this code.
2. Use an AutoIT or other macro to close and reopen the SM window near given time (w/o code tweaking but less reliable)
Size:
Color:
No need to process every bar to skip processing in the SM.. It's more efficient just to test the time of the last bar at the beginning:
CODE:
Please log in to see this code.
Size:
Color:
thx guys. I should have thought of that before....
Size:
Color:
It is still using up CPU cycle. What about the macro Eugene mentioned ? Can you point me to some samples please ?
Size:
Color:
Checking for current time in WealthScript should take some precious 1% load of your CPU a second or two once
every 15 minutes. If it takes
more you might want to upgrade. At any rate, its usage of CPU cycles is negligible.
AutoIt is an example of an unsupported 3rd party macro language that you would have to learn yourself to come up with a DIY solution on your own - without any warranty that it would work as expected and reliably.
Size:
Color:
What's happening (primarily, I think) is that data is being save to disk with each update for intervals 10 minutes or higher. In terms of cpu load, writes to disk are "expensive".
For less than 10 minutes intervals, data updates are not cached to disk - the file size makes those writes "unaffordable" when updating many symbols. Theoretically, you could switch to 5 minute bars, re-write the script to scale for 15-minute indicators, and ensure that the trade actions occur on the 15-minute intervals. Depending on the script, it may or may not be worth the extra complexity.
Anyway, what's the concern with the cpu load? Is it preventing you from doing other work?
Size:
Color:
yeah some other stuff seems to be sort of slow. I already have i7 box with 64G ram. Have TV on, trading apps, AWS amazon stuff, some java eclipse and Wealth-Lab running. Other stuff is ok but TV seems to be losing the sound once Wealth-Lab kicks in.
Size:
Color:
Wow, Wealth-Lab makes the source of fake news shut up. <grin>
Size:
Color: