Steps with explanations to set up a server using:
- Virtualenv
- Virtualenvwrapper
- Django
- Gunicorn
| import pandas pd | |
| import numpy as np | |
| from pandas import * | |
| # create a dataframe with the last candles bars being an inside_bar pattern | |
| # bullish_candle: close > open | |
| # bearish_candles: open > close | |
| # mother_bar :: open = 70.123 , high =102.634 ,low = 80.021 , close = 97.653 |
| # Notes on the InsidePinBar setup | |
| # inverted__hammer indicates upward price rejection | |
| # bullish/bearish hammer indicate downward price rejection | |
| # *** how do we trade swing_points ??? entry,stop_loss & take_profit *** | |
| # *** rejection of bearish_trend setup *** | |
| # stop_loss --> 1 pip below hammer_pin_bar's 'low' OR (entry - 10 to 20 pips) | |
| # entry -- > 'high' of the hammer_pin_bar ('buy' order) | |
| # take_profit -- > entry + (2*stop_loss) :: won't the 3 next bars swallow up this margin? |
| # for logging a pesky '500 server error' | |
| # credits :https://stackoverflow.com/questions/238081/how-do-you-log-server-errors-on-django-sites | |
| LOGGING = { | |
| 'version': 1, | |
| 'disable_existing_loggers': False, | |
| 'handlers': { | |
| # Include the default Django email handler for errors | |
| # This is what you'd get without configuring logging at all. | |
| 'mail_admins': { |
| """ | |
| Updating http://bit.ly/2nRmaXc to | |
| v2 oanda API | |
| """ | |
| class API(EndPointsMixin,object): | |
| """updated 'API' class """ | |
| def __init__(self, | |
| environment=None, | |
| access_token=None, | |
| headers=None |
| Assocation Mining | |
| ------------------- | |
| Mlextend can be easily used for finding associations between: | |
| 1. Commodities | |
| 2. Markets | |
| see links below: | |
| http://rasbt.github.io/mlxtend/USER_GUIDE_INDEX/ | |
| http://pbpython.com/market-basket-analysis.html?utm_source=mybridge&utm_medium=blog&utm_campaign=read_more |
| <html> | |
| <head> | |
| <title>Google Charts Tutorial</title> | |
| <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> | |
| <script type="text/javascript"> | |
| google.charts.load('current', {packages: ['corechart']}); | |
| </script> | |
| </head> | |
| <body> | |
| <div id="container" style="width: 550px; height: 400px; margin: 0 auto"></div> |
| https://www.systutorials.com/docs/linux/man/1-monit/ |
| # Installation,see:https://www.rabbitmq.com/install-debian.html | |
| # 1:Execute the following command to add the APT repository to your /etc/apt/sources.list.d: | |
| echo 'deb http://www.rabbitmq.com/debian/ testing main' | | |
| sudo tee /etc/apt/sources.list.d/rabbitmq.list | |
| # 2:(optional) To avoid warnings about unsigned packages, add our public key to your trusted key list using apt-key(8): | |
| wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | | |
| sudo apt-key add - | |
| # see debain handbook for admins : https://debian-handbook.info/ | |
| # django error: That port is already in use | |
| netstat -lpn | grep: <port_number> | |
| kill -9 <process_id> | |
| # View apache2 errors | |
| cat /var/log/apache2/error.log |