I'm trying to find (or code my own) indicator to give a numerical expression for slippage.
I'd like to be able to compare the amount of price movement (up and down within a bar) with the amount of orders placed.
For example...under bad conditions, a single order would generate a single tick of movement. So for a flatline bar that has a 1 tick wick both directions (up and down) and 4 orders placed (1 up, 2 down, 1up and close) the value would return 1.00
For market conditions where several orders result in little to no movement, the factor would go down (i.e. moves/orders = small ratio) and under the most unfavorable conditions, small order volumes would generate values above 1 ( moves/orders = larger ratio).
Does anyone know of a similar metric for comparing volume to movement within a given time period?
Feel free to check it out. You can mess around with the GraphicAmplifier value to draw out spikes and lows to your liking and then set the PivotLineValue to whatever threshold suits your tastes.
It's pretty interesting....just a graphical representation of what you'd expect....less slippage during high trading volumes and at certain times of the day (right before electronic trading break and right before midnight when the VWAP resets) the slippage is more likely for orders placed.
Just bear in mind that if you overlay this on a chart that goes back too far (or has any bar with zero volume) it will give you a div0 error. Maybe someone can help with a more elegant way to prevent that from happening.
If you can figure it out, I'd also like to somehow compare the actual up movements to up ticks and down movement to down ticks....(i.e. for a down bar, Absvalue(open-close)+Absvalue(Close-low) and opposite for an up bar. How do you get it to reference values in a bar that haven't been established yet? (i.e. how do I get it to determine whether it's an up or down bar?)
Last edited by RM99; March 23rd, 2011 at 02:08 PM.