VB is easy, but the most difficult part is not VB it will be interfacing with other programs through a proprietary API.
Agree, VB is easy. Interfacing to a trading API is quite easy also (about 100 lines of code). To show what is very difficult just one example from the list: What is quite heavy: To formulate this in a mathematic form that can be understood by a computer. What means "effect"? - Simply "going up" / "going down" (binary)? - Some correlation? .... For going up / down: Perhaps 200 lines of code. Correlation: 500 lines and above. Same thing for all the other points on the list. Rough estimation: To implement the whole list 5000 lines of code may be needed and 1-2 man-years! The main difficult thing will be to formulate properly your ideas in a mathematical way. That is a quite difficult task.
Add up sums, and sums of squares, and plug them into a simple formula -- that takes 500 lines of code? Wtf?
anyone have any visual basic indicators or strategies they would like to share? we could start a visual basic code repository here...
dim ap, bandavg, middleavg as datarow dim periods, type, factor as number dim Lower, Upper as datarow ap = ($HighBar + $LowBar + $CloseBar) / 3 middleavg = GD(ap, 1, type, periods) bandavg = GD(($HighBar - $LowBar), 1, type, periods) Lower = middleavg - bandavg*factor Upper = middleavg + bandavg*factor plot(middleavg) plot(Upper) plot(Lower) SetSignalsOnCrossOver($CloseBar, Lower, Upper)
'Startup-Script for Candlestick pattern recognition. 'Best to be included in single pattern scripts DojiPercent = 0.08 'Special Unit to find candles, preprocessing for subsequent complex combinations for i = Startbar($CloseBar) to LastBar() 'Dojis analyze (minimal body) i2 = $HighBar - $LowBar if i2 <> 0 then BodyPercent = abs($CloseBar - $OpenBar)/i2 IsDoji = BodyPercent < DojiPercent if IsBlackCandle(i) then USPercent = ($HighBar-$OpenBar)/i2 LSPercent = ($CloseBar-$LowBar)/i2 UpLimit = $OpenBar DownLimit = $CloseBar else USPercent = ($HighBar-$CloseBar)/i2 LSPercent[i] = ($OpenBar[i]-$LowBar[i])/i2 UpLimit[i] = $CloseBar[i] DownLimit[i] = $OpenBar[i] end if end if next i[/i][/i][/i][/i][/i][/i][/i]
'Note that you will need to specify in terms of 'your program's plot function dim FloatAxis, DynVol as datarow dim RelOpen, RelHigh, RelLow, RelClose as datarow 'dynamic volatility calculation DynVol = Avg($HighBar-$LowBar, 5)*0.2 'Relative chart calculation FloatAxis = Avg(($HighBar+$LowBar)/2, 5) RelOpen = ($OpenBar-FloatAxis)/DynVol RelHigh = ($HighBar-FloatAxis)/DynVol RelLow = ($LowBar-FloatAxis)/DynVol RelClose = ($CloseBar-FloatAxis)/DynVol Plot(RelClose, 0, RelOpen, RelHigh, RelLow, RelClose)
wasting time on coding useless indicators in VB is pain in the ass. you can use something like wealth lab to test basic ideas. even biggest pain in ass is check the code itself, to be make sure that all calculations are correct here is a good stuff for those with the money. http://www.modulusfe.com/stockchartx/
Exactly. VB/VBA has no "framework" for trading. You need a "platform" like Tradestation or WealthLab. Everything is built into it. With VB/VBA, you must build your own framework...this is NOT trivial.