OHLCFactory.gen_candles

You're seeing just the function gen_candles, go back to OHLCFactory module for more information.
Link to this function

gen_candles(timeframe, amount, opts \\ [])

Specs

gen_candles(OHLC.timeframe(), number(), keyword() | nil) :: list()

Generates candles based on parameters provided.

Parameters:

  • timeframe - See available timeframes OHLCHelper.get_timeframes.
  • amount - Amount of candles to generate. Must be bigger than 0.

Available options:

  • :base_price - Base price to use when generating candles. Defaults to 9.
  • :price_direction - Generated candles can increase or decrease in price. :increase, :decrease or :rand which is used by default.
  • :price_change_percentage - With each new candle we dynamically update the price for each new candle. This price can be higher than the previous candle or lesser. With this option you can choose the percentage change for each new candle. Defaults to 2% change with each new candle.