public CSVOrder(string pair, string setup, string timeframe, double entry, double stop, double takeProfit1, double takeProfit2) { this.pair = pair; this.setup = setup; this.timeframe = timeframe; this.entry = entry; this.stop = stop; this.takeProfit1 = takeProfit1; this.takeProfit2 = takeProfit2; if (setup.ToLower().Contains("bullish")) { tradeOperation = TRADE_OPERATION.OP_BUYLIMIT; stopDistance = Convert.ToDouble(Convert.ToDecimal(entry) - Convert.ToDecimal(stop)); } else if (setup.ToLower().Contains("bearish")) { tradeOperation = TRADE_OPERATION.OP_SELLLIMIT; stopDistance = Convert.ToDouble(Convert.ToDecimal(stop) - Convert.ToDecimal(entry)); } else { throw new Exception("Could not parse setup: " + setup); } }
public CSVOrder(string pair, string setup, string timeframe, double entry, double stop, double takeProfit1, double takeProfit2) { this.pair = pair; this.setup = setup; this.timeframe = timeframe; this.entry = entry; this.stop = stop; this.takeProfit1 = takeProfit1; this.takeProfit2 = takeProfit2; if (setup.ToLower().Contains("bullish")) { tradeOperation = TRADE_OPERATION.OP_BUYLIMIT; stopDistance = Convert.ToDouble(Convert.ToDecimal(entry) - Convert.ToDecimal(stop)); } else if (setup.ToLower().Contains("bearish")) { tradeOperation = TRADE_OPERATION.OP_SELLLIMIT; stopDistance = Convert.ToDouble(Convert.ToDecimal(stop) - Convert.ToDecimal(entry)); } else { throw new Exception("Could not parse setup: " + setup); } }