Example #1
0
    def __init__(self, ts, entries, stops, is_relative=True, only_first=True):
        """A Trailing Stop order is a stop order that can be set at a defined percentage 
        or amount away from the current market price. The main difference between a regular 
        stop loss and a trailing stop is that the trailing stop moves as the price moves."""

        self.exits = Signals(
            tstop_exits_nb(ts, entries, stops, is_relative, only_first))
Example #2
0
    def __init__(self, ts, entries, stops, is_relative=True, only_first=True):
        """A stop-loss is designed to limit an investor's loss on a security position. 
        Setting a stop-loss order for 10% below the price at which you bought the stock 
        will limit your loss to 10%."""

        self.exits = Signals(
            stoploss_exits_nb(ts, entries, stops, is_relative, only_first))
Example #3
0
 def is_fast_below_slow(self):
     return Signals(self.fast < self.slow)
Example #4
0
 def is_fast_above_slow(self):
     return Signals(self.fast > self.slow)
Example #5
0
 def is_rsi_below_threshold(self, threshold):
     return Signals(self.rsi < threshold)
Example #6
0
 def is_rsi_above_threshold(self, threshold):
     return Signals(self.rsi > threshold)
Example #7
0
 def is_bandwidth_below_threshold(self, threshold):
     return Signals(self.bandwidth < threshold)
Example #8
0
 def is_bandwidth_above_threshold(self, threshold):
     return Signals(self.bandwidth > threshold)
Example #9
0
 def is_percent_b_below_threshold(self, threshold):
     return Signals(self.percent_b < threshold)
Example #10
0
 def is_percent_b_above_threshold(self, threshold):
     return Signals(self.percent_b > threshold)
Example #11
0
 def is_rsi_below(self, thresholds):
     return Signals(below_thresholds_nb(self.rsi, thresholds))
Example #12
0
 def is_rsi_above(self, thresholds):
     return Signals(above_thresholds_nb(self.rsi, thresholds))
Example #13
0
 def is_bandwidth_below(self, thresholds):
     return Signals(below_thresholds_nb(self.bandwidth, thresholds))
Example #14
0
 def is_bandwidth_above(self, thresholds):
     return Signals(above_thresholds_nb(self.bandwidth, thresholds))
Example #15
0
 def is_percent_b_below(self, thresholds):
     return Signals(below_thresholds_nb(self.percent_b, thresholds))
Example #16
0
 def is_percent_b_above(self, thresholds):
     return Signals(above_thresholds_nb(self.percent_b, thresholds))