示例#1
0
 public static double GetPipsFromRelative(this ProtoOASymbol symbol, long relative) => Math.Round((relative / 100000.0) / symbol.GetPipSize(), symbol.Digits - symbol.PipPosition);
示例#2
0
 public static double GetPipValue(this ProtoOASymbol symbol, double tickValue) => tickValue * (symbol.GetPipSize() / symbol.GetTickSize());
示例#3
0
        public static double SubtractPipsFromPrice(this ProtoOASymbol symbol, double price, double pips)
        {
            var pipsInPrice = pips * symbol.GetPipSize();

            return(Math.Round(price - pipsInPrice, symbol.Digits));
        }
示例#4
0
        public static long GetRelativeFromPips(this ProtoOASymbol symbol, double pips)
        {
            var pipsInPrice = pips * symbol.GetPipSize();

            return((long)Math.Round(pipsInPrice * 100000, symbol.Digits));
        }
示例#5
0
        public static double AddPipsToPrice(this ProtoOASymbol symbol, double price, double pips)
        {
            var pipsInPrice = pips * symbol.GetPipSize();

            return(Math.Round(price + pipsInPrice, symbol.Digits));
        }