I generated random numbers with a simple gaussian distribution with a positive drift and this is what I got!! I do belive price action is semi uselful however I wouldn't ever base a strategy soley on price action
Congratulations -- but look up Monte Carlo analysis. Poke the {ReCalc} button on your keyboard a thousand times, and "call yourself an Institute." If you put in just a little effort and thought, you'll be posting a different story in no time at all. [cue Christopher Walken voiceover] "Hey! This T/A stuff is the shit! Look what I just made!" T/A is nothing but moving-average pairs of price+volume in snapshots of time. How you choose to use it, or project it forward -- that is all on you. For some, the biggest part of TREND+Noise is the trend part. For others, it's the noise. Today, you found the noise. Don't miss the trend.
I won't comment on the TA aspect, but here's a shot at making your code snippet R-like, with vectorization... no need for a for-loop. Code: s<-100;n<-256;sd<-.2;t<-1:n;z<-s*rnorm(n,0,1) price<-s+cumsum(z*sd/sqrt(s)) plot(t,price,type="l")