Paper trading

Paper trading is a stock market simulator. Tradingview enables you to work on paper trading in an easy way: it’s embeeded and you can launch the positions very easily.

I have started to use it as part of the tests I’m doing. It has pros and cons.


It’s very clear and it’s very intuitive to create the positions, move the stop-loss, etc.


  • Mentally you do not have the pressure of the real money you are investing.
  • You launch positions very quickly and they are executed very quickly. Real live does not work like this, and I still do not understand all that happens in the middle. To launch positions in Kraken is very different and the behavior of the market (offer and demand) is different as paper trading operates.

Paper trading is in any case a good tool for testing, and monetize the positions you perform and check if the strategy and the way to put it in place works.

Strategy to test: bb-rsi-cmf

The strategy I’m using is very popular and extended. So many people knows it and therea re thousand of variances to the main one. Surprisingly it still works.

The name I gave to this strategy is “bb-rsi-cmf” and comes from the 3 indicators I’m using to work on it.

These indicators are:

  • Trend indicator = Bollinger bands.
  • Momentum indicator = RSI.
  • Volume indicator = Chaikin Money flow (confirm with japanese candles).

Configuration of the indicators in Trading View

The configuration of the Bollinger Bands in Tradingview can be adjusted, especially for the standard deviation that by default is 2. I have adjusted to 2.5 to increase accuracy.

From the Wikipedia about StdDev:

  • For the normal distribution, this includes 68.27% of the numbers;
  • 2 standard deviations from the mean include 95.45%;
  • 3 standard deviations from the mean include 99.73%;
  • 4 standard deviations from the mean include 99.994%.

The configuration of the Chaikin Money Flow (CMF) indicator just have a parameter: Lenght. It indicates the time period to be used in calculating Chaikin Money Flow (I keep the default value = 20).

The configuration of RSI have a couple of parameters:

  • Length: The time period to be used in calculating the RSI. 14 days is the default.
  • Source: Determines what data from each bar will be used in calculations. “Close” is the default.

Entry criteria:

  • Wait for the candle to pass the low bollinger band. On this event,
    • Check that RSI < 30%, or close to it.
    • Check that Chaikin Money Flow has enough volume.
    • If so, go to next step.
  • Draw the resistances using the red candles taking the ones that are higher.
  • Wait till the value cross the resistance line. It’s better when the cross is done by a green candle. Open the position at this point (this action requires you a quick reaction).
  • Define the exit point and the stop loss.

Exit criteria

  • Define the stop loss (1%).
  • Define the exit point (2%).
  • Close the position when some of the events happen.

During the position is opened

  • Pay attention to the way the value is moving.
  • Check the volume of activity in the table of prices.
  • Check if RSI rises above 70%. This means the market is overboughting (good!).
  • If the value goes up, move the stop-loss up, (ideally turn the stop-loss into a stop-win).

First try, Lose.

This picture below shows the first try I did on this strategy, the result: lose 1%.

Chaikin Money Flow behavior

When Chaikin Money Flow crosses the Zero Line, this can be an indication that there is an impending trend reversal.

  • Bullish Crosses occur when Chaikin Money Flow crosses from below the Zero Line to above the Zero Line. Price then falls.
  • Bearish Crosses occur when Chaikin Money Flow crosses from above the Zero Line to below the Zero Line. Price then rises.

It should be noted that brief crosses can occur resulting in false signals. The best way to avoid these false signals is by examining past performance for the particular security that is being analyzed and even adjusting the thresholds accordingly. For example, instead of a Zero Line Cross, a technical analyst may use two separate lines such as .05 and -.05.

Bolsa para Dummies

Un amigo me recomendó leerme este libro, en concreto la parte 3, que recorre un día de trading cualquiera, repasando hábitos y actividades en las cuales nos deberíamos centrar; y la parte 4, que repasa varias estrategias básicas: gap, bandas de bollinger, y cruce de medias. Me sirvió para confirmar algunas cosas que ya había aprendido y reforzar algunos hábitos.

El libro está escrito en un lenguaje muy directo y repite las cosas varias veces sin resultar demasiado espeso. Se lee rápido y encuadra los conceptos en base a un esquema que se respeta durante todo el libro.

Depth chart

I have access to GDAX and I found this Depth chart that enables you (in some way) to check the momentum and the volume of demand and supply there is in the market. Tradingview also offers this chart.

This post explains how it works.

Lessons observing the chart

Lesson 1: there are positions that enter and exit in miliseconds

When you start watching this chart and see how the buy/sell forces drives the price, you will see a lot of positions entering and disappearing. The limited refresh of the screen just enable you to see flashes. The amount of people with machines procesing automatic positions and cancelling them depends on the coin.

Trading, risk management

Risk management is one of the key points when you trade in any market

I have to mature the risk management mindset and measure how the actions I perform are working with respect a level of exposure that I want to take.

Definition of level of exposure

  • Perform operations between 0,5% and 2% of the value of your portfolio.
  • Understand that for higher volability, the time-spam for trading has to be short, as the risk exposure is higher.
  • When you define a move you have to define the amount or percentage that you expect to earn.
    • You will have to define a ratio of earnings/loss.
    • This ratio should be between 2 – 3. This means that if you expect to with 20 points, you should stop when you are losing 10 points; this corresponds to a “2” ratio.
    • A ratio close to “2” is more conservative. A ratio close to 3 is more risk.
  • If you lose 20% of your portfolio, stop trading, think about what is happening with the right perspective. If you not do it, you have high percentage of losing all.
  • A loss of 10% in a month is unacceptable, this is also an event that should trigger you to stop.
  • Backtest, backtest and backtest is an exercise that really improve the results and reduce the risks.
  • Review trading bias regulary.

Stop Loss

  • Define where to put the stop-loss.
  • Do not touch the stop loss.

Quantitative trading on cryptocurrency market Q2

This is the second chapter of a learning process that started last September.

Second Quarter

The second step is defined for the next 3 months, where the main goal is to define a specific strategy of quantitative trading and work on it with real money on crypto currency market.

Following the V2MOM model:

  • Vision: Have a strategy running in crypto currency market.
  • Values: have fun, learn a lot, build a team with Dani, do practices and more practices.
  • Method: learn about quantitative trading principles and patterns, understand the basis of how blockchain markets work.
  • Obstacles: Time.
  • Measures: have an account with money and making short/long decisions. Have a lot of data related to the backtesting of different versions of a specific strategy. Accumulate a list of learned lessons and experiences for blockchain, quantitative trading and python.

Death line = March 2018

Results (xx April 2018)

  • Time to be accountable

Prestashop admin user does not log in

My Prestashop’s admin user does not log in into the back-office, I have checked the password is right and I still cannot go in. The error message is:

“There is one error. the employee does not existor the password is wrong”

Reset Prestashop admin password

I have followed these steps recommended by different forums:

  1. Look in config/ file in your Prestashop directory and find out the _COOKIE_KEY_ value.
  2. I have copied the value of the parameter: <_COOKIE_KEY_>.
  3. I have updated the entry with the following line:
    UPDATE employee SET passwd = md5(“<_COOKIE_KEY_ value><yourNewPassword>”) WHERE email = “<youremailaddress>”;

This is not working to me, it still does not go in.

Enable error reporting

I have enabled error reporting on Prestashop. And the result is that there is a white screeen after I try to log in. So I have disable the error reporting.


Martin Scorsese-style

Looking the things with the right perspective

Sometimes the smaller choices we make in daily life add up to patterns so routine, so familiar, that we fail to recognize them. Sometimes we are so busy making choices between what is right in front of us, that we fail to see the potential options that sit just outside of our view.


Pull out of your own life, Martin Scorsese-style, and taking a cinematic view of what is
happening – and what you might be missing.

Source: Health Brothers.

Calentador Junker, cambio de electroválvulas

Fin de semana divertido, hasta encontrar la solución, que fue el cambio de las 2 electroválvulas del calentador.

El problema

No daba código de error y la temperatura no subía de 15º. Después de limpiar el chiclé, de revisar el cabezal de la bombona y que el agua subía a presión bien miramos para las electroválvulas.


Cambiamos primero una válvula (la de abajo con pestaña verde), y probamos. Esto no funcionó, con lo que pusimos de nuevo la original.

Cambiamos la electro-válvula de arriba (con pestaña roja), y probamos. Esto tampoco funcionó, con lo que pusimos la otra de abajo de nuevo.

Con las 2 electroválvulas nuevas si funcionó.

Los videos en youtube son muy didácticos.

Simple Fibonacci Trading Strategy

I’m at the point where I can do backtesting with Python, and I need to accumulate knowledge about trading strategies, understand what they try to apply and be able to combine them on real cases I have.

This blog, Trading strategy guides, is a very good source of information well documented.

Fibonacci Trend Line Strategy- Simple Fibonacci Trading Strategy

Now I have to find the way to draw the fibonacci graph in python 🙂