Improving the quality of sparse data
Improving the quality of sparse data
I've found a way to enhance the quality of the data during quiet times in the market. The attached image demonstrates the difference. It helps me a lot when developing a trading system that is supposed to work round the clock. If anyone is interested I'll post the study.
- Attachments
-
- picture12.png
- (56.17 KiB) Downloaded 367 times
Very simple really. It does what some CFD market makers do to their charts. It computes the mid-points of the ask and bids. It's not totally accurate though as it doesn't look at the intra bar values to compute the correct highs and lows but its good enough. Set the properties of the the study as shown in the attached image. The colors don't matter. One major downside to this is you can't run standard studies on it since it's an indicator itself plotted as a candlestick chart. Until MC allows us to create synthetic symbols you have to replicate the studies you are interested in into this one. It's a general issue I've requested MC to fix to allow me to utilize the mid-point (and any other modified data) as if it's from a normal data source.
variables:
oaskq(0), obidq(0), omidq(0),
haskq(0), hbidq(0), hmidq(0),
laskq(0), lbidq(0), lmidq(0),
caskq(0), cbidq(0), cmidq(0),
colorb(0);
oaskq = open of data1; // open ask
obidq = open of data2; // open bid
omidq = (obidq + oaskq)/2.0; // mid-point of open bid-ask
haskq = high of data1; // high ask
hbidq = high of data2; // high bid
hmidq = (hbidq + haskq)/2.0; // mid-point of highest bid-ask
laskq = low of data1; // low ask
lbidq = low of data2; // low bid
lmidq = (lbidq + laskq)/2.0; // mid-point of lowest bid-ask
caskq = close of data1; // close ask
cbidq = close of data2; // close bid
cmidq = (cbidq + caskq)/2.0; // mid-point of latest bid-ask
if cmidq < omidq then colorb = red;
if cmidq > omidq then colorb = darkgreen;
if cmidq = omidq then colorb = black;
plot1(hmidq,"High",colorb);
plot2(lmidq,"Low",colorb);
plot3(omidq,"Open",colorb);
plot4(cmidq,"Close",colorb);
variables:
oaskq(0), obidq(0), omidq(0),
haskq(0), hbidq(0), hmidq(0),
laskq(0), lbidq(0), lmidq(0),
caskq(0), cbidq(0), cmidq(0),
colorb(0);
oaskq = open of data1; // open ask
obidq = open of data2; // open bid
omidq = (obidq + oaskq)/2.0; // mid-point of open bid-ask
haskq = high of data1; // high ask
hbidq = high of data2; // high bid
hmidq = (hbidq + haskq)/2.0; // mid-point of highest bid-ask
laskq = low of data1; // low ask
lbidq = low of data2; // low bid
lmidq = (lbidq + laskq)/2.0; // mid-point of lowest bid-ask
caskq = close of data1; // close ask
cbidq = close of data2; // close bid
cmidq = (cbidq + caskq)/2.0; // mid-point of latest bid-ask
if cmidq < omidq then colorb = red;
if cmidq > omidq then colorb = darkgreen;
if cmidq = omidq then colorb = black;
plot1(hmidq,"High",colorb);
plot2(lmidq,"Low",colorb);
plot3(omidq,"Open",colorb);
plot4(cmidq,"Close",colorb);
- Attachments
-
- picture1.png
- (11.11 KiB) Downloaded 350 times
-
- Posts: 407
- Joined: 01 Jan 2008
- Been thanked: 3 times