Anyone write a Visual Basic program to help their trading?

VB is easy, but the most difficult part is not VB it will be interfacing with other programs through a proprietary API.
 
Quote from rebtut:
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:

Quote from monty21:
2) Economic releases and effect on mkt 10 minutes before release, during release, 10 minutes after.
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.
 
Quote from uexkuell:

[BCorrelation: 500 lines and above[/B]

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 = ($OpenBar-$LowBar)/i2
UpLimit = $CloseBar
DownLimit = $OpenBar
end if
end if
next 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/
 
Quote from Bob111:

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

Or not so basic ones.
 
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
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.
 
Back
Top