SetFormulaName( "CS_VZO" ); //Volume Zone Oscillator by Capital Synergy. //www.capitalsynergy.com SetOption( "InitialEquity", 1000000 ); SetOption( "PriceBoundChecking", 1 ); SetOption( "FuturesMode", True ); SetTradeDelays( 1, 1, 1, 1 ); MarginDeposit = 20000; RoundLotSize = 1; PointValue = 10; PositionSize = MarginDeposit * 1; BuyPrice = SellPrice = ShortPrice = CoverPrice = Open; MAp = Optimize( "MAp", 14, 5, 20, 1 ); MApV = Optimize( "MApV", 14, 5, 20, 1 ); VLow = Optimize( "VLow", 40, 10, 90, 10 ); VHigh = Optimize( "VHigh", 40, 10, 90, 10 ); //Profit and Stop Loss by points instuctions //ApplyStop( stopTypeProfit, stopModePoint, Optimize( "Profit", 100, 50, 1000, 10 ), True ); //ApplyStop( stopTypeLoss, stopModePoint, Optimize( "Loss Target", 100, 50, 1000, 10 ), True ); function VZO( MAp ) { R = sign( C - Ref( C, -1 ) ) * V; VP = EMA( R, MAp ); TV = EMA( V, MAp ); return Nz( 100 * VP / TV ); } //Use VZO for entry. Buy = Cross( VZO( MAp ), -VLow ); Short = Cross( VHigh, VZO( MAp ) ); //Use VZO Moving Average as entry. //Buy = Cross(MA(VZO(MAp),MApV),-VLow); //Short = Cross(VHigh,MA(VZO(MAp),MApV)); Sell = Short; Cover = Buy; Buy = ExRem( Buy, Sell ); Short = ExRem( Short, Cover ); Plot( VZO( MAp ), "VZO" + _PARAM_VALUES(), colorBlue, styleThick ); Plot( MA( VZO( MAp ), MApV ), "VZO MA" + _PARAM_VALUES(), colorBlack, styleThick ); Plot( 60, "", colorLightOrange, styleNoLabel ); Plot( 40, "", colorLightOrange, styleNoLabel ); Plot( 20, "", colorLightOrange, styleNoLabel ); Plot( 0, "", colorBlack, styleNoLabel ); Plot( -20, "", colorLime, styleNoLabel ); Plot( -40, "", colorLime, styleNoLabel ); Plot( -60, "", colorLime, styleNoLabel );