public static double RoundToNickel(this double price) public static double RoundToNickel(this double price, bool ceiling)
using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators; /*** Requires installation of Community.Components Extension from www.wealth-lab.com > Extensions, 2016.12 or later***/namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { ClearDebug(); double d = 11.21; PrintDebug("Testing: " + d); PrintDebug("Nickle Rounded: " + d.RoundToNickel()); PrintDebug("Nickle Ceiling: " + d.RoundToNickel(true)); PrintDebug("Nickle Floored: " + d.RoundToNickel(false)); } } }