| 
					
				 | 
			
			
				@@ -36,14 +36,14 @@ func NewOrder( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	opts.StopLoss = sentio.ToFixed(rm.StopLoss(opts.Symbol, bid), 2) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	// Prevent orders those have too small expected profit 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	if opts.TakeProfit < bid+TradingRange { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	if opts.TakeProfit < bid*(1+TradingRange) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		err = sentio.ErrLowTakeProfit 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	// Prevent cases when order will be closed ASAP they were opened. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	// Also, Alpaca requires at least 0.01 gap against base_price 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	if opts.StopLoss > bid-TradingRange { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	if opts.StopLoss > bid*(1-TradingRange) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		err = sentio.ErrHighStoploss 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 |