class_docstr: This strategy is loosely based on some of the examples from the Van
  K. Tharp book: *Trade Your Way To Financial Freedom*. The logic:
  
    - Enter the market if:
      - The MACD.macd line crosses the MACD.signal line to the upside
      - The Simple Moving Average has a negative direction in the last x
        periods (actual value below value x periods ago)
  
   - Set a stop price x times the ATR value away from the close
  
   - If in the market:
  
     - Check if the current close has gone below the stop price. If yes,
       exit.
     - If not, update the stop price if the new stop price would be higher
       than the current
class_docstr_tok: ["This","strategy","is","loosely","based","on","some","of","the","examples","from","the","Van","K.","Tharp","book",":","*","Trade","Your","Way","To","Financial","Freedom","*",".","The","logic",":","-","Enter","the","market","if",":","-","The","MACD.macd","line","crosses","the","MACD.signal","line","to","the","upside","-","The","Simple","Moving","Average","has","a","negative","direction","in","the","last","x","periods","(","actual","value","below","value","x","periods","ago",")","-","Set","a","stop","price","x","times","the","ATR","value","away","from","the","close","-","If","in","the","market",":","-","Check","if","the","current","close","has","gone","below","the","stop","price",".","If","yes",",","exit",".","-","If","not",",","update","the","stop","price","if","the","new","stop","price","would","be","higher","than","the","current"]
code: def notify_order(self, order):
      if order.status == order.Completed:
          pass
  
      if not order.alive():
          self.order = None
  
file_path: backtrader/samples/macd-settings/macd-settings.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import argparse
  import datetime
  import random
  import backtrader
label_desc: Use image node_id 1 for calling the TheStrategy obj's underlying member method code with example usage: obj.notify_order(order) without return types