Can I use MMP to read whether a strategy is running or not?

We have an MMP driver that reads from a PAC-R2. I’d like to get it to be able to read whether the strategy is running or not, but can’t seem to find any indication of where that is in the memory map. When I scan the PAC with PAC Terminal it shows in the Status field when the strategy is running or stopped, so it’s available somewhere, but maybe it’s not in the memory map. Ideally, I’d also like to get it to read when the memory has been cleared. Thanks for any help you can provide.

Hi ctk62, I have looked through the OptoMMP Protocol Guide, and I do not see an MMP location for the status of the strategy on the controller or anything having to do with the memory being cleared. Perhaps you can have some type of “heartbeat” value that can be stored in a generic OptoMMP location that you can monitor to see if the strategy is running?

I also looked over our RESTful API, and found that the status of the strategy can be found there with an http(s) request:

(here is the link to that)

As far as API value for when the memory has been cleared, I can’t seem to find anything on that.

There may be something hidden under the covers, so I have submitted an inquiry. Could be a day or two before I find out about that.

I have verified with our product team that there are no OptoMMP values available for what you’re looking for. However, you might consider putting some information in the Scratchpad area, and reading from there. Here are some of the commands that might be relevant for you.

To go off Dan’s comments, we accomplish this by using something called a ‘heartbeat’ signal using scratchpads.

If you place a value in a scratchpad, it will only update if the strategy is running. If you use something that is constantly changing (such as a timstamp), on your MMP application you can check if that value is different from the previous time you read it. If the current read value is the same as the previous for a set amount of time, you know the strategy is not running since the scratchpads are not updating.

Will clearing the memory delete files saved to flash? If that is the case, when you first start your PAC strategy you could create a file(temp.txt?), and do checks that the file exists. If the memory clears and the file is removed, you’ll have your memory clear event.

2 Likes

Thanks for the replies. Will have to figure out a workaround using one of these given techniques. I suppose using the number of charts running could kill two birds here.