From 0ceea091cd5f01d0ad07fc60c4f23ef4be4afd78 Mon Sep 17 00:00:00 2001 From: quantfreedom Date: Mon, 5 Aug 2024 06:34:40 -0700 Subject: [PATCH] Deployed 38041a5 with MkDocs version: 1.6.0 --- link_instructions/index.html | 32 +++++++++++++++++++++++++------- search/search_index.json | 2 +- sitemap.xml.gz | Bin 127 -> 127 bytes 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/link_instructions/index.html b/link_instructions/index.html index edecbfd..c47c518 100755 --- a/link_instructions/index.html +++ b/link_instructions/index.html @@ -62,7 +62,7 @@
- + Skip to content @@ -1211,9 +1211,18 @@
-

Follow me on Instagram

-

If I am being honest I just need people to follow me on IG so that when I meet in real life I can show them that I have a lot of followers and they think that I am cool and important LOL! And if I am being super honest I just want a lot of followers so that when I talk to girls and we exchange instgrams, they see that I have a lot of followers LOLOLOLOL!!!

-

So help me get some girls by following and once you follow me, send me a DM and I will DM you the link you are wanting.

-

https://www.instagram.com/thatmanneo1022/

+

Step 1 Follow My Live Stream

+

First follow me on my kick, my live streaming platform, and turn notifications on. The reason is because I will use the Sub button as a way for people to pay for 1 on 1 lessons, the beginners guide and other things. I need to build up 2000 followers or more on Kick.

+

https://www.kick.com/neo1022/

+

Step 2 Type In The Chat

+

If i am not live you will have to click the chat menu to open up the chat

+

+ +

The chat is in follower only mode so you will have to be following in order to get the link you want. Type any of the following commands to get the link you want.

+ diff --git a/search/search_index.json b/search/search_index.json index 1d882cb..726c95a 100755 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"link_instructions/","title":"Link instructions","text":"

Warning

Read all the steps before you start actually doing them.

"},{"location":"link_instructions/#follow-me-on-instagram","title":"Follow me on Instagram","text":"

If I am being honest I just need people to follow me on IG so that when I meet in real life I can show them that I have a lot of followers and they think that I am cool and important LOL! And if I am being super honest I just want a lot of followers so that when I talk to girls and we exchange instgrams, they see that I have a lot of followers LOLOLOLOL!!!

So help me get some girls by following and once you follow me, send me a DM and I will DM you the link you are wanting.

https://www.instagram.com/thatmanneo1022/

"},{"location":"nav_file/","title":"Nav file","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

"},{"location":"home/installation/#not-finished-yet","title":"Not finished yet","text":""},{"location":"home/installation/#create-venv","title":"create venv","text":""},{"location":"quantfreedom/backtesters/bt_multi_bt/","title":"Bt multi bt","text":""},{"location":"quantfreedom/backtesters/bt_multi_bt/#quantfreedom.backtesters.bt_multi_bt-functions","title":"Functions","text":""},{"location":"quantfreedom/backtesters/bt_or_bt/","title":"Bt or bt","text":""},{"location":"quantfreedom/backtesters/bt_or_bt/#quantfreedom.backtesters.bt_or_bt-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
Summary

Biance USDM candle docs

Explainer Video

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
Summary

Bybit candle docs

Explainer Video

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/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
Summary

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
Summary

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
Summary

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
Summary

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
Summary

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
Summary

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
Summary

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
Summary

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
Summary

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
Summary

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
Summary

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
Summary

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
Summary

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
Summary

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_close","title":"check_move_tsl_close","text":"
check_move_tsl_close(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.check_move_tsl_pct","title":"check_move_tsl_pct","text":"
check_move_tsl_pct(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":"

If you want one month completely for free then make sure you read the following instructions ... 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 Free month you need to do the following

"},{"location":"services/copy_trading/#free-month-part-1-follow-me","title":"Free Month Part 1: Follow Me","text":"