This could be asked in Computational Science Stack Exchange, but since i don't think the mistake is in computing, i tought about asking here. (If you prefer that this question goes to CS, just notify me in the comments).
I'm trying to simulate Itô's integral computation. Letting $W(t)$ be a Wiener Process (with the standard rules of brownian motion) i'm trying to calculate this integral: $$S = \int_{0}^{T} W(t)dW(t)$$ And i'm doing it just by:
- Generating a $dW$ with gaussian distribution of mean $0$ and variance $dt$, where $dt$ is the time "jump".
- Summing up all $WdW$
But the result is a little... different from what you would expect from Ito's Integral $$S = \int_{0}^{T} W(t)dW(t) = \frac{1}{2}\Big(W\big(T\big)^2 - T\Big)$$
What i'm getting, exactly, is something that i believe to be $\frac{1}{2}\Big(W\big(T\big)^2 + T\Big)$. 
What you have probably done is not realized that different discretizations of SDEs correspond to different processes. This is not the usual case with ODEs since everything is smooth, but since white noise is decidedly not bounded variation, the choice of a forward or backward or midpoint differencing scheme (or things in between) actually have an effect in the continuum limit.
For instance, if we have $$ dX_t = X(t)dW_t,$$ it matters whether we interpret this as $$ X(t+dt)-X(t) = X(t)dW_t$$ (this is called the Ito interpretation)
or $$X(t+dt)-X(t) = \frac{X(t)+X(t+dt)}{2}dW_t $$ (this is called Stratanovich). My guess is that you did a forward scheme $$ X(t+dt)-X(t) = X(t+dt)dW_t$$ which would correspond to a sum that looks like $$ \sum_i W_{i}(W_{i}-W_{i-1})$$since this would give you the result you got.
The usual way things are taught correspond to the Ito interpretation. If you understood Ito's lemma and all that you can see why the forward way corresponds to a larger drift. Instead of $$dX_t = W_tdW_t, $$ you are doing $$dX_t = W_{t+dt}dW_t = (W_t+dW_t)dW_t = W_tdW_t + dt $$ So if you integrate this way you will get $$\int_0^T W_{t+dt}dW_t = \int_0^T W_tdW_t + dt =\left(\frac{1}{2}W_T^2-\frac{1}{2}T\right) + T = \frac{1}{2}W_T^2 + \frac{1}{2}T.$$
So you need to change your numerical computation of $\int_0^T W_tdW_t$ to be Ito style, like $$ \sum_i W_{i-1}(W_i-W_{i-1}).$$
This was just a hunch... if this isn't the problem, let me know and will delete.