nick2112
Jr. Member
 
Posts: 6
|
 |
« Reply #2 on: May 31, 2007, 08:07:21 PM » |
|
That would be fantastic, thanks. I have looked at many software packages over the years and very few seem to have the Volatility Stop available. Tradecision offers soooo much, and I feel this would just put the icing on the cake. Dont want to push my luck, but do you think Pyrapoint would be possible?
Here the VS code (TradeStation) including Zig Zag:
inputs :ATRlength(9),ATRfactor(2.5),trounup(close),troundow(close),lastpivoth(c),lastpivotl(c),grosuraswing(1),cor(red);
vars :lasthigh(high), tend(0),lastlow(low),numbars(0),DERIVADA(0),FACTORDEREVERSAO(0), numbarslast(0),swing(0);
numbars=1+numbars; FACTORDEREVERSAO=ATRfactor*XAverage(TrueRange,ATRlength)[1]; { plot2(numbars,"duracao");plot3(amplitud,"Amplitud");PLOT4(DERIVADA,"DERIVADA"); }
IF tend <>1 and trounup > lastlow+FACTORDEREVERSAO THEN BEGIN alert(" up"); numbars=numbarslast+1;lasthigh=lastpivoth; swing=TL_New(date[numbars],time[numbars],low[numbars], Date, Time, high);TL_SetSize(swing, grosuraswing);TL_SetColor(swing, cor); numbarslast=-1;tend=1;PLOT3 (lastlow+FACTORDEREVERSAO,"QUEBRAACI",black); END; IF tend <>-1 AND troundow < lasthigh-FACTORDEREVERSAO THEN BEGIN alert(" down"); numbars=numbarslast+1;lastlow=lastpivotl; swing=TL_New(date[numbars],time[numbars],high[numbars], Date, Time, low);TL_SetSize(swing, grosuraswing);TL_SetColor(swing, cor); numbarslast=-1;tend=-1;PLOT4(lasthigh-FACTORDEREVERSAO,"QUEBRAAB",black); END; if tend=-1 then begin if lastlow > lastpivotl then begin lastlow=lastpivotl;lasthigh=lastpivoth; numbarslast=0;TL_SetEnd(swing,date,time,low); end else begin numbarslast=numbarslast+1;end; end; if tend= 1 then begin if lasthigh < lastpivoth then begin lasthigh=lastpivoth; lastlow=lastpivotl; numbarslast=0;TL_SetEnd(swing,date,time,high); end else begin numbarslast=numbarslast+1;end; end; if tend=-1 then begin PLOT3 (lastlow+FACTORDEREVERSAO,"QUEBRAACI"); end; if tend=1 then begin PLOT4(lasthigh-FACTORDEREVERSAO,"QUEBRAAB"); end;
|