diff --git a/home/installation/index.html b/home/installation/index.html index d1aa09d..88aa2f2 100755 --- a/home/installation/index.html +++ b/home/installation/index.html @@ -477,6 +477,30 @@ + + +
  • + + + Not finished yet + + + + +
  • @@ -1509,6 +1533,30 @@ + + +
  • + + + Not finished yet + + + + +
  • @@ -1620,51 +1668,50 @@

    Creating virtual environment
  • Create a folder called coding wherever you want on your computer. I suggest anywhere that isn't your desktop. The best would be another hard drive that isn't your main hard drive
  • -

    Create a folder inside that folder called venvs - venv stands for virtual enviromnet -now go to your terminal and type cd -then after the space you want to click and drag the venvs folder to the terminal and it should place the path in the terminal -then press enter and your terminal should be pointing to that directory

    -

    creating keys file -create a folder somehwere on your computer -create a file inside that folder called my_stuff.py -Create venv -python -m venv qfree -now cd into qfree -in the command line type echo (this should be the path to your folder) > my_keys.pth -example -echo E:\Coding\my_keys > my_keys.pth -qfree\Scripts\activate.bat - this will activate the virtual enviromnelt -Now you will see we have free to the left of the thing

    -

    Ctrlp shift p type in word interpreter -Select python interpreter -Then enter interpreter path -Then find -Then go to the coding folder then venvs then qfree then scripts then click on python.exe

    -

    Github part -Click on green code button and copy url to clipboard from https

    -

    Then go to vscode and ctrl shift p then type in clone and click github clone and then paste the repo -And if vs code asks you to log into github click yes

    -

    Then when it asks you for a folder you open the coding folder you created and then click yes or ok

    -

    Ctrl shift p and type interpreter select python inter

    -

    Then choose qfree

    -

    Vscode file autosave -Vscode search clone git repo then paste … select folder -Now create new file called test.ipynb

    -

    Select kernel python en

    -

    Add this to settings.json -"editor.parameterHints.enabled": false, -"python.terminal.activateEnvironment": true,

    -

    For me … show them how to print in a python file … and also show them how to do math in the python file

    -

    python beginners playlist ... https://www.youtube.com/playlist?list=PL-osiE80TeTskrapNbzXhwoFUiLCjGgY7

    -

    Create github -Create repo -Then download python -Download vs code -Then clone repo -Then create venv -Pip install quantfreedom -Then select inpertere -Then menu terminal new terminal

    +

    Not finished yet

    +

    create venv

    + diff --git a/quantfreedom/helpers/helper_funcs/index.html b/quantfreedom/helpers/helper_funcs/index.html index e6ee2a6..0f413ba 100755 --- a/quantfreedom/helpers/helper_funcs/index.html +++ b/quantfreedom/helpers/helper_funcs/index.html @@ -1807,7 +1807,6 @@

    summary

    -

    Video

    diff --git a/search/search_index.json b/search/search_index.json index 825fc1b..127a893 100755 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"nav_file/","title":"Nav file","text":""},{"location":"summary/","title":"Summary","text":""},{"location":"beginners/guide/","title":"Beginners Guide","text":"

    these are just suggestion playlists ... if you don't like the videos please find your own playlists that you like

    study the basics of python

    working with classes

    then study the basics of numpy ... pick one of the playlists not all of them

    study plotly

    "},{"location":"home/installation/","title":"Installation","text":"

    Make sure you read the entire bullet point before you start doing what the bullet point says.

    "},{"location":"home/installation/#step-1-creating-a-github-account","title":"Step 1: Creating a github account","text":"

    Watch this video to get an idea of what you are about to do. But do not follow this is just for informations: https://www.youtube.com/watch?v=Gn3w1UvTx0A

    "},{"location":"home/installation/#step-2-installing-python","title":"Step 2: Installing Python","text":""},{"location":"home/installation/#step-3-installing-git-bash","title":"Step 3: Installing Git Bash","text":"

    Git Bash is how you allow your computer to talk to github.

    "},{"location":"home/installation/#step-4-download-visual-studio-code","title":"Step 4: Download Visual Studio Code","text":"

    This is the program I use to code

    "},{"location":"home/installation/#installing-extensions","title":"Installing Extensions","text":""},{"location":"home/installation/#creating-virtual-environment","title":"Creating virtual environment","text":"

    This part isn't done yet but you will need to make your default profile the cmd or zrh ... then create a virtual env ... then select that env as your default interpreter

    Create a folder inside that folder called venvs - venv stands for virtual enviromnet now go to your terminal and type cd then after the space you want to click and drag the venvs folder to the terminal and it should place the path in the terminal then press enter and your terminal should be pointing to that directory

    creating keys file create a folder somehwere on your computer create a file inside that folder called my_stuff.py Create venv python -m venv qfree now cd into qfree in the command line type echo (this should be the path to your folder) > my_keys.pth example echo E:\\Coding\\my_keys > my_keys.pth qfree\\Scripts\\activate.bat - this will activate the virtual enviromnelt Now you will see we have free to the left of the thing

    Ctrlp shift p type in word interpreter Select python interpreter Then enter interpreter path Then find Then go to the coding folder then venvs then qfree then scripts then click on python.exe

    Github part Click on green code button and copy url to clipboard from https

    Then go to vscode and ctrl shift p then type in clone and click github clone and then paste the repo And if vs code asks you to log into github click yes

    Then when it asks you for a folder you open the coding folder you created and then click yes or ok

    Ctrl shift p and type interpreter select python inter

    Then choose qfree

    Vscode file autosave Vscode search clone git repo then paste \u2026 select folder Now create new file called test.ipynb

    Select kernel python en

    Add this to settings.json \"editor.parameterHints.enabled\": false, \"python.terminal.activateEnvironment\": true,

    For me \u2026 show them how to print in a python file \u2026 and also show them how to do math in the python file

    python beginners playlist ... https://www.youtube.com/playlist?list=PL-osiE80TeTskrapNbzXhwoFUiLCjGgY7

    Create github Create repo Then download python Download vs code Then clone repo Then create venv Pip install quantfreedom Then select inpertere Then menu terminal new terminal

    "},{"location":"quantfreedom/backtesters/bt_live/","title":"bt_live","text":""},{"location":"quantfreedom/backtesters/bt_live/#quantfreedom.backtesters.bt_live-functions","title":"Functions","text":""},{"location":"quantfreedom/backtesters/bt_regular/","title":"bt_regular","text":""},{"location":"quantfreedom/backtesters/bt_regular/#quantfreedom.backtesters.bt_regular-functions","title":"Functions","text":""},{"location":"quantfreedom/core/enums/","title":"enums","text":""},{"location":"quantfreedom/core/enums/#quantfreedom.core.enums-classes","title":"Classes","text":""},{"location":"quantfreedom/core/enums/#quantfreedom.core.enums.BacktestSettings","title":"BacktestSettings","text":"

    Bases: NamedTuple

    Settings for filtering the results of your backtest. The main purpose of this is to save on memory and also there is sometimes no point in wanting to see strategies that are negative gains or below a specific qf score because they are useless.

    Parameters:

    Name Type Description Default gains_pct_filter float = -np.inf

    Will not record any strategies whos gains % result is below gains_pct_filter

    required qf_filter float = -np.inf

    Will not record any strategies whos qf score result is below the qf filter. qf_score is between -1 to 1,

    required total_trade_filter int = -1

    Will not record any strategies whos total trades result is below total trades filter.

    required"},{"location":"quantfreedom/core/enums/#quantfreedom.core.enums.IncreasePositionTypeT","title":"IncreasePositionTypeT","text":"

    Bases: NamedTuple

    The different ways you can increase your position

    Parameters:

    Name Type Description Default AmountEntrySize int= 0

    How much you want your position size to be per trade in USDT

    required PctAccountEntrySize int = 1

    If you have an equity of 1000 and you want your pct account entry size to be 1% then that means each trade will be a position size of 10 usdt

    required RiskAmountEntrySize int = 2

    How much you will risk per trade. You must have a stop loss in order to use this mode.

    required RiskPctAccountEntrySize int = 3

    How much of your account you want to risk per trade. If you have an equtiy of 1000 and you want to risk 1% then each trade would be risking $10. You must have a stop loss in order to use this mode

    required SmalletEntrySizeAsset int = 4

    What ever the exchange smallest asset size is that is what your position size will be for each trade. Let's say the smallest is .001 for btcusdt, then each trade will be worth .001 btc

    required"},{"location":"quantfreedom/core/enums/#quantfreedom.core.enums.LeverageStrategyTypeT","title":"LeverageStrategyTypeT","text":"

    Bases: NamedTuple

    Choosing which leverage strategy you would like to use.

    Parameters:

    Name Type Description Default Dynamic int = 0

    This will automatically adjust your leverage to be .001 percent further than your stop loss. The reason behind this is to that it will keep your used cash amount down as much as possible so you can place more trades on the same or other assets.

    required Static int = 1

    Static leverage

    required"},{"location":"quantfreedom/core/enums/#quantfreedom.core.enums.TakeProfitStrategyTypeT","title":"TakeProfitStrategyTypeT","text":"

    Bases: NamedTuple

    How you want to process the take profit

    Parameters:

    Name Type Description Default RiskReward int = 0

    Risk to reward

    required Provided int = 1

    Your strategy will provide the exit prices

    required Nothing int = 2

    No take profits.

    required"},{"location":"quantfreedom/core/strategy/","title":"strategy","text":""},{"location":"quantfreedom/core/strategy/#quantfreedom.core.strategy-classes","title":"Classes","text":""},{"location":"quantfreedom/exchanges/binance_usdm/","title":"binance_usdm","text":""},{"location":"quantfreedom/exchanges/binance_usdm/#quantfreedom.exchanges.binance_usdm-classes","title":"Classes","text":""},{"location":"quantfreedom/exchanges/binance_usdm/#quantfreedom.exchanges.binance_usdm.BinanceUSDM","title":"BinanceUSDM","text":"

    Bases: Exchange

    "},{"location":"quantfreedom/exchanges/binance_usdm/#quantfreedom.exchanges.binance_usdm.BinanceUSDM-functions","title":"Functions","text":""},{"location":"quantfreedom/exchanges/binance_usdm/#quantfreedom.exchanges.binance_usdm.BinanceUSDM.get_all_symbols_info","title":"get_all_symbols_info","text":"
    get_all_symbols_info()\n

    Binance Exchange Information

    Parameters:

    Name Type Description Default None required

    Returns:

    Type Description Dictionary

    dictionary of info about the symbols

    "},{"location":"quantfreedom/exchanges/binance_usdm/#quantfreedom.exchanges.binance_usdm.BinanceUSDM.get_candles","title":"get_candles","text":"
    get_candles(symbol, timeframe, since_datetime=None, until_datetime=None, candles_to_dl=1500)\n
    "},{"location":"quantfreedom/exchanges/binance_usdm/#quantfreedom.exchanges.binance_usdm.BinanceUSDM.get_candles--summary","title":"Summary","text":"

    Biance USDM candle docs

    "},{"location":"quantfreedom/exchanges/binance_usdm/#quantfreedom.exchanges.binance_usdm.BinanceUSDM.get_candles--explainer-video","title":"Explainer Video","text":"

    Coming Soon but if you want/need it now please let me know in discord or telegram and i will make it for you

    Parameters:

    Name Type Description Default symbol str

    Use get_symbols_list if you need to know the symbols

    required timeframe str

    \"1m\", \"5m\", \"15m\", \"30m\", \"1h\", \"2h\", \"4h\", \"6h\", \"12h\", \"d\", \"w\"

    required since_datetime datetime

    The start date, in datetime format, of candles you want to download. EX: datetime(year, month, day, hour, minute)

    None until_datetime datetime

    The until date, in datetime format, of candles you want to download minus one candle so if you are on the 5 min if you say your until date is 1200 your last candle will be 1155. EX: datetime(year, month, day, hour, minute)

    None candles_to_dl int

    The amount of candles you want to download

    1500

    Returns:

    Type Description array

    a 2 dim array with the following columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\"

    "},{"location":"quantfreedom/exchanges/binance_usdm/#quantfreedom.exchanges.binance_usdm.BinanceUSDM.get_exchange_info","title":"get_exchange_info","text":"
    get_exchange_info()\n

    Binance Exchange Information

    Parameters:

    Name Type Description Default None required

    Returns:

    Type Description Dictionary

    dictionary of info about the exchange

    "},{"location":"quantfreedom/exchanges/binance_usdm/#quantfreedom.exchanges.binance_usdm.BinanceUSDM.get_symbols_list","title":"get_symbols_list","text":"
    get_symbols_list()\n

    Binance Exchange Information

    Parameters:

    Name Type Description Default None required

    Returns:

    Type Description List

    List of exchange symbols

    "},{"location":"quantfreedom/exchanges/bybit/","title":"bybit","text":""},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit-classes","title":"Classes","text":""},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit","title":"Bybit","text":"

    Bases: Exchange

    "},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit-functions","title":"Functions","text":""},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit.__init__","title":"__init__","text":"
    __init__(use_testnet, api_key=None, secret_key=None)\n

    main docs page https://bybit-exchange.github.io/docs/v5/intro upgrade to unified account

    "},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit.adjust_order","title":"adjust_order","text":"
    adjust_order(symbol, asset_size=None, category='linear', custom_order_id=None, orderIv=None, order_id=None, price=None, slLimitPrice=None, slTriggerBy=None, stopLoss=None, takeProfit=None, tpLimitPrice=None, tpslMode=None, tpTriggerBy=None, triggerBy=None, triggerPrice=None)\n
    "},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit.cancel_all_open_orders","title":"cancel_all_open_orders","text":"
    cancel_all_open_orders(symbol=None, category='linear', baseCoin=None, settleCoin=None, orderFilter=None, stopOrderType=None)\n
    "},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit.close_hedge_positions_and_orders","title":"close_hedge_positions_and_orders","text":"
    close_hedge_positions_and_orders(symbol=None, settleCoin=None)\n

    Parameters:

    Name Type Description Default symbol str None"},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit.create_order","title":"create_order","text":"
    create_order(symbol, buy_sell, position_mode, order_type, asset_size, category='linear', time_in_force='GTC', price=None, triggerDirection=None, triggerPrice=None, triggerBy=None, tpTriggerBy=None, slTriggerBy=None, custom_order_id=None, takeProfit=None, stopLoss=None, reduce_only=None, closeOnTrigger=None, isLeverage=None)\n
    "},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit.get_all_symbols_info","title":"get_all_symbols_info","text":"
    get_all_symbols_info(category='linear', limit=500, symbol=None, status=None, baseCoin=None)\n

    Bybit API link to Get Instrument Info

    "},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit.get_candles","title":"get_candles","text":"
    get_candles(symbol, timeframe, since_datetime=None, until_datetime=None, candles_to_dl=1000, category='linear')\n
    "},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit.get_candles--summary","title":"Summary","text":"

    Bybit candle docs

    "},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit.get_candles--explainer-video","title":"Explainer Video","text":"

    Coming Soon but if you want/need it now please let me know in discord or telegram and i will make it for you

    Parameters:

    Name Type Description Default symbol str

    Use Bybit API for symbol list

    required timeframe str

    \"1m\", \"5m\", \"15m\", \"30m\", \"1h\", \"2h\", \"4h\", \"6h\", \"12h\", \"d\", \"w\"

    required since_datetime datetime

    The start date, in datetime format, of candles you want to download. EX: datetime(year, month, day, hour, minute)

    None until_datetime datetime

    The until date, in datetime format, of candles you want to download minus one candle so if you are on the 5 min if you say your until date is 1200 your last candle will be 1155. EX: datetime(year, month, day, hour, minute)

    None candles_to_dl int

    The amount of candles you want to download

    1000 category str

    Bybit categories link

    'linear'

    Returns:

    Type Description array

    a 2 dim array with the following columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\"

    "},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit.get_closed_pnl","title":"get_closed_pnl","text":"
    get_closed_pnl(symbol, limit=50, since_datetime=None, until_datetime=None, category='linear')\n

    Bybit API link to Get Closed Profit and Loss

    "},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit.get_open_orders","title":"get_open_orders","text":"
    get_open_orders(symbol, baseCoin=None, category='linear', custom_order_id=None, limit=50, orderFilter=None, orderStatus=None, order_id=None, settleCoin=None, since_datetime=None, until_datetime=None)\n
    "},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit.get_order_history","title":"get_order_history","text":"
    get_order_history(baseCoin=None, category='linear', custom_order_id=None, limit=50, orderFilter=None, orderStatus=None, order_id=None, settleCoin=None, since_datetime=None, symbol=None, until_datetime=None)\n
    "},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit.get_position_info","title":"get_position_info","text":"
    get_position_info(symbol=None, baseCoin=None, category='linear', limit=50, settleCoin=None)\n
    "},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit.get_risk_limit_info","title":"get_risk_limit_info","text":"
    get_risk_limit_info(symbol, category='linear')\n

    Bybit API link to Get Risk Limit

    "},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit.get_symbols_list","title":"get_symbols_list","text":"
    get_symbols_list()\n

    Returns a list of the symbols in alphabetical order

    Parameters:

    Name Type Description Default None required

    Returns:

    Type Description list

    symbols

    "},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit.get_trading_fee_rates","title":"get_trading_fee_rates","text":"
    get_trading_fee_rates(symbol=None, baseCoin=None, category='linear')\n
    "},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit.get_wallet_info","title":"get_wallet_info","text":"
    get_wallet_info(accountType='UNIFIED', trading_with=None)\n
    "},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit.set_leverage","title":"set_leverage","text":"
    set_leverage(symbol, leverage, category='linear')\n
    "},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit.set_leverage_mode","title":"set_leverage_mode","text":"
    set_leverage_mode(setMarginMode='ISOLATED_MARGIN')\n

    ISOLATED_MARGIN, REGULAR_MARGIN(i.e. Cross margin), PORTFOLIO_MARGIN

    "},{"location":"quantfreedom/exchanges/bybit/#quantfreedom.exchanges.bybit.Bybit.set_position_mode","title":"set_position_mode","text":"
    set_position_mode(position_mode, symbol, category='linear', trading_with=None)\n
    "},{"location":"quantfreedom/exchanges/mufex/","title":"mufex","text":""},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex-classes","title":"Classes","text":""},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex","title":"Mufex","text":"

    Bases: Exchange

    "},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex-functions","title":"Functions","text":""},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.__init__","title":"__init__","text":"
    __init__(use_testnet, api_key=None, secret_key=None)\n

    main docs page https://www.mufex.finance/apidocs/derivatives/contract/index.html

    Make sure you have your position mode set to hedge or else a lot of functions will not work. https://www.mufex.finance/apidocs/derivatives/contract/index.html?console#t-dv_switchpositionmode

    "},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.adjust_order","title":"adjust_order","text":"
    adjust_order(params={})\n

    you basically have to use the same info that you would for create order https://www.mufex.finance/apidocs/derivatives/contract/index.html#t-dv_placeorder

    "},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.cancel_all_open_orders_per_symbol","title":"cancel_all_open_orders_per_symbol","text":"
    cancel_all_open_orders_per_symbol(symbol)\n

    no link yet

    "},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.cancel_open_order","title":"cancel_open_order","text":"
    cancel_open_order(symbol, order_id=None, custom_order_id=None)\n
    "},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.close_hedge_positions_and_orders","title":"close_hedge_positions_and_orders","text":"
    close_hedge_positions_and_orders(symbol=None, settleCoin=None)\n

    Parameters:

    Name Type Description Default symbol str None"},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.create_order","title":"create_order","text":"
    create_order(symbol, buy_sell, position_mode, order_type, asset_size, time_in_force='GoodTillCancel', price=None, triggerDirection=None, triggerPrice=None, triggerBy=None, tpTriggerBy=None, slTriggerBy=None, custom_order_id=None, takeProfit=None, stopLoss=None, reduce_only=None, closeOnTrigger=None)\n

    time_in_force: GoodTillCancel ImmediateOrCancel FillOrKill PostOnly

    position_mode: used to identify positions in different position modes. Required if you are under Hedge Mode: 0-One-Way Mode 1-Buy side of both side mode 2-Sell side of both side mode

    "},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.get_all_symbols_info","title":"get_all_symbols_info","text":"
    get_all_symbols_info(category='linear', limit=1000, symbol=None)\n

    Mufex API link to Get Instrument Info

    Parameters:

    Name Type Description Default category str

    If category is not passed, then return \"\"For now, default:linear

    'linear' limit int

    Limit for data size per page, max size is 1000. Default as showing 500 pieces of data per page.It's not sorted by time

    1000 symbol str

    Symbol

    None

    Returns:

    Type Description _type_

    description

    "},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.get_candles","title":"get_candles","text":"
    get_candles(symbol, timeframe, since_datetime=None, until_datetime=None, candles_to_dl=1500, category='linear')\n

    mufex candle docs

    Parameters:

    Name Type Description Default symbol str

    Mufex Symbol List

    required timeframe str

    \"1m\", \"5m\", \"15m\", \"30m\", \"1h\", \"2h\", \"4h\", \"6h\", \"12h\", \"d\", \"w\"

    required since_datetime datetime

    The start date, in datetime format, of candles you want to download. EX: datetime(year, month, day, hour, minute)

    None until_datetime datetime

    The until date, in datetime format, of candles you want to download minus one candle so if you are on the 5 min if you say your until date is 1200 your last candle will be 1155. EX: datetime(year, month, day, hour, minute)

    None candles_to_dl int

    The amount of candles you want to download

    1500 category str

    mufex categories link

    'linear'

    Returns:

    Type Description array

    a 2 dim array with the following columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\"

    "},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.get_closed_pnl","title":"get_closed_pnl","text":"
    get_closed_pnl(symbol, limit=200, since_datetime=None, until_datetime=None)\n

    Mufex API link to Get Closed Profit and Loss

    "},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.get_filled_orders","title":"get_filled_orders","text":"
    get_filled_orders(symbol, limit=200, since_datetime=None, until_datetime=None, execType=None, order_id=None)\n

    Get user's trading records. The results are ordered in descending order (the first item is the latest). Returns records up to 2 years old.

    use link to see all Request Parameters

    "},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.get_open_orders","title":"get_open_orders","text":"
    get_open_orders(symbol, limit=50, order_id=None, custom_order_id=None, orderFilter=None)\n

    Query real-time order information. If only orderId or orderLinkId are passed, a single order will be returned; otherwise, returns up to 500 unfilled orders

    orderId limit

    "},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.get_order_history","title":"get_order_history","text":"
    get_order_history(symbol, limit=50, order_id=None, custom_order_id=None, orderStatus=None, orderFilter=None)\n

    use link to see all Request Parameters

    "},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.get_position_info","title":"get_position_info","text":"
    get_position_info(symbol=None, settleCoin=None, limit=50)\n
    "},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.get_risk_limit_info","title":"get_risk_limit_info","text":"
    get_risk_limit_info(symbol, category='linear')\n

    Mufex API link to Get Risk Limit

    Parameters:

    Name Type Description Default symbol str

    Symbol

    required category str

    If category is not passed, then return \"\"For now, default:linear

    'linear'

    Returns:

    Type Description _type_

    description

    "},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.get_symbol_trading_fee_rates","title":"get_symbol_trading_fee_rates","text":"
    get_symbol_trading_fee_rates(symbol=None)\n
    "},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.get_symbols_list","title":"get_symbols_list","text":"
    get_symbols_list()\n

    Returns a list of the symbols in alphabetical order

    Parameters:

    Name Type Description Default None required

    Returns:

    Type Description list

    symbols

    "},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.get_trading_fee_rates","title":"get_trading_fee_rates","text":"
    get_trading_fee_rates(symbol=None)\n
    "},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.get_wallet_info","title":"get_wallet_info","text":"
    get_wallet_info(trading_with=None)\n
    "},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.set_leverage","title":"set_leverage","text":"
    set_leverage(symbol, leverage)\n

    No link yet

    "},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.set_leverage_mode","title":"set_leverage_mode","text":"
    set_leverage_mode(symbol, leverage_mode, leverage=5)\n

    Cross/isolated mode. 0: cross margin mode; 1: isolated margin mode

    "},{"location":"quantfreedom/exchanges/mufex/#quantfreedom.exchanges.mufex.Mufex.set_position_mode","title":"set_position_mode","text":"
    set_position_mode(position_mode, trading_with=None, symbol=None)\n
    "},{"location":"quantfreedom/helpers/bsc_scan/","title":"bsc_scan","text":""},{"location":"quantfreedom/helpers/bsc_scan/#quantfreedom.helpers.bsc_scan-classes","title":"Classes","text":""},{"location":"quantfreedom/helpers/bsc_scan/#quantfreedom.helpers.bsc_scan.BSC_Scan","title":"BSC_Scan","text":""},{"location":"quantfreedom/helpers/bsc_scan/#quantfreedom.helpers.bsc_scan.BSC_Scan-functions","title":"Functions","text":""},{"location":"quantfreedom/helpers/bsc_scan/#quantfreedom.helpers.bsc_scan.BSC_Scan.check_contract_execution_status","title":"check_contract_execution_status","text":"
    check_contract_execution_status(tx_hash)\n

    Check Contract Execution Status

    "},{"location":"quantfreedom/helpers/bsc_scan/#quantfreedom.helpers.bsc_scan.BSC_Scan.check_transaction_receipt_status","title":"check_transaction_receipt_status","text":"
    check_transaction_receipt_status(tx_hash)\n

    Check Transaction Receipt Status

    "},{"location":"quantfreedom/helpers/bsc_scan/#quantfreedom.helpers.bsc_scan.BSC_Scan.get_bnb_balance_for_address","title":"get_bnb_balance_for_address","text":"
    get_bnb_balance_for_address(address)\n

    Get BNB Balance for Address

    "},{"location":"quantfreedom/helpers/bsc_scan/#quantfreedom.helpers.bsc_scan.BSC_Scan.get_transaction_by_hash","title":"get_transaction_by_hash","text":"
    get_transaction_by_hash(tx_hash, address, contractaddress='0x55d398326f99059fF775485246999027B3197955', startblock=0, endblock=99999999, page=1, offset=1000, sort='desc')\n

    Default contract address is USDT

    "},{"location":"quantfreedom/helpers/bsc_scan/#quantfreedom.helpers.bsc_scan.BSC_Scan.get_transaction_value_by_hash","title":"get_transaction_value_by_hash","text":"
    get_transaction_value_by_hash(tx_hash, address, contractaddress='0x55d398326f99059fF775485246999027B3197955', startblock=0, endblock=99999999, page=1, offset=1000, sort='desc')\n

    Default contract address is USDT

    "},{"location":"quantfreedom/helpers/bsc_scan/#quantfreedom.helpers.bsc_scan.BSC_Scan.get_transactions","title":"get_transactions","text":"
    get_transactions(address, contractaddress='0x55d398326f99059fF775485246999027B3197955', startblock=0, endblock=99999999, page=1, offset=1000, sort='desc')\n

    Get a list of 'Normal' Transactions By Address

    Default contract address is USDT

    "},{"location":"quantfreedom/helpers/bsc_scan/#quantfreedom.helpers.bsc_scan.BSC_Scan.get_transactions_by_from_address","title":"get_transactions_by_from_address","text":"
    get_transactions_by_from_address(from_address, address, contractaddress='0x55d398326f99059fF775485246999027B3197955', startblock=0, endblock=99999999, page=1, offset=1000, sort='desc')\n

    Default contract address is USDT

    "},{"location":"quantfreedom/helpers/bsc_scan/#quantfreedom.helpers.bsc_scan.BSC_Scan.get_user_payment_amount","title":"get_user_payment_amount","text":"
    get_user_payment_amount(tx_hash, from_address, address, contractaddress='0x55d398326f99059fF775485246999027B3197955', startblock=0, endblock=99999999, page=1, offset=1000, sort='desc')\n

    Default contract address is USDT

    "},{"location":"quantfreedom/helpers/helper_funcs/","title":"helper_funcs","text":""},{"location":"quantfreedom/helpers/helper_funcs/#quantfreedom.helpers.helper_funcs-classes","title":"Classes","text":""},{"location":"quantfreedom/helpers/helper_funcs/#quantfreedom.helpers.helper_funcs-functions","title":"Functions","text":""},{"location":"quantfreedom/helpers/helper_funcs/#quantfreedom.helpers.helper_funcs.candles_to_df","title":"candles_to_df","text":"
    candles_to_df(candles)\n

    Converts your numpy array candles to a pandas dataframe

    Parameters:

    Name Type Description Default candles ndarray

    a 2 dim array with the following columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\"

    required

    Returns:

    Type Description DataFrame

    columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\" with an index of pandas datetimes

    "},{"location":"quantfreedom/helpers/helper_funcs/#quantfreedom.helpers.helper_funcs.dl_ex_candles","title":"dl_ex_candles","text":"
    dl_ex_candles(exchange, symbol, timeframe, candles_to_dl=None, since_datetime=None, until_datetime=None)\n

    Download candles from the exchange of your choice

    Parameters:

    Name Type Description Default exchange str

    binance futures = 'binance_usdm' | default candles to dl is 1500

    mufex = 'mufex' | default candles to dl is 1500

    bybit = 'bybit' | default candles to dl is 1000

    required symbol str

    Check the api of the exchange or get all the symbols of the exchange to see which ones you need to put here

    required timeframe str
    \"1m\", \"5m\", \"15m\", \"30m\", \"1h\", \"2h\", \"4h\", \"6h\", \"12h\", \"d\", \"w\"\n
    required since_datetime datetime

    The start date, in datetime format, of candles you want to download. EX: datetime(year, month, day, hour, minute)

    None until_datetime datetime

    The until date, in datetime format, of candles you want to download minus one candle so if you are on the 5 min if you say your until date is 1200 your last candle will be 1155. EX: datetime(year, month, day, hour, minute)

    None candles_to_dl int

    The amount of candles you want to download

    None

    Returns:

    Type Description array

    a 2 dim array with the following columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\"

    "},{"location":"quantfreedom/helpers/helper_funcs/#quantfreedom.helpers.helper_funcs.np_lookback_one","title":"np_lookback_one","text":"
    np_lookback_one(arr, lookback, include_current, fill_value, fwd_bwd)\n

    summary

    Video

    Parameters:

    Name Type Description Default arr ndarray

    description

    required lookback int

    description

    required include_current bool

    description

    required fill_value float, int, bool, str]

    description

    required fwd_bwd str

    fwd for forward and bwd for backward

    required

    Returns:

    Type Description tuple[ndarray, ndarray]

    description

    "},{"location":"quantfreedom/helpers/helper_funcs/#quantfreedom.helpers.helper_funcs.np_lookback_two","title":"np_lookback_two","text":"
    np_lookback_two(arr_1, arr_2, lookback, include_current, fill_value, fwd_bwd='fwd')\n

    summary

    Video

    Parameters:

    Name Type Description Default arr_1 ndarray

    description

    required arr_2 ndarray

    description

    required lookback int

    description

    required include_current bool

    description

    required fill_value float, int, bool, str]

    description

    required fwd_bwd str

    fwd for forward and bwd for backward

    'fwd'

    Returns:

    Type Description tuple[ndarray, ndarray]

    description

    "},{"location":"quantfreedom/helpers/utils/","title":"utils","text":""},{"location":"quantfreedom/helpers/utils/#quantfreedom.helpers.utils-functions","title":"Functions","text":""},{"location":"quantfreedom/helpers/utils/#quantfreedom.helpers.utils.clear_cache","title":"clear_cache","text":"
    clear_cache()\n

    clears the python cache and numba cache

    "},{"location":"quantfreedom/helpers/utils/#quantfreedom.helpers.utils.delete_dir","title":"delete_dir","text":"
    delete_dir(p)\n

    Delete info in directory

    Parameters:

    Name Type Description Default p path

    path to directory

    required"},{"location":"quantfreedom/helpers/utils/#quantfreedom.helpers.utils.generate_candles","title":"generate_candles","text":"
    generate_candles(number_of_candles=100, plot_candles=False, seed=None)\n

    Generate a dataframe filled with random candles

    Parameters:

    Name Type Description Default number_of_candles (int, 100)

    number of candles you want to create

    100 seed (int, None)

    random seed number

    None plot_candles (bool, False)

    If the candles should be graphed or not.

    False

    Returns:

    Type Description pdFrame

    Dataframe of open high low close

    "},{"location":"quantfreedom/helpers/utils/#quantfreedom.helpers.utils.pretty_qf","title":"pretty_qf","text":"
    pretty_qf(named_tuple)\n

    Prints named tuples in a pretty way

    Parameters:

    Name Type Description Default named_tuple namedtuple

    must only be a named tuple

    required"},{"location":"quantfreedom/helpers/utils/#quantfreedom.helpers.utils.pretty_qf_string","title":"pretty_qf_string","text":"
    pretty_qf_string(named_tuple)\n

    Prints named tuples in a pretty way

    Parameters:

    Name Type Description Default named_tuple namedtuple

    must only be a named tuple

    required"},{"location":"quantfreedom/indicators/tv_indicators/","title":"tv_indicators","text":""},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators-functions","title":"Functions","text":""},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.atr_tv","title":"atr_tv","text":"
    atr_tv(candles, length, smoothing_type=rma_tv)\n

    Average true range smoothing from tradingview

    Parameters:

    Name Type Description Default candles ndarray

    2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]

    required length int

    Number of bars

    required smoothing_type Callable

    function to process the smoothing of the atr

    rma_tv

    Returns:

    Type Description array

    atr

    "},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.bb_tv","title":"bb_tv","text":"
    bb_tv(length, multi, source, basis_ma_type=sma_tv)\n

    Bollinger bands from tradingview

    Parameters:

    Name Type Description Default source ndarray

    Values to process

    required length int

    Number of bars

    required multi float

    Standard deviation factor

    required basis_ma_type Callable

    Function to process basic ma

    sma_tv

    Returns:

    Type Description tuple[array, array, array]

    basis, upper, lower

    "},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.donchain_channels_tv","title":"donchain_channels_tv","text":"
    donchain_channels_tv(candles, length)\n

    Donchain channels

    Parameters:

    Name Type Description Default candles ndarray

    2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]

    required length int

    Number of bars of donchain lookback

    required

    Returns:

    Type Description tuple[array, array, array]

    upper, basis, lower

    "},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.ema_tv","title":"ema_tv","text":"
    ema_tv(source, length)\n

    Exponential Moving average from tradingview

    Parameters:

    Name Type Description Default source ndarray

    Values to process

    required length int

    Number of bars

    required

    Returns:

    Type Description array

    ema

    "},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.linear_regression_candles_ugurvu_tv","title":"linear_regression_candles_ugurvu_tv","text":"
    linear_regression_candles_ugurvu_tv(candles, lin_reg_length, smoothing_length, smoothing_type=sma_tv)\n

    Linear regression indicator

    Parameters:

    Name Type Description Default candles ndarray

    2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]

    required lin_reg_length int

    Number of bars for lin reg

    required smoothing_length int

    Number of bars for singal line

    required smoothing_type Callable

    function to process the smoothing of the singal line

    sma_tv

    Returns:

    Type Description tuple[array, array]

    2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume], signal

    "},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.macd_tv","title":"macd_tv","text":"
    macd_tv(source, fast_length, slow_length, signal_smoothing, oscillator_type=ema_tv, signal_ma_type=ema_tv)\n

    Moving average convergence divergence from tradingview

    Parameters:

    Name Type Description Default source ndarray

    Values to process

    required fast_length int

    Number of bars

    required slow_length int

    Number of bars

    required signal_smoothing int

    Number of bars

    required oscillator_type Callable

    Function to process fast and slow ma

    ema_tv signal_ma_type Callable

    Function to process signal ma

    ema_tv

    Returns:

    Type Description (array, array, array)

    histogram, macd, signal

    "},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.rma_tv","title":"rma_tv","text":"
    rma_tv(source, length)\n

    Relative strength index Moving average from tradingview

    Parameters:

    Name Type Description Default source ndarray

    Values to process

    required length int

    Number of bars

    required

    Returns:

    Type Description array

    rma

    "},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.rma_tv_2","title":"rma_tv_2","text":"
    rma_tv_2(source_1, source_2, length)\n

    Relative strength index Moving average from tradingview

    Parameters:

    Name Type Description Default source_1 ndarray

    Values to process

    required source_2 ndarray

    Values to process

    required length int

    Number of bars

    required

    Returns:

    Type Description array

    rma_1, rma_2

    "},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.rsi_tv","title":"rsi_tv","text":"
    rsi_tv(length, source)\n

    Relative strength index

    Parameters:

    Name Type Description Default source ndarray

    Values to process

    required length int

    Number of bars

    required

    Returns:

    Type Description array

    rsi

    "},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.sma_tv","title":"sma_tv","text":"
    sma_tv(source, length)\n

    Simple Moving average from tradingview

    Parameters:

    Name Type Description Default source ndarray

    Values to process

    required length int

    Number of bars

    required

    Returns:

    Type Description array

    sma

    "},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.squeeze_momentum_lazybear_tv","title":"squeeze_momentum_lazybear_tv","text":"
    squeeze_momentum_lazybear_tv(candles, length_bb, length_kc, multi_bb, multi_kc)\n

    LazyBear Pinescript

    Parameters:

    Name Type Description Default candles ndarray

    2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]

    required length_bb int

    Number of bars of Bollinger Bands

    required length_kc int

    Number of bars of KC

    required multi_bb int

    The multiplier by which the Bollinger Bands will get multiplied

    required multi_kc int

    The multiplier by which the KC will get multiplied

    required

    Returns:

    Type Description tuple[array, array, array]

    squeeze historgram, squeeze on, no squeeze

    "},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.stdev_tv","title":"stdev_tv","text":"
    stdev_tv(source, length)\n

    Standard deviation from tradingview

    Explainer Video

    Parameters:

    Name Type Description Default source ndarray

    Values to process

    required length int

    Number of bars

    required

    Returns:

    Type Description array

    stdev

    "},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.supertrend_tv","title":"supertrend_tv","text":"
    supertrend_tv(candles, atr_length, factor)\n

    Super Trend

    Parameters:

    Name Type Description Default candles ndarray

    2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]

    required atr_length int

    Number of bars

    required factor int

    The multiplier by which the ATR will get multiplied

    required

    Returns:

    Type Description tuple[array, array]

    super_trend, direction

    "},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.true_range_tv","title":"true_range_tv","text":"
    true_range_tv(candles)\n

    True Range from tradingview

    Parameters:

    Name Type Description Default candles ndarray

    2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]

    required

    Returns:

    Type Description array

    true_range

    "},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.vwap_tv","title":"vwap_tv","text":"
    vwap_tv(candles)\n

    Volume Weighted Average Price

    Parameters:

    Name Type Description Default candles ndarray

    2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]

    required

    Returns:

    Type Description array

    vwap

    "},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.wma_tv","title":"wma_tv","text":"
    wma_tv(source, length)\n

    Weighted Moving Average From Tradingview

    Explainer Video

    Parameters:

    Name Type Description Default source ndarray

    Values to process

    required length int

    Number of bars

    required

    Returns:

    Type Description array

    wma

    "},{"location":"quantfreedom/order_handler/increase_position/","title":"increase_position","text":""},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position-classes","title":"Classes","text":""},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition","title":"IncreasePosition","text":""},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition-functions","title":"Functions","text":""},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.__init__","title":"__init__","text":"
    __init__(asset_tick_step, increase_position_type, long_short, market_fee_pct, max_asset_size, min_asset_size, price_tick_step, sl_strategy_type)\n
    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.__init__--summary","title":"Summary","text":"

    Creates and sets the increase position class settings

    Parameters:

    Name Type Description Default asset_tick_step float

    asset_tick_step

    required increase_position_type IncreasePositionType

    How you want to process increasing your position

    required long_short str

    long or short

    required market_fee_pct float

    market_fee_pct

    required max_asset_size float

    max_asset_size

    required min_asset_size float

    min_asset_size

    required price_tick_step float

    price_tick_step

    required sl_strategy_type StopLossStrategyType

    how you want to process creating your stop loss

    required"},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.c_pl_ra_ps","title":"c_pl_ra_ps","text":"
    c_pl_ra_ps(equity, total_trades)\n
    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.c_pl_ra_ps--summary","title":"Summary","text":"

    Creates possible loss then checks if it is bigger than risk account percent size then returns the new possible loss and total trades

    Parameters:

    Name Type Description Default equity float

    equity

    required total_trades int

    total_trades

    required

    Returns:

    Type Description (int, int)

    total_possible_loss, total_trades

    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.c_too_b_s","title":"c_too_b_s","text":"
    c_too_b_s(entry_size_asset)\n
    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.c_too_b_s--summary","title":"Summary","text":"

    Check if the asset size is too big or too small

    Parameters:

    Name Type Description Default entry_size_asset float

    entry size of the asset

    required"},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.c_total_trades","title":"c_total_trades","text":"
    c_total_trades(average_entry, position_size_asset, sl_price, total_trades)\n
    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.c_total_trades--summary","title":"Summary","text":"

    Creates possible loss then adds 1 to total trades then checks if total trades is bigger than max trades

    Parameters:

    Name Type Description Default average_entry float

    average_entry

    required position_size_asset float

    position_size_asset

    required sl_price float

    sl_price

    required total_trades int

    total_trades

    required

    Returns:

    Type Description tuple[int, int]

    total_possible_loss, total_trades

    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.long_entry_size_np","title":"long_entry_size_np","text":"
    long_entry_size_np(entry_price, sl_price, total_possible_loss)\n
    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.long_entry_size_np--summary","title":"Summary","text":"

    Formula to calulcate the long entry size when we are not in a position and have our stop loss type set to stop loss based on candle body

    how to calculate pnl https://www.bybithelp.com/en-US/s/article/Profit-Loss-calculations-USDT-Contract

    math for the formula https://www.symbolab.com/solver/simplify-calculator/solve%20for%20u%2C%20%5Cleft(%5Cleft(%5Cfrac%7Bu%7D%7Be%7D%5Ccdot%5Cleft(x%20-%20e%5Cright)%5Cright)-%20%5Cleft(%5Cfrac%7Bu%7D%7Be%7D%5Ccdot%20e%5Ccdot%20m%5Cright)%20-%20%5Cleft(%5Cfrac%7Bu%7D%7Be%7D%5Ccdot%20x%5Ccdot%20m%5Cright)%20%5Cright)%3Dp?or=input

    Parameters:

    Name Type Description Default entry_price float

    entry_price

    required total_possible_loss float

    total_possible_loss

    required sl_price float

    sl_price

    required

    Returns:

    Type Description float

    entry_size_usd

    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.long_entry_size_p","title":"long_entry_size_p","text":"
    long_entry_size_p(average_entry, entry_price, position_size_usd, sl_price, total_possible_loss)\n
    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.long_entry_size_p--summary","title":"Summary","text":"

    Formula to calulcate the long entry size when we are in a position and have our stop loss type set to stop loss based on candle body

    how to calculate pnl https://www.bybithelp.com/en-US/s/article/Profit-Loss-calculations-USDT-Contract

    math for the formula https://www.symbolab.com/solver/simplify-calculator/solve%20for%20u%2C%20%5Cleft(%5Cleft(%5Cleft(%5Cfrac%7Bp%7D%7Ba%7D%2B%5Cfrac%7Bu%7D%7Be%7D%5Cright)%5Ccdot%5Cleft(n%20-%20%5Cleft(%5Cfrac%7B%5Cleft(p%2Bu%5Cright)%7D%7B%5Cleft(%5Cfrac%7Bp%7D%7Ba%7D%2B%5Cfrac%7Bu%7D%7Be%7D%5Cright)%7D%5Cright)%5Cright)%5Cright)-%20%5Cleft(%5Cleft(%5Cfrac%7Bp%7D%7Ba%7D%2B%5Cfrac%7Bu%7D%7Be%7D%5Cright)%5Ccdot%5Cleft(%5Cfrac%7B%5Cleft(p%2Bu%5Cright)%7D%7B%5Cleft(%5Cfrac%7Bp%7D%7Ba%7D%2B%5Cfrac%7Bu%7D%7Be%7D%5Cright)%7D%5Cright)%5Ccdot%20m%5Cright)%20-%20%5Cleft(%5Cleft(%5Cfrac%7Bp%7D%7Ba%7D%2B%5Cfrac%7Bu%7D%7Be%7D%5Cright)%5Ccdot%20n%5Ccdot%20m%5Cright)%20%5Cright)%3D-f?or=input

    Parameters:

    Name Type Description Default average_entry float

    average_entry

    required entry_price float

    entry_price

    required position_size_usd float

    position_size_usd

    required total_possible_loss float

    total_possible_loss

    required sl_price float

    sl_price

    required

    Returns:

    Type Description float

    entry_size_usd

    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.min_amount_np","title":"min_amount_np","text":"
    min_amount_np(entry_price, sl_price)\n
    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.min_amount_np--summary","title":"Summary","text":"

    Setting the entry size to the minimum amount

    Parameters:

    Name Type Description Default entry_price float

    entry_price

    required sl_price float

    sl_price

    required

    Returns:

    Type Description tuple[float, float, float, float, float, float, int, int, float]

    average_entry, entry_price, entry_size_asset, entry_size_usd, position_size_asset, position_size_usd, total_possible_loss, total_trades, sl_pct

    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.min_amount_p","title":"min_amount_p","text":"
    min_amount_p(average_entry, entry_price, position_size_asset, position_size_usd, sl_price, total_trades)\n
    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.min_amount_p--summary","title":"Summary","text":"

    Setting the entry size to the minimum amount plus what ever position size we are already in

    Parameters:

    Name Type Description Default average_entry float

    average_entry

    required entry_price float

    entry_price

    required position_size_asset float

    position_size_asset

    required position_size_usd float

    position_size_usd

    required total_possible_loss float

    total_possible_loss

    required sl_price float

    sl_price

    required total_trades int

    total_trades

    required

    Returns:

    Type Description tuple[float, float, float, float, float, float, int, int, float]

    average_entry, entry_price, entry_size_asset, entry_size_usd, position_size_asset, position_size_usd, total_possible_loss, total_trades, sl_pct

    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.min_asset_amount","title":"min_asset_amount","text":"
    min_asset_amount(average_entry, entry_price, equity, position_size_asset, position_size_usd, sl_price, total_trades)\n
    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.min_asset_amount--summary","title":"Summary","text":"

    Check if we are in a position or not and sending you to the correct function to handle that

    Parameters:

    Name Type Description Default average_entry float

    average_entry

    required entry_price float

    entry_price

    required equity float

    equity

    required position_size_asset float

    position_size_asset

    required position_size_usd float

    position_size_usd

    required total_possible_loss float

    total_possible_loss

    required sl_price float

    sl_price

    required total_trades int

    total_trades

    required

    Returns:

    Type Description (float, float, float, float, float, float, int, int, float)

    average_entry, entry_price, entry_size_asset, entry_size_usd, position_size_asset, position_size_usd, total_possible_loss, total_trades, sl_pct

    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.rpa_slbcb","title":"rpa_slbcb","text":"
    rpa_slbcb(equity, average_entry, entry_price, position_size_asset, position_size_usd, sl_price, total_trades)\n
    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.rpa_slbcb--summary","title":"Summary","text":"

    Check if we are in a position or not and sending you to the correct function to handle that

    Parameters:

    Name Type Description Default average_entry float

    average_entry

    required entry_price float

    entry_price

    required equity float

    equity

    required position_size_asset float

    position_size_asset

    required position_size_usd float

    position_size_usd

    required total_possible_loss float

    total_possible_loss

    required sl_price float

    sl_price

    required total_trades int

    total_trades

    required

    Returns:

    Type Description (float, float, float, float, float, float, int, int, float)

    average_entry, entry_price, entry_size_asset, entry_size_usd, position_size_asset, position_size_usd, total_possible_loss, total_trades, sl_pct

    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.rpa_slbcb_np","title":"rpa_slbcb_np","text":"
    rpa_slbcb_np(equity, entry_price, sl_price)\n
    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.rpa_slbcb_np--summary","title":"Summary","text":"

    Not in a position - Risking a percent of your account while also having your stop loss type set to stop loss based on candle body

    Parameters:

    Name Type Description Default equity float

    equity

    required entry_price float

    entry_price

    required sl_price float

    sl_price

    required

    Returns:

    Type Description tuple[float, float, float, float, float, float, int, int, float]

    average_entry, entry_price, entry_size_asset, entry_size_usd, position_size_asset, position_size_usd, total_possible_loss, total_trades, sl_pct

    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.rpa_slbcb_p","title":"rpa_slbcb_p","text":"
    rpa_slbcb_p(average_entry, entry_price, equity, position_size_asset, position_size_usd, sl_price, total_trades)\n
    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.rpa_slbcb_p--summary","title":"Summary","text":"

    In a position - Risking a percent of your account while also having your stop loss type set to stop loss based on candle body

    Parameters:

    Name Type Description Default average_entry float

    average_entry

    required entry_price float

    entry_price

    required equity float

    equity

    required position_size_asset float

    position_size_asset

    required position_size_usd float

    position_size_usd

    required total_possible_loss float

    total_possible_loss

    required sl_price float

    sl_price

    required total_trades int

    total_trades

    required

    Returns:

    Type Description (float, float, float, float, float, float, int, int, float)

    average_entry, entry_price, entry_size_asset, entry_size_usd, position_size_asset, position_size_usd, total_possible_loss, total_trades, sl_pct

    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.short_entry_size_np","title":"short_entry_size_np","text":"
    short_entry_size_np(sl_price, entry_price, total_possible_loss)\n
    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.short_entry_size_np--summary","title":"Summary","text":"

    Formula to calulcate the short entry size when we are not in a position and have our stop loss type set to stop loss based on candle body

    how to calculate pnl https://www.bybithelp.com/en-US/s/article/Profit-Loss-calculations-USDT-Contract

    math for the formula https://www.symbolab.com/solver/simplify-calculator/solve%20for%20u%2C%20%5Cleft(%5Cleft(%5Cfrac%7Bu%7D%7Be%7D%5Ccdot%5Cleft(e%20-%20x%5Cright)%5Cright)-%20%5Cleft(%5Cfrac%7Bu%7D%7Be%7D%5Ccdot%20e%5Ccdot%20m%5Cright)%20-%20%5Cleft(%5Cfrac%7Bu%7D%7Be%7D%5Ccdot%20x%5Ccdot%20m%5Cright)%20%5Cright)%3Dp?or=input

    Parameters:

    Name Type Description Default entry_price float

    entry_price

    required total_possible_loss float

    total_possible_loss

    required sl_price float

    sl_price

    required

    Returns:

    Type Description float

    entry_size_usd

    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.short_entry_size_p","title":"short_entry_size_p","text":"
    short_entry_size_p(average_entry, entry_price, position_size_usd, sl_price, total_possible_loss)\n
    "},{"location":"quantfreedom/order_handler/increase_position/#quantfreedom.order_handler.increase_position.IncreasePosition.short_entry_size_p--summary","title":"Summary","text":"

    Formula to calulcate the short entry size when we are in a position and have our stop loss type set to stop loss based on candle body

    how to calculate pnl https://www.bybithelp.com/en-US/s/article/Profit-Loss-calculations-USDT-Contract

    math for the formula https://www.symbolab.com/solver/simplify-calculator/solve%20for%20u%2C%20%5Cleft(%5Cleft(%5Cleft(%5Cfrac%7Bp%7D%7Ba%7D%2B%5Cfrac%7Bu%7D%7Be%7D%5Cright)%5Ccdot%5Cleft(%5Cleft(%5Cfrac%7B%5Cleft(p%2Bu%5Cright)%7D%7B%5Cleft(%5Cfrac%7Bp%7D%7Ba%7D%2B%5Cfrac%7Bu%7D%7Be%7D%5Cright)%7D%5Cright)-n%5Cright)%5Cright)-%20%5Cleft(%5Cleft(%5Cfrac%7Bp%7D%7Ba%7D%2B%5Cfrac%7Bu%7D%7Be%7D%5Cright)%5Ccdot%5Cleft(%5Cfrac%7B%5Cleft(p%2Bu%5Cright)%7D%7B%5Cleft(%5Cfrac%7Bp%7D%7Ba%7D%2B%5Cfrac%7Bu%7D%7Be%7D%5Cright)%7D%5Cright)%5Ccdot%20%20m%5Cright)%20-%20%5Cleft(%5Cleft(%5Cfrac%7Bp%7D%7Ba%7D%2B%5Cfrac%7Bu%7D%7Be%7D%5Cright)%5Ccdot%20%20n%5Ccdot%20%20m%5Cright)%20%5Cright)%3D-f?or=input

    Parameters:

    Name Type Description Default average_entry float

    average_entry

    required entry_price float

    entry_price

    required position_size_usd float

    position_size_usd

    required total_possible_loss float

    total_possible_loss

    required sl_price float

    sl_price

    required

    Returns:

    Type Description float

    entry_size_usd

    "},{"location":"quantfreedom/order_handler/order/","title":"order","text":""},{"location":"quantfreedom/order_handler/order/#quantfreedom.order_handler.order-classes","title":"Classes","text":""},{"location":"quantfreedom/order_handler/stop_loss/","title":"stop_loss","text":""},{"location":"quantfreedom/order_handler/stop_loss/#quantfreedom.order_handler.stop_loss-classes","title":"Classes","text":""},{"location":"quantfreedom/order_handler/stop_loss/#quantfreedom.order_handler.stop_loss.StopLoss","title":"StopLoss","text":""},{"location":"quantfreedom/order_handler/stop_loss/#quantfreedom.order_handler.stop_loss.StopLoss-functions","title":"Functions","text":""},{"location":"quantfreedom/order_handler/stop_loss/#quantfreedom.order_handler.stop_loss.StopLoss.check_move_sl_to_be","title":"check_move_sl_to_be","text":"
    check_move_sl_to_be(average_entry, can_move_sl_to_be, current_candle, sl_price)\n

    Checking to see if we move the stop loss to break even

    "},{"location":"quantfreedom/order_handler/stop_loss/#quantfreedom.order_handler.stop_loss.StopLoss.check_move_tsl","title":"check_move_tsl","text":"
    check_move_tsl(average_entry, current_candle, sl_price)\n

    Checking to see if we move the trailing stop loss

    "},{"location":"quantfreedom/order_handler/stop_loss/#quantfreedom.order_handler.stop_loss.StopLoss.sl_based_on_candle_body","title":"sl_based_on_candle_body","text":"
    sl_based_on_candle_body(bar_index, candles)\n

    Long Stop Loss Based on Candle Body Calculator

    "},{"location":"services/copy_trading/","title":"Copy Trading Bot","text":"

    I am giving a massive 50% monthly discount to anyone who can follow these directions ... All you will have to do is provide your API keys and its go time!

    You don't need to have any skill with python but you do need to be able to follow directions to get them to work.

    You will need to manage the bot by turning it off or on based on if you think it would be a good time to run the bot.

    To get the 50 % off you need to do the following

    "},{"location":"services/copy_trading/#50-part-1-follow-me","title":"50% Part 1: Follow Me","text":"