<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>Hi, <br>
</p>
<p><br>
</p>
<p>I didn't get a satisfactory answer after searching the archives.  I just like to know how do we access market data other than OHLC? for example:
<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>
<table class="GGHFMYIBFOB ace_text-layer ace_line GGHFMYIBBU" style="font-family: 'Lucida Console' !important; font-size: 10pt !important; font-style: inherit !important; font-variant: inherit !important; font-weight: inherit !important; line-height: inherit !important; padding-left: 6px; padding-bottom: 8px; border: none; outline: none; word-wrap: break-word; cursor: text; white-space: pre-wrap !important; color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); width: 1012px;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="font-family: 'Lucida Console'; line-height: 1.2; font-size: 10pt !important; vertical-align: top;" align="left">
<pre tabindex="0" class="GGHFMYIBMOB" id="rstudio_console_output" style="font-family: 'Lucida Console'; font-size: 10pt !important; outline: none; border: none; word-break: break-all; margin: 0px; -webkit-user-select: text; white-space: pre-wrap !important; line-height: 1.2;"><span class="GGHFMYIBCOB ace_keyword" style="color: blue;">head(J.DCE)
</span>               Open     High      Low    Close Volume hmmState
2010-01-04 2886.193 2886.193 2811.193 2833.193      0        1
2010-01-05 2886.193 2886.193 2811.193 2833.193      0        1
2010-01-06 2886.193 2886.193 2811.193 2833.193      0        1
2010-01-07 2886.193 2886.193 2811.193 2833.193      0        1
2010-01-08 2886.193 2886.193 2811.193 2833.193      0        1
2010-01-11 2886.193 2886.193 2811.193 2833.193      0        1
</pre>
</td>
</tr>
<tr>
<td style="font-family: 'Lucida Console'; line-height: 1.2; font-size: 10pt !important; vertical-align: top;" align="left">
<br>
</td>
</tr>
<tr>
<td style="font-family: 'Lucida Console'; line-height: 1.2; font-size: 10pt !important; vertical-align: top;" align="left">
<table style="width: 1012px;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td rowspan="1" style="font-family: 'Lucida Console'; line-height: 1.2; font-size: 10pt !important; vertical-align: top;" height="" width="1" align="left">
<div class="GGHFMYIBCPB ace_keyword" style="color: blue; white-space: pre; -webkit-user-select: text;">
<br>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
In my quantstrat set up,  I simply set up this as an indicator:</p>
<p><br>
</p>
<p></p>
<div>add.indicator(strategy.st, name = "getHMM",<br>
              arguments = list(x = quote(getPrice( mktdata, prefer = "hmmState"))),<br>
              label = "HMMState")</div>
<br>
<br>
getHMM is a simple function I wrote to pass on the data as an indicator, anyhow the error occurs at the getting data part:
<p></p>
<p><br>
</p>
<p></p>
<pre tabindex="0" class="GGHFMYIBMOB" id="rstudio_console_output" style="font-family: 'Lucida Console'; font-size: 10pt !important; outline: none; border: none; word-break: break-all; margin: 0px; -webkit-user-select: text; white-space: pre-wrap !important; line-height: 15px; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: -webkit-left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"><span class="GGHFMYIBCPB ace_keyword" style="color: blue; white-space: pre; -webkit-user-select: text;">> </span><span class="GGHFMYIBCOB ace_keyword" style="color: blue;">test <- applyIndicators(strategy.st,  OHLC(J.DCE))
</span><div class="GGHFMYIBHNC ace_console_error" style="position: relative; overflow: hidden; margin: 5px 5px 5px 0px; padding: 5px 0px 5px 5px; background-color: rgb(229, 229, 229);"><div class="GGHFMYIBINC" style="top: 5px; float: right; margin-right: 10px; margin-left: 5px; margin-bottom: 15px; line-height: 10px; position: relative; -webkit-user-select: none;"><div><img size="0" contenttype="image/png" style="max-width: 99.9%; -moz-user-select: none;" id="img135910" crossorigin="anonymous" aria-expanded="false" tabindex="0" src="cid:8fd55500-6086-462a-9497-66ddfba6c0e0"> <a class="GGHFMYIBKNC" style="font-family: 'Segoe UI'; font-size: 11px; opacity: 0.5; cursor: pointer;">Show Traceback</a></div> <div><img size="0" contenttype="image/png" style="max-width: 99.9%; -moz-user-select: none;" id="img970849" crossorigin="anonymous" aria-expanded="false" tabindex="0" src="cid:f10ca1b2-aa9d-4283-afe3-337661d8b54a"> <a class="GGHFMYIBKNC" style="font-family: 'Segoe UI'; font-size: 11px; opacity: 0.5; cursor: pointer;">Rerun with Debug</a></div></div> <div class="GGHFMYIBLNC GGHFMYIBGOB  ace_constant" style="display: inline; word-wrap: break-word; word-break: break-word; margin-left: 0.3em; color: rgb(197, 6, 11);">Error in getPrice(mktdata, prefer = "hmmState") : 
  subscript out of bounds, no price was discernible from the data</div> </div></pre>
<p></p>
<p><br>
</p>
<p>The data was converted to an xts for quantstrat.  I am probably making a simple error somewhere, would someone please point it out to me, thanks.   Also, is there a better way to or a more correct way to access custom data easily for quantstrat indicators/signals??</p>
<p><br>
</p>
<p>thanks<br>
</p>
</div>
</body>
</html>