diff --git a/free_bot_finish/index.html b/free_bot_finish/index.html index b65bdd6a..2a25efcc 100755 --- a/free_bot_finish/index.html +++ b/free_bot_finish/index.html @@ -1717,6 +1717,15 @@ + + +
Make sure you read the entire bullet point before you start doing what the bullet point says.
"},{"location":"#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
Git Bash is how you allow your computer to talk to github.
This is the program I use to code
Ctl shift p and type in default profile and then select terminal select default profile Click on cmd prompt In the menu bar click on terminal New terminal
Create a folder called coding wherever you want on your computer Create a folder inside that folder called venvs - venv stands for virtual enviromnet Now you want to change your terminal directory to the coding folder Change to the correct drive by typing something like C: or E: or whatever your drive letter is Then copy the path to your coding folder something like this quantfreedom\\coding\\venvs And in the terminal paste cd quantfreedom\\coding\\venvs\\
Change directory to venvs Create venv python -m venv qfree 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":"beginners/","title":"Beginners","text":"BEGINNERS GUIDE
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 https://www.youtube.com/playlist?list=PL-osiE80TeTskrapNbzXhwoFUiLCjGgY7
working with classes https://www.youtube.com/playlist?list=PL-osiE80TeTsqhIuOqKhwlXsIBIdSeYtc
learn the basics of pandas https://www.youtube.com/playlist?list=PL-osiE80TeTsWmV9i9c58mdDCSskIFdDS
study plotly https://www.youtube.com/playlist?list=PLBSCvBlTOLa8rf2kGkP_Bx5xXqT-er4Yq
then study the basics of numpy https://www.youtube.com/playlist?list=PLZGM26Bt_cku3VRraPDwzzqrav0_u8pDC https://www.youtube.com/playlist?list=PLc_Ps3DdrcTuf3e-BBpDv8r9jbOB5Wdv- https://www.youtube.com/playlist?list=PLCC34OHNcOtpalASMlX2HHdsLNipyyhbK
once you are done with this then follow my latest video going over a strategy
then make your own signals from doing an ema cross over ... just make the proper signals and graph the signals
once you make the signals then let me know in the general chat and send me a link to your github and i will check it out and then we can move on from there
"},{"location":"free_bot_finish/","title":"Free Bot Finish","text":"Make sure you read the entire bullet point before you start doing what the bullet point says.
"},{"location":"free_bot_finish/#donnload-winscp","title":"Donnload WINSCP","text":"--====================================================
"},{"location":"free_trading_bots%20copy/#prerequisites","title":"Prerequisites","text":"(back to top)
"},{"location":"free_trading_bots%20copy/#bybit","title":"ByBit","text":"(include in Bybit section - added from WINSCP) * for bybit you have to make sure you are in a uinfied account ... log into bybit and go to the trading pair btcusdt and on the right side below the open and short and above the contract details and price pool ... if you see the word upgrade make sure
(back to top )
"},{"location":"free_trading_bots%20copy/#aws-launch-template","title":"AWS Launch Template","text":"Name your template under launch template name
In the next section choose latest ubuntu version
For instance type choose the .micro Free tier eligible option
next in key pair login click on create new key pair
Then name the key pair something and select ppk and then click create key pair
Make sure you save the download somewhere other than your desktop because you will need to use it later on.
(Added from Adding Github Token) * create launch template * now in the green sction click on the link * then click on actions and launch instance from template * then in lower right corner click launch instance * thne in the green click the link to see the instance details
(back to top )
"},{"location":"free_trading_bots%20copy/#connect-to-aws-instance","title":"Connect to AWS Instance","text":"(back to top )
"},{"location":"free_trading_bots%20copy/#github-token","title":"Github token","text":"then select the main repo that will select all the options under repo alt text
then scroll to the bottom and choose create token
(back to top )
"},{"location":"free_trading_bots%20copy/#get-access-to-strat","title":"Get Access To Strat","text":"So at this point you should have everything done and you have the following
(back to top )
"},{"location":"free_trading_bots%20copy/#add-token-to-script","title":"Add Token To Script","text":"no chane
(back to top )
"},{"location":"free_trading_bots/","title":"Free Live Trading Bots","text":"I am giving away bots that are ready to go live FOR FREE ... All you will have to do is provide your API keys in the code and hit run
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.
"},{"location":"free_trading_bots/#follow-my-social-media-pages","title":"Follow My Social Media Pages","text":"once you have done all of this then put the following info in the bot sign up channel Click here
"},{"location":"free_trading_bots/#aws-and-github","title":"AWS and Github","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 Defaultgains_pct_filter
float = -np.inf
Will not record any strategies whos gains % result is below gains_pct_filter
requiredqf_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,
requiredtotal_trade_filter
int = -1
Will not record any strategies whos total trades result is below total trades filter.
requiredrecord_size
int = 10000
The amount of records you want to to save. Keep this number as low as possible to save memory.
required"},{"location":"quantfreedom/enums/#quantfreedom.enums.IncreasePositionTypeT","title":"IncreasePositionTypeT","text":" Bases: NamedTuple
The different ways you can increase your position
Parameters:
Name Type Description DefaultAmountEntrySize
int= 0
How much you want your position size to be per trade in USDT
requiredPctAccountEntrySize
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
requiredRiskAmountEntrySize
int = 2
How much you will risk per trade. You must have a stop loss in order to use this mode.
requiredRiskPctAccountEntrySize
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
requiredSmalletEntrySizeAsset
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/enums/#quantfreedom.enums.LeverageStrategyTypeT","title":"LeverageStrategyTypeT","text":" Bases: NamedTuple
Choosing which leverage strategy you would like to use.
Parameters:
Name Type Description DefaultDynamic
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.
requiredStatic
int = 1
Static leverage
required"},{"location":"quantfreedom/enums/#quantfreedom.enums.TakeProfitStrategyTypeT","title":"TakeProfitStrategyTypeT","text":" Bases: NamedTuple
How you want to process the take profit
Parameters:
Name Type Description DefaultRiskReward
int = 0
Risk to reward
requiredProvided
int = 1
Your strategy will provide the exit prices
requiredNothing
int = 2
No take profits.
required"},{"location":"quantfreedom/helper_funcs/","title":"helper_funcs","text":""},{"location":"quantfreedom/helper_funcs/#quantfreedom.helper_funcs-classes","title":"Classes","text":""},{"location":"quantfreedom/helper_funcs/#quantfreedom.helper_funcs-functions","title":"Functions","text":""},{"location":"quantfreedom/helper_funcs/#quantfreedom.helper_funcs.candles_to_df","title":"candles_to_df","text":"candles_to_df(\n candles,\n)\n
Converts your numpy array candles to a pandas dataframe
Parameters:
Name Type Description Defaultcandles
array
a 2 dim array with the following columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\"
requiredReturns:
Type DescriptionDataFrame
columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\" with an index of pandas datetimes
"},{"location":"quantfreedom/helper_funcs/#quantfreedom.helper_funcs.dl_ex_candles","title":"dl_ex_candles","text":"dl_ex_candles(\n symbol,\n exchange,\n timeframe,\n since_datetime=None,\n until_datetime=None,\n candles_to_dl=None,\n)\n
Download candles from the exchange of your choice
Parameters:
Name Type Description Defaultexchange
str
binance us = 'binance_us' | default candles to dl is 1500
binance futures = 'binance_usdm' | default candles to dl is 1500
apex = 'apex' | default candles to dl is 200
mufex = 'mufex' | default candles to dl is 1500
bybit = 'bybit' | default candles to dl is 1000
requiredsymbol
str
Check the api of the exchange or get all the symbols of the exchange to see which ones you need to put here
requiredtimeframe
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 Descriptionarray
a 2 dim array with the following columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\"
"},{"location":"quantfreedom/simulate/","title":"simulate","text":""},{"location":"quantfreedom/simulate/#quantfreedom.simulate-classes","title":"Classes","text":""},{"location":"quantfreedom/simulate/#quantfreedom.simulate-functions","title":"Functions","text":""},{"location":"quantfreedom/utils/","title":"utils","text":""},{"location":"quantfreedom/utils/#quantfreedom.utils-functions","title":"Functions","text":""},{"location":"quantfreedom/utils/#quantfreedom.utils.clear_cache","title":"clear_cache","text":"clear_cache()\n
clears the python cache and numba cache
"},{"location":"quantfreedom/utils/#quantfreedom.utils.delete_dir","title":"delete_dir","text":"delete_dir(\n p,\n)\n
Delete info in directory
Parameters:
Name Type Description Defaultp
path
path to directory
required"},{"location":"quantfreedom/utils/#quantfreedom.utils.generate_candles","title":"generate_candles","text":"generate_candles(\n number_of_candles=100,\n plot_candles=False,\n seed=None,\n)\n
Generate a dataframe filled with random candles
Parameters:
Name Type Description Defaultnumber_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 DescriptionpdFrame
Dataframe of open high low close
"},{"location":"quantfreedom/utils/#quantfreedom.utils.pretty_qf","title":"pretty_qf","text":"pretty_qf(\n named_tuple,\n)\n
Prints named tuples in a pretty way
Parameters:
Name Type Description Defaultnamed_tuple
namedtuple
must only be a named tuple
required"},{"location":"quantfreedom/exchanges/apex_exchange/apex/","title":"apex","text":""},{"location":"quantfreedom/exchanges/apex_exchange/apex/#quantfreedom.exchanges.apex_exchange.apex-classes","title":"Classes","text":""},{"location":"quantfreedom/exchanges/apex_exchange/apex/#quantfreedom.exchanges.apex_exchange.apex.Apex","title":"Apex","text":" Bases: Exchange
__init__(\n use_test_net,\n api_key=None,\n secret_key=None,\n passphrase=None,\n stark_key_public=None,\n stark_key_private=None,\n stark_key_y=None,\n)\n
main docs page https://api-docs.pro.apex.exchange
"},{"location":"quantfreedom/exchanges/apex_exchange/apex/#quantfreedom.exchanges.apex_exchange.apex.Apex.create_order","title":"create_order","text":"create_order(\n symbol,\n buy_sell,\n order_type,\n asset_size,\n limitFeeRate=None,\n limitFee=None,\n price=None,\n accountId=None,\n time_in_force=\"GOOD_TIL_CANCEL\",\n reduceOnly=False,\n triggerPrice=None,\n triggerPriceType=None,\n trailingPercent=None,\n clientId=None,\n expiration=None,\n isPositionTpsl=False,\n signature=None,\n sourceFlag=None,\n)\n
Apex API for Creating Orders
"},{"location":"quantfreedom/exchanges/apex_exchange/apex/#quantfreedom.exchanges.apex_exchange.apex.Apex.get_candles","title":"get_candles","text":"get_candles(\n symbol,\n timeframe,\n since_datetime=None,\n until_datetime=None,\n candles_to_dl=200,\n)\n
"},{"location":"quantfreedom/exchanges/apex_exchange/apex/#quantfreedom.exchanges.apex_exchange.apex.Apex.get_candles--summary","title":"Summary","text":"Apex candle docs
"},{"location":"quantfreedom/exchanges/apex_exchange/apex/#quantfreedom.exchanges.apex_exchange.apex.Apex.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 Defaultsymbol
str
Use APEX API for symbol list
requiredtimeframe
str
\"1m\", \"5m\", \"15m\", \"30m\", \"1h\", \"2h\", \"4h\", \"6h\", \"12h\", \"d\", \"w\"
requiredsince_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
200
Returns:
Type Descriptionarray
a 2 dim array with the following columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\"
"},{"location":"quantfreedom/exchanges/apex_exchange/apex/#quantfreedom.exchanges.apex_exchange.apex.Apex.set_leverage","title":"set_leverage","text":"set_leverage(\n symbol,\n leverage,\n)\n
Apex API for initial margin rate of a contract
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_us/","title":"binance_us","text":""},{"location":"quantfreedom/exchanges/binance_exchange/binance_us/#quantfreedom.exchanges.binance_exchange.binance_us-classes","title":"Classes","text":""},{"location":"quantfreedom/exchanges/binance_exchange/binance_us/#quantfreedom.exchanges.binance_exchange.binance_us.BinanceUS","title":"BinanceUS","text":" Bases: Exchange
get_candles(\n symbol,\n timeframe,\n since_datetime=None,\n until_datetime=None,\n candles_to_dl=1500,\n)\n
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_us/#quantfreedom.exchanges.binance_exchange.binance_us.BinanceUS.get_candles--summary","title":"Summary","text":"Biance US candle docs
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_us/#quantfreedom.exchanges.binance_exchange.binance_us.BinanceUS.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 Defaultsymbol
str
Use Binance US API for symbol list
requiredtimeframe
str
\"1m\", \"5m\", \"15m\", \"30m\", \"1h\", \"2h\", \"4h\", \"6h\", \"12h\", \"d\", \"w\"
requiredsince_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 Descriptionarray
a 2 dim array with the following columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\"
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_usdm/","title":"binance_usdm","text":""},{"location":"quantfreedom/exchanges/binance_exchange/binance_usdm/#quantfreedom.exchanges.binance_exchange.binance_usdm-classes","title":"Classes","text":""},{"location":"quantfreedom/exchanges/binance_exchange/binance_usdm/#quantfreedom.exchanges.binance_exchange.binance_usdm.BinanceUSDM","title":"BinanceUSDM","text":" Bases: Exchange
__init__(\n use_test_net,\n api_key=None,\n secret_key=None,\n)\n
main docs page
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_usdm/#quantfreedom.exchanges.binance_exchange.binance_usdm.BinanceUSDM.create_order","title":"create_order","text":"create_order(\n symbol,\n side,\n type,\n quantity=None,\n positionSide=None,\n timeInForce=\"GTC\",\n reduceOnly=None,\n price=None,\n newClientOrderId=None,\n stopPrice=None,\n closePosition=None,\n activationPrice=None,\n callbackRate=None,\n workingType=None,\n priceProtect=None,\n newOrderRespType=None,\n priceMatch=None,\n selfTradePreventionMode=None,\n goodTillDate=None,\n recvWindow=None,\n)\n
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_usdm/#quantfreedom.exchanges.binance_exchange.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 DefaultNone
required Returns:
Type DescriptionDictionary
dictionary of info about the symbols
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_usdm/#quantfreedom.exchanges.binance_exchange.binance_usdm.BinanceUSDM.get_candles","title":"get_candles","text":"get_candles(\n symbol,\n timeframe,\n since_datetime=None,\n until_datetime=None,\n candles_to_dl=1500,\n)\n
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_usdm/#quantfreedom.exchanges.binance_exchange.binance_usdm.BinanceUSDM.get_candles--summary","title":"Summary","text":"Biance USDM candle docs
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_usdm/#quantfreedom.exchanges.binance_exchange.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 Defaultsymbol
str
Use Binance USDM API for symbol list
requiredtimeframe
str
\"1m\", \"5m\", \"15m\", \"30m\", \"1h\", \"2h\", \"4h\", \"6h\", \"12h\", \"d\", \"w\"
requiredsince_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 Descriptionarray
a 2 dim array with the following columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\"
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_usdm/#quantfreedom.exchanges.binance_exchange.binance_usdm.BinanceUSDM.get_exchange_info","title":"get_exchange_info","text":"get_exchange_info()\n
Binance Exchange Information
Parameters:
Name Type Description DefaultNone
required Returns:
Type DescriptionDictionary
dictionary of info about the exchange
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_usdm/#quantfreedom.exchanges.binance_exchange.binance_usdm.BinanceUSDM.get_symbols_list","title":"get_symbols_list","text":"get_symbols_list()\n
Binance Exchange Information
Parameters:
Name Type Description DefaultNone
required Returns:
Type DescriptionList
List of exchange symbols
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/","title":"bybit","text":""},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit-classes","title":"Classes","text":""},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit","title":"Bybit","text":" Bases: Exchange
__init__(\n use_test_net,\n api_key=None,\n secret_key=None,\n)\n
main docs page https://bybit-exchange.github.io/docs/v5/intro upgrade to unified account
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.adjust_order","title":"adjust_order","text":"adjust_order(\n symbol,\n asset_size=None,\n category=\"linear\",\n custom_order_id=None,\n orderIv=None,\n order_id=None,\n price=None,\n slLimitPrice=None,\n slTriggerBy=None,\n stopLoss=None,\n takeProfit=None,\n tpLimitPrice=None,\n tpslMode=None,\n tpTriggerBy=None,\n triggerBy=None,\n triggerPrice=None,\n)\n
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.cancel_all_open_orders","title":"cancel_all_open_orders","text":"cancel_all_open_orders(\n symbol=None,\n category=\"linear\",\n baseCoin=None,\n settleCoin=None,\n orderFilter=None,\n stopOrderType=None,\n)\n
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.create_order","title":"create_order","text":"create_order(\n symbol,\n buy_sell,\n position_mode,\n order_type,\n asset_size,\n category=\"linear\",\n time_in_force=\"GTC\",\n price=None,\n triggerDirection=None,\n triggerPrice=None,\n triggerBy=None,\n tpTriggerBy=None,\n slTriggerBy=None,\n custom_order_id=None,\n takeProfit=None,\n stopLoss=None,\n reduce_only=None,\n closeOnTrigger=None,\n isLeverage=None,\n)\n
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.get_all_symbols_info","title":"get_all_symbols_info","text":"get_all_symbols_info(\n category=\"linear\",\n limit=500,\n symbol=None,\n status=None,\n baseCoin=None,\n)\n
Bybit API link to Get Instrument Info
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.get_candles","title":"get_candles","text":"get_candles(\n symbol,\n timeframe,\n since_datetime=None,\n until_datetime=None,\n candles_to_dl=1000,\n category=\"linear\",\n)\n
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.get_candles--summary","title":"Summary","text":"Bybit candle docs
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.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 Defaultsymbol
str
Use Bybit API for symbol list
requiredtimeframe
str
\"1m\", \"5m\", \"15m\", \"30m\", \"1h\", \"2h\", \"4h\", \"6h\", \"12h\", \"d\", \"w\"
requiredsince_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 Descriptionarray
a 2 dim array with the following columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\"
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.get_closed_pnl","title":"get_closed_pnl","text":"get_closed_pnl(\n symbol,\n limit=50,\n since_datetime=None,\n until_datetime=None,\n category=\"linear\",\n)\n
Bybit API link to Get Closed Profit and Loss
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.get_open_orders","title":"get_open_orders","text":"get_open_orders(\n baseCoin=None,\n category=\"linear\",\n custom_order_id=None,\n limit=50,\n orderFilter=None,\n orderStatus=None,\n order_id=None,\n settleCoin=None,\n since_datetime=None,\n symbol=None,\n until_datetime=None,\n)\n
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.get_order_history","title":"get_order_history","text":"get_order_history(\n baseCoin=None,\n category=\"linear\",\n custom_order_id=None,\n limit=50,\n orderFilter=None,\n orderStatus=None,\n order_id=None,\n settleCoin=None,\n since_datetime=None,\n symbol=None,\n until_datetime=None,\n)\n
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.get_position_info","title":"get_position_info","text":"get_position_info(\n symbol,\n baseCoin=None,\n category=\"linear\",\n limit=50,\n settleCoin=None,\n)\n
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.get_risk_limit_info","title":"get_risk_limit_info","text":"get_risk_limit_info(\n symbol,\n category=\"linear\",\n)\n
Bybit API link to Get Risk Limit
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.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 DefaultNone
required Returns:
Type Descriptionlist
symbols
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.get_trading_fee_rates","title":"get_trading_fee_rates","text":"get_trading_fee_rates(\n symbol=None,\n baseCoin=None,\n category=\"linear\",\n)\n
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.get_wallet_info","title":"get_wallet_info","text":"get_wallet_info(\n accountType=\"UNIFIED\",\n trading_with=None,\n)\n
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.set_leverage","title":"set_leverage","text":"set_leverage(\n symbol,\n leverage,\n category=\"linear\",\n)\n
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.set_leverage_mode","title":"set_leverage_mode","text":"set_leverage_mode(\n setMarginMode=\"ISOLATED_MARGIN\",\n)\n
ISOLATED_MARGIN, REGULAR_MARGIN(i.e. Cross margin), PORTFOLIO_MARGIN
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.set_position_mode","title":"set_position_mode","text":"set_position_mode(\n position_mode,\n symbol,\n category=\"linear\",\n trading_with=None,\n)\n
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/","title":"mufex","text":""},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex-classes","title":"Classes","text":""},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex","title":"Mufex","text":" Bases: Exchange
__init__(\n use_test_net,\n api_key=None,\n secret_key=None,\n)\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_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.adjust_order","title":"adjust_order","text":"adjust_order(\n params={},\n)\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_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.cancel_all_open_orders_per_symbol","title":"cancel_all_open_orders_per_symbol","text":"cancel_all_open_orders_per_symbol(\n symbol,\n)\n
no link yet
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.cancel_open_order","title":"cancel_open_order","text":"cancel_open_order(\n symbol,\n order_id=None,\n custom_order_id=None,\n)\n
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.create_order","title":"create_order","text":"create_order(\n symbol,\n buy_sell,\n position_mode,\n order_type,\n asset_size,\n time_in_force=\"GoodTillCancel\",\n price=None,\n triggerDirection=None,\n triggerPrice=None,\n triggerBy=None,\n tpTriggerBy=None,\n slTriggerBy=None,\n custom_order_id=None,\n takeProfit=None,\n stopLoss=None,\n reduce_only=None,\n closeOnTrigger=None,\n)\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_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_all_symbols_info","title":"get_all_symbols_info","text":"get_all_symbols_info(\n category=\"linear\",\n limit=1000,\n symbol=None,\n)\n
Mufex API link to Get Instrument Info
Parameters:
Name Type Description Defaultcategory
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_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_candles","title":"get_candles","text":"get_candles(\n symbol,\n timeframe,\n since_datetime=None,\n until_datetime=None,\n candles_to_dl=1500,\n category=\"linear\",\n)\n
mufex candle docs
Parameters:
Name Type Description Defaultsymbol
str
Mufex Symbol List
requiredtimeframe
str
\"1m\", \"5m\", \"15m\", \"30m\", \"1h\", \"2h\", \"4h\", \"6h\", \"12h\", \"d\", \"w\"
requiredsince_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 Descriptionarray
a 2 dim array with the following columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\"
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_closed_pnl","title":"get_closed_pnl","text":"get_closed_pnl(\n symbol,\n limit=200,\n since_datetime=None,\n until_datetime=None,\n)\n
Mufex API link to Get Closed Profit and Loss
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_filled_orders","title":"get_filled_orders","text":"get_filled_orders(\n symbol,\n limit=200,\n since_datetime=None,\n until_datetime=None,\n execType=None,\n order_id=None,\n)\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_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_open_orders","title":"get_open_orders","text":"get_open_orders(\n symbol,\n limit=50,\n order_id=None,\n custom_order_id=None,\n orderFilter=None,\n)\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_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_order_history","title":"get_order_history","text":"get_order_history(\n symbol,\n limit=50,\n order_id=None,\n custom_order_id=None,\n orderStatus=None,\n orderFilter=None,\n)\n
use link to see all Request Parameters
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_position_info","title":"get_position_info","text":"get_position_info(\n symbol=None,\n settleCoin=None,\n limit=50,\n)\n
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_risk_limit_info","title":"get_risk_limit_info","text":"get_risk_limit_info(\n symbol,\n category=\"linear\",\n)\n
Mufex API link to Get Risk Limit
Parameters:
Name Type Description Defaultsymbol
str
Symbol
requiredcategory
str
If category is not passed, then return \"\"For now, default:linear
'linear'
Returns:
Type Description_type_
description
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_symbol_trading_fee_rates","title":"get_symbol_trading_fee_rates","text":"get_symbol_trading_fee_rates(\n symbol=None,\n)\n
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.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 DefaultNone
required Returns:
Type Descriptionlist
symbols
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_trading_fee_rates","title":"get_trading_fee_rates","text":"get_trading_fee_rates(\n symbol=None,\n)\n
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_wallet_info","title":"get_wallet_info","text":"get_wallet_info(\n trading_with=None,\n)\n
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.set_leverage","title":"set_leverage","text":"set_leverage(\n symbol,\n leverage,\n)\n
No link yet
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.set_leverage_mode","title":"set_leverage_mode","text":"set_leverage_mode(\n symbol,\n leverage_mode,\n leverage=5,\n)\n
Cross/isolated mode. 0: cross margin mode; 1: isolated margin mode
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.set_position_mode","title":"set_position_mode","text":"set_position_mode(\n position_mode,\n trading_with=None,\n symbol=None,\n)\n
"},{"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(\n candles,\n length,\n smoothing_type=rma_tv,\n)\n
Average true range smoothing from tradingview
Parameters:
Name Type Description Defaultcandles
array
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]
requiredlength
int
Number of bars
requiredsmoothing_type
Callable
function to process the smoothing of the atr
rma_tv
Returns:
Type Descriptionarray
atr
"},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.bb_tv","title":"bb_tv","text":"bb_tv(\n length,\n multi,\n source,\n basis_ma_type=sma_tv,\n)\n
Bollinger bands from tradingview
Parameters:
Name Type Description Defaultsource
array
Values to process
requiredlength
int
Number of bars
requiredmulti
float
Standard deviation factor
requiredbasis_ma_type
Callable
Function to process basic ma
sma_tv
Returns:
Type Descriptiontuple[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(\n candles,\n length,\n)\n
Donchain channels
Parameters:
Name Type Description Defaultcandles
array
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]
requiredlength
int
Number of bars of donchain lookback
requiredReturns:
Type Descriptiontuple[array, array, array]
upper, basis, lower
"},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.ema_tv","title":"ema_tv","text":"ema_tv(\n source,\n length,\n)\n
Exponential Moving average from tradingview
Parameters:
Name Type Description Defaultsource
array
Values to process
requiredlength
int
Number of bars
requiredReturns:
Type Descriptionarray
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(\n candles,\n lin_reg_length,\n smoothing_length,\n smoothing_type=sma_tv,\n)\n
Linear regression indicator
Parameters:
Name Type Description Defaultcandles
array
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]
requiredlin_reg_length
int
Number of bars for lin reg
requiredsmoothing_length
int
Number of bars for singal line
requiredsmoothing_type
Callable
function to process the smoothing of the singal line
sma_tv
Returns:
Type Descriptiontuple[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(\n source,\n fast_length,\n slow_length,\n signal_smoothing,\n oscillator_type=ema_tv,\n signal_ma_type=ema_tv,\n)\n
Moving average convergence divergence from tradingview
Parameters:
Name Type Description Defaultsource
array
Values to process
requiredfast_length
int
Number of bars
requiredslow_length
int
Number of bars
requiredsignal_smoothing
int
Number of bars
requiredoscillator_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(\n source,\n length,\n)\n
Relative strength index Moving average from tradingview
Parameters:
Name Type Description Defaultsource
array
Values to process
requiredlength
int
Number of bars
requiredReturns:
Type Descriptionarray
rma
"},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.rma_tv_2","title":"rma_tv_2","text":"rma_tv_2(\n source_1,\n source_2,\n length,\n)\n
Relative strength index Moving average from tradingview
Parameters:
Name Type Description Defaultsource_1
array
Values to process
requiredsource_2
array
Values to process
requiredlength
int
Number of bars
requiredReturns:
Type Descriptionarray
rma_1, rma_2
"},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.rsi_tv","title":"rsi_tv","text":"rsi_tv(\n length,\n source,\n)\n
Relative strength index
Parameters:
Name Type Description Defaultsource
array
Values to process
requiredlength
int
Number of bars
requiredReturns:
Type Descriptionarray
rsi
"},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.sma_tv","title":"sma_tv","text":"sma_tv(\n source,\n length,\n)\n
Simple Moving average from tradingview
Parameters:
Name Type Description Defaultsource
array
Values to process
requiredlength
int
Number of bars
requiredReturns:
Type Descriptionarray
sma
"},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.squeeze_momentum_lazybear_tv","title":"squeeze_momentum_lazybear_tv","text":"squeeze_momentum_lazybear_tv(\n candles,\n length_bb,\n length_kc,\n multi_bb,\n multi_kc,\n)\n
LazyBear Pinescript
Parameters:
Name Type Description Defaultcandles
array
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]
requiredlength_bb
int
Number of bars of Bollinger Bands
requiredlength_kc
int
Number of bars of KC
requiredmulti_bb
int
The multiplier by which the Bollinger Bands will get multiplied
requiredmulti_kc
int
The multiplier by which the KC will get multiplied
requiredReturns:
Type Descriptiontuple[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(\n source,\n length,\n)\n
Standard deviation from tradingview
Explainer Video
Parameters:
Name Type Description Defaultsource
array
Values to process
requiredlength
int
Number of bars
requiredReturns:
Type Descriptionarray
stdev
"},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.supertrend_tv","title":"supertrend_tv","text":"supertrend_tv(\n candles,\n atr_length,\n factor,\n)\n
Super Trend
Parameters:
Name Type Description Defaultcandles
array
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]
requiredatr_length
int
Number of bars
requiredfactor
int
The multiplier by which the ATR will get multiplied
requiredReturns:
Type Descriptiontuple[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(\n candles,\n)\n
True Range from tradingview
Parameters:
Name Type Description Defaultcandles
array
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]
requiredReturns:
Type Descriptionarray
true_range
"},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.vwap_tv","title":"vwap_tv","text":"vwap_tv(\n candles,\n)\n
Volume Weighted Average Price
Parameters:
Name Type Description Defaultcandles
array
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]
requiredReturns:
Type Descriptionarray
vwap
"},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.wma_tv","title":"wma_tv","text":"wma_tv(\n source,\n length,\n)\n
Weighted Moving Average From Tradingview
Explainer Video
Parameters:
Name Type Description Defaultsource
array
Values to process
requiredlength
int
Number of bars
requiredReturns:
Type Descriptionarray
wma
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/","title":"nb_indicators","text":""},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators-functions","title":"Functions","text":""},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_atr_tv","title":"nb_atr_tv","text":"nb_atr_tv(\n candles,\n length,\n smoothing_type=nb_rma_tv,\n)\n
Average true range smoothing https://www.tradingview.com/pine-script-reference/v5/#fun_ta.atr
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_bb_tv","title":"nb_bb_tv","text":"nb_bb_tv(\n source,\n length,\n multi,\n basis_ma_type=nb_sma_tv,\n)\n
returns basis, upper, lower
Bollinger bands https://www.tradingview.com/pine-script-reference/v5/#fun_ta.bb
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_ema_tv","title":"nb_ema_tv","text":"nb_ema_tv(\n source,\n length,\n)\n
Exponential Moving average https://www.tradingview.com/pine-script-reference/v5/#fun_ta.ema
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_macd_tv","title":"nb_macd_tv","text":"nb_macd_tv(\n source,\n fast_length,\n slow_length,\n signal_smoothing,\n oscillator_type=nb_ema_tv,\n signal_ma_type=nb_ema_tv,\n)\n
return order = histogram, macd, signal Moving average convergence divergence https://www.tradingview.com/pine-script-reference/v5/#fun_ta.macd
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_rma_tv","title":"nb_rma_tv","text":"nb_rma_tv(\n source,\n length,\n)\n
Relative strength index Moving average https://www.tradingview.com/pine-script-reference/v5/#fun_ta.rma
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_rma_tv_2","title":"nb_rma_tv_2","text":"nb_rma_tv_2(\n source_1,\n source_2,\n length,\n)\n
Relative strength index Moving average https://www.tradingview.com/pine-script-reference/v5/#fun_ta.rma
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_rsi_tv","title":"nb_rsi_tv","text":"nb_rsi_tv(\n source,\n length,\n)\n
Relative strength index https://www.tradingview.com/pine-script-reference/v5/#fun_ta.rsi
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_sma_tv","title":"nb_sma_tv","text":"nb_sma_tv(\n source,\n length,\n)\n
Simple Moving average https://www.tradingview.com/pine-script-reference/v5/#fun_ta.sma
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_squeeze_momentum_lazybear_tv","title":"nb_squeeze_momentum_lazybear_tv","text":"nb_squeeze_momentum_lazybear_tv(\n candles,\n length_bb,\n length_kc,\n multi_bb,\n multi_kc,\n)\n
Returns = sqz_hist, sqz_on, no_sqz
https://www.tradingview.com/script/nqQ1DT5a-Squeeze-Momentum-Indicator-LazyBear/
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_stdev_tv","title":"nb_stdev_tv","text":"nb_stdev_tv(\n source,\n length,\n)\n
Standard deviation https://www.tradingview.com/pine-script-reference/v5/#fun_ta.stdev
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_supertrend_tv","title":"nb_supertrend_tv","text":"nb_supertrend_tv(\n candles,\n atr_length,\n factor,\n)\n
return super trend, direction Super Trend https://www.tradingview.com/pine-script-reference/v5/#fun_ta.supertrend
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_true_range_tv","title":"nb_true_range_tv","text":"nb_true_range_tv(\n candles,\n)\n
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_vwap_tv","title":"nb_vwap_tv","text":"nb_vwap_tv(\n candles,\n)\n
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_wma_tv","title":"nb_wma_tv","text":"nb_wma_tv(\n source,\n length,\n)\n
Weighted Moving average https://www.tradingview.com/pine-script-reference/v5/#fun_ta.wma
"},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_increase_position/","title":"nb_increase_position","text":""},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_increase_position/#quantfreedom.nb_funcs.nb_order_handler.nb_increase_position-functions","title":"Functions","text":""},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_increase_position/#quantfreedom.nb_funcs.nb_order_handler.nb_increase_position.nb_c_pl_ra_ps","title":"nb_c_pl_ra_ps","text":"nb_c_pl_ra_ps(\n equity,\n logger,\n max_equity_risk_pct,\n possible_loss,\n risk_account_pct_size,\n total_trades,\n)\n
Possible loss risk account percent size
"},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_increase_position/#quantfreedom.nb_funcs.nb_order_handler.nb_increase_position.nb_c_too_b_s","title":"nb_c_too_b_s","text":"nb_c_too_b_s(\n entry_size_asset,\n logger,\n max_asset_size,\n min_asset_size,\n stringer,\n)\n
Check if the asset size is too big or too small
"},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_increase_position/#quantfreedom.nb_funcs.nb_order_handler.nb_increase_position.nb_c_total_trades","title":"nb_c_total_trades","text":"nb_c_total_trades(\n average_entry,\n logger,\n market_fee_pct,\n max_trades,\n position_size_asset,\n possible_loss,\n sl_price,\n stringer,\n total_trades,\n)\n
Checking the total trades
"},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_increase_position/#quantfreedom.nb_funcs.nb_order_handler.nb_increase_position.nb_min_asset_amount","title":"nb_min_asset_amount","text":"nb_min_asset_amount(\n acc_ex_other,\n logger,\n nb_entry_calc_np,\n nb_entry_calc_p,\n order_info,\n stringer,\n)\n
Setting your position size to the min amount the exchange will allow
"},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_increase_position/#quantfreedom.nb_funcs.nb_order_handler.nb_increase_position.nb_rpa_slbcb","title":"nb_rpa_slbcb","text":"nb_rpa_slbcb(\n acc_ex_other,\n logger,\n nb_entry_calc_np,\n nb_entry_calc_p,\n order_info,\n stringer,\n)\n
Risking percent of your account while also having your stop loss based open high low or close of a candle
"},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_stop_loss/","title":"nb_stop_loss","text":""},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_stop_loss/#quantfreedom.nb_funcs.nb_order_handler.nb_stop_loss-functions","title":"Functions","text":""},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_stop_loss/#quantfreedom.nb_funcs.nb_order_handler.nb_stop_loss.nb_check_move_sl_to_be","title":"nb_check_move_sl_to_be","text":"nb_check_move_sl_to_be(\n average_entry,\n can_move_sl_to_be,\n current_candle,\n logger,\n market_fee_pct,\n nb_move_sl_bool,\n nb_zero_or_entry_calc,\n price_tick_step,\n sl_price,\n sl_to_be_cb_type,\n sl_to_be_when_pct,\n stringer,\n)\n
Checking to see if we move the stop loss to break even
"},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_stop_loss/#quantfreedom.nb_funcs.nb_order_handler.nb_stop_loss.nb_check_move_tsl","title":"nb_check_move_tsl","text":"nb_check_move_tsl(\n average_entry,\n current_candle,\n logger,\n nb_move_sl_bool,\n nb_sl_price_calc,\n price_tick_step,\n sl_price,\n stringer,\n trail_sl_bcb_type,\n trail_sl_by_pct,\n trail_sl_when_pct,\n)\n
Checking to see if we move the trailing stop loss
"},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_stop_loss/#quantfreedom.nb_funcs.nb_order_handler.nb_stop_loss.nb_cm_sl_to_be_pass","title":"nb_cm_sl_to_be_pass","text":"nb_cm_sl_to_be_pass(\n average_entry,\n can_move_sl_to_be,\n current_candle,\n logger,\n market_fee_pct,\n nb_move_sl_bool,\n nb_zero_or_entry_calc,\n price_tick_step,\n sl_price,\n sl_to_be_cb_type,\n sl_to_be_when_pct,\n stringer,\n)\n
Long stop loss to break even pass
"},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_stop_loss/#quantfreedom.nb_funcs.nb_order_handler.nb_stop_loss.nb_sl_based_on_candle_body","title":"nb_sl_based_on_candle_body","text":"nb_sl_based_on_candle_body(\n bar_index,\n candles,\n logger,\n nb_sl_bcb_price_getter,\n nb_sl_price_calc,\n price_tick_step,\n sl_based_on_add_pct,\n sl_based_on_lookback,\n sl_bcb_type,\n stringer,\n)\n
Long Stop Loss Based on Candle Body Calculator
"},{"location":"quantfreedom/nb_funcs/nb_simulate/nb_sim_base/","title":"nb_sim_base","text":""},{"location":"quantfreedom/nb_funcs/nb_simulate/nb_sim_base/#quantfreedom.nb_funcs.nb_simulate.nb_sim_base-classes","title":"Classes","text":""},{"location":"quantfreedom/nb_funcs/nb_simulate/nb_sim_base/#quantfreedom.nb_funcs.nb_simulate.nb_sim_base-functions","title":"Functions","text":""},{"location":"quantfreedom/nb_funcs/nb_simulate/nb_sim_df/","title":"nb_sim_df","text":""},{"location":"quantfreedom/nb_funcs/nb_simulate/nb_sim_df/#quantfreedom.nb_funcs.nb_simulate.nb_sim_df-classes","title":"Classes","text":""},{"location":"quantfreedom/nb_funcs/nb_strategies/nb_strategy/","title":"nb_strategy","text":""},{"location":"quantfreedom/nb_funcs/nb_strategies/nb_strategy/#quantfreedom.nb_funcs.nb_strategies.nb_strategy-functions","title":"Functions","text":""},{"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__(\n asset_tick_step,\n increase_position_type,\n long_short,\n market_fee_pct,\n max_asset_size,\n min_asset_size,\n price_tick_step,\n sl_strategy_type,\n)\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 Defaultasset_tick_step
float
asset_tick_step
requiredincrease_position_type
IncreasePositionType
How you want to process increasing your position
requiredlong_short
str
long or short
requiredmarket_fee_pct
float
market_fee_pct
requiredmax_asset_size
float
max_asset_size
requiredmin_asset_size
float
min_asset_size
requiredprice_tick_step
float
price_tick_step
requiredsl_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(\n equity,\n possible_loss,\n total_trades,\n)\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 Defaultequity
float
equity
requiredpossible_loss
float
possible_loss
requiredtotal_trades
int
total_trades
requiredReturns:
Type Description(int, int)
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(\n entry_size_asset,\n)\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 Defaultentry_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(\n average_entry,\n possible_loss,\n position_size_asset,\n sl_price,\n total_trades,\n)\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 Defaultaverage_entry
float
average_entry
requiredpossible_loss
float
possible_loss
requiredposition_size_asset
float
position_size_asset
requiredsl_price
float
sl_price
requiredtotal_trades
int
total_trades
requiredReturns:
Type Descriptiontuple[int, int]
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(\n entry_price,\n possible_loss,\n sl_price,\n)\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 Defaultentry_price
float
entry_price
requiredpossible_loss
float
possible_loss
requiredsl_price
float
sl_price
requiredReturns:
Type Descriptionfloat
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(\n average_entry,\n entry_price,\n position_size_usd,\n possible_loss,\n sl_price,\n)\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 Defaultaverage_entry
float
average_entry
requiredentry_price
float
entry_price
requiredposition_size_usd
float
position_size_usd
requiredpossible_loss
float
possible_loss
requiredsl_price
float
sl_price
requiredReturns:
Type Descriptionfloat
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(\n entry_price,\n sl_price,\n)\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 Defaultentry_price
float
entry_price
requiredsl_price
float
sl_price
requiredReturns:
Type Descriptiontuple[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, 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(\n average_entry,\n entry_price,\n position_size_asset,\n position_size_usd,\n possible_loss,\n sl_price,\n total_trades,\n)\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 Defaultaverage_entry
float
average_entry
requiredentry_price
float
entry_price
requiredposition_size_asset
float
position_size_asset
requiredposition_size_usd
float
position_size_usd
requiredpossible_loss
float
possible_loss
requiredsl_price
float
sl_price
requiredtotal_trades
int
total_trades
requiredReturns:
Type Descriptiontuple[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, 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(\n average_entry,\n entry_price,\n equity,\n position_size_asset,\n position_size_usd,\n possible_loss,\n sl_price,\n total_trades,\n)\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 Defaultaverage_entry
float
average_entry
requiredentry_price
float
entry_price
requiredequity
float
equity
requiredposition_size_asset
float
position_size_asset
requiredposition_size_usd
float
position_size_usd
requiredpossible_loss
float
possible_loss
requiredsl_price
float
sl_price
requiredtotal_trades
int
total_trades
requiredReturns:
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, 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(\n equity,\n average_entry,\n entry_price,\n position_size_asset,\n position_size_usd,\n possible_loss,\n sl_price,\n total_trades,\n)\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 Defaultaverage_entry
float
average_entry
requiredentry_price
float
entry_price
requiredequity
float
equity
requiredposition_size_asset
float
position_size_asset
requiredposition_size_usd
float
position_size_usd
requiredpossible_loss
float
possible_loss
requiredsl_price
float
sl_price
requiredtotal_trades
int
total_trades
requiredReturns:
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, 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(\n equity,\n entry_price,\n sl_price,\n)\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 Defaultequity
float
equity
requiredentry_price
float
entry_price
requiredsl_price
float
sl_price
requiredReturns:
Type Descriptiontuple[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, 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(\n average_entry,\n entry_price,\n equity,\n position_size_asset,\n position_size_usd,\n possible_loss,\n sl_price,\n total_trades,\n)\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 Defaultaverage_entry
float
average_entry
requiredentry_price
float
entry_price
requiredequity
float
equity
requiredposition_size_asset
float
position_size_asset
requiredposition_size_usd
float
position_size_usd
requiredpossible_loss
float
possible_loss
requiredsl_price
float
sl_price
requiredtotal_trades
int
total_trades
requiredReturns:
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, 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(\n possible_loss,\n sl_price,\n entry_price,\n)\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 Defaultentry_price
float
entry_price
requiredpossible_loss
float
possible_loss
requiredsl_price
float
sl_price
requiredReturns:
Type Descriptionfloat
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(\n average_entry,\n entry_price,\n position_size_usd,\n possible_loss,\n sl_price,\n)\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 Defaultaverage_entry
float
average_entry
requiredentry_price
float
entry_price
requiredposition_size_usd
float
position_size_usd
requiredpossible_loss
float
possible_loss
requiredsl_price
float
sl_price
requiredReturns:
Type Descriptionfloat
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(\n average_entry,\n can_move_sl_to_be,\n current_candle,\n sl_price,\n)\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(\n average_entry,\n current_candle,\n sl_price,\n)\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(\n bar_index,\n candles,\n)\n
Long Stop Loss Based on Candle Body Calculator
"}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Installation","text":"Make sure you read the entire bullet point before you start doing what the bullet point says.
"},{"location":"#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
Git Bash is how you allow your computer to talk to github.
This is the program I use to code
Ctl shift p and type in default profile and then select terminal select default profile Click on cmd prompt In the menu bar click on terminal New terminal
Create a folder called coding wherever you want on your computer Create a folder inside that folder called venvs - venv stands for virtual enviromnet Now you want to change your terminal directory to the coding folder Change to the correct drive by typing something like C: or E: or whatever your drive letter is Then copy the path to your coding folder something like this quantfreedom\\coding\\venvs And in the terminal paste cd quantfreedom\\coding\\venvs\\
Change directory to venvs Create venv python -m venv qfree 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":"beginners/","title":"Beginners","text":"BEGINNERS GUIDE
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 https://www.youtube.com/playlist?list=PL-osiE80TeTskrapNbzXhwoFUiLCjGgY7
working with classes https://www.youtube.com/playlist?list=PL-osiE80TeTsqhIuOqKhwlXsIBIdSeYtc
learn the basics of pandas https://www.youtube.com/playlist?list=PL-osiE80TeTsWmV9i9c58mdDCSskIFdDS
study plotly https://www.youtube.com/playlist?list=PLBSCvBlTOLa8rf2kGkP_Bx5xXqT-er4Yq
then study the basics of numpy https://www.youtube.com/playlist?list=PLZGM26Bt_cku3VRraPDwzzqrav0_u8pDC https://www.youtube.com/playlist?list=PLc_Ps3DdrcTuf3e-BBpDv8r9jbOB5Wdv- https://www.youtube.com/playlist?list=PLCC34OHNcOtpalASMlX2HHdsLNipyyhbK
once you are done with this then follow my latest video going over a strategy
then make your own signals from doing an ema cross over ... just make the proper signals and graph the signals
once you make the signals then let me know in the general chat and send me a link to your github and i will check it out and then we can move on from there
"},{"location":"free_bot_finish/","title":"Free Bot Finish","text":"Make sure you read the entire bullet point before you start doing what the bullet point says.
"},{"location":"free_bot_finish/#donnload-winscp","title":"Donnload WINSCP","text":"--====================================================
"},{"location":"free_trading_bots%20copy/#prerequisites","title":"Prerequisites","text":"(back to top)
"},{"location":"free_trading_bots%20copy/#bybit","title":"ByBit","text":"(include in Bybit section - added from WINSCP) * for bybit you have to make sure you are in a uinfied account ... log into bybit and go to the trading pair btcusdt and on the right side below the open and short and above the contract details and price pool ... if you see the word upgrade make sure
(back to top )
"},{"location":"free_trading_bots%20copy/#aws-launch-template","title":"AWS Launch Template","text":"Name your template under launch template name
In the next section choose latest ubuntu version
For instance type choose the .micro Free tier eligible option
next in key pair login click on create new key pair
Then name the key pair something and select ppk and then click create key pair
Make sure you save the download somewhere other than your desktop because you will need to use it later on.
(Added from Adding Github Token) * create launch template * now in the green sction click on the link * then click on actions and launch instance from template * then in lower right corner click launch instance * thne in the green click the link to see the instance details
(back to top )
"},{"location":"free_trading_bots%20copy/#connect-to-aws-instance","title":"Connect to AWS Instance","text":"(back to top )
"},{"location":"free_trading_bots%20copy/#github-token","title":"Github token","text":"then select the main repo that will select all the options under repo alt text
then scroll to the bottom and choose create token
(back to top )
"},{"location":"free_trading_bots%20copy/#get-access-to-strat","title":"Get Access To Strat","text":"So at this point you should have everything done and you have the following
(back to top )
"},{"location":"free_trading_bots%20copy/#add-token-to-script","title":"Add Token To Script","text":"no chane
(back to top )
"},{"location":"free_trading_bots/","title":"Free Live Trading Bots","text":"I am giving away bots that are ready to go live FOR FREE ... All you will have to do is provide your API keys in the code and hit run
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.
"},{"location":"free_trading_bots/#follow-my-social-media-pages","title":"Follow My Social Media Pages","text":"once you have done all of this then put the following info in the bot sign up channel Click here
"},{"location":"free_trading_bots/#aws-and-github","title":"AWS and Github","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 Defaultgains_pct_filter
float = -np.inf
Will not record any strategies whos gains % result is below gains_pct_filter
requiredqf_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,
requiredtotal_trade_filter
int = -1
Will not record any strategies whos total trades result is below total trades filter.
requiredrecord_size
int = 10000
The amount of records you want to to save. Keep this number as low as possible to save memory.
required"},{"location":"quantfreedom/enums/#quantfreedom.enums.IncreasePositionTypeT","title":"IncreasePositionTypeT","text":" Bases: NamedTuple
The different ways you can increase your position
Parameters:
Name Type Description DefaultAmountEntrySize
int= 0
How much you want your position size to be per trade in USDT
requiredPctAccountEntrySize
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
requiredRiskAmountEntrySize
int = 2
How much you will risk per trade. You must have a stop loss in order to use this mode.
requiredRiskPctAccountEntrySize
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
requiredSmalletEntrySizeAsset
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/enums/#quantfreedom.enums.LeverageStrategyTypeT","title":"LeverageStrategyTypeT","text":" Bases: NamedTuple
Choosing which leverage strategy you would like to use.
Parameters:
Name Type Description DefaultDynamic
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.
requiredStatic
int = 1
Static leverage
required"},{"location":"quantfreedom/enums/#quantfreedom.enums.TakeProfitStrategyTypeT","title":"TakeProfitStrategyTypeT","text":" Bases: NamedTuple
How you want to process the take profit
Parameters:
Name Type Description DefaultRiskReward
int = 0
Risk to reward
requiredProvided
int = 1
Your strategy will provide the exit prices
requiredNothing
int = 2
No take profits.
required"},{"location":"quantfreedom/helper_funcs/","title":"helper_funcs","text":""},{"location":"quantfreedom/helper_funcs/#quantfreedom.helper_funcs-classes","title":"Classes","text":""},{"location":"quantfreedom/helper_funcs/#quantfreedom.helper_funcs-functions","title":"Functions","text":""},{"location":"quantfreedom/helper_funcs/#quantfreedom.helper_funcs.candles_to_df","title":"candles_to_df","text":"candles_to_df(\n candles,\n)\n
Converts your numpy array candles to a pandas dataframe
Parameters:
Name Type Description Defaultcandles
array
a 2 dim array with the following columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\"
requiredReturns:
Type DescriptionDataFrame
columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\" with an index of pandas datetimes
"},{"location":"quantfreedom/helper_funcs/#quantfreedom.helper_funcs.dl_ex_candles","title":"dl_ex_candles","text":"dl_ex_candles(\n symbol,\n exchange,\n timeframe,\n since_datetime=None,\n until_datetime=None,\n candles_to_dl=None,\n)\n
Download candles from the exchange of your choice
Parameters:
Name Type Description Defaultexchange
str
binance us = 'binance_us' | default candles to dl is 1500
binance futures = 'binance_usdm' | default candles to dl is 1500
apex = 'apex' | default candles to dl is 200
mufex = 'mufex' | default candles to dl is 1500
bybit = 'bybit' | default candles to dl is 1000
requiredsymbol
str
Check the api of the exchange or get all the symbols of the exchange to see which ones you need to put here
requiredtimeframe
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 Descriptionarray
a 2 dim array with the following columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\"
"},{"location":"quantfreedom/simulate/","title":"simulate","text":""},{"location":"quantfreedom/simulate/#quantfreedom.simulate-classes","title":"Classes","text":""},{"location":"quantfreedom/simulate/#quantfreedom.simulate-functions","title":"Functions","text":""},{"location":"quantfreedom/utils/","title":"utils","text":""},{"location":"quantfreedom/utils/#quantfreedom.utils-functions","title":"Functions","text":""},{"location":"quantfreedom/utils/#quantfreedom.utils.clear_cache","title":"clear_cache","text":"clear_cache()\n
clears the python cache and numba cache
"},{"location":"quantfreedom/utils/#quantfreedom.utils.delete_dir","title":"delete_dir","text":"delete_dir(\n p,\n)\n
Delete info in directory
Parameters:
Name Type Description Defaultp
path
path to directory
required"},{"location":"quantfreedom/utils/#quantfreedom.utils.generate_candles","title":"generate_candles","text":"generate_candles(\n number_of_candles=100,\n plot_candles=False,\n seed=None,\n)\n
Generate a dataframe filled with random candles
Parameters:
Name Type Description Defaultnumber_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 DescriptionpdFrame
Dataframe of open high low close
"},{"location":"quantfreedom/utils/#quantfreedom.utils.pretty_qf","title":"pretty_qf","text":"pretty_qf(\n named_tuple,\n)\n
Prints named tuples in a pretty way
Parameters:
Name Type Description Defaultnamed_tuple
namedtuple
must only be a named tuple
required"},{"location":"quantfreedom/exchanges/apex_exchange/apex/","title":"apex","text":""},{"location":"quantfreedom/exchanges/apex_exchange/apex/#quantfreedom.exchanges.apex_exchange.apex-classes","title":"Classes","text":""},{"location":"quantfreedom/exchanges/apex_exchange/apex/#quantfreedom.exchanges.apex_exchange.apex.Apex","title":"Apex","text":" Bases: Exchange
__init__(\n use_test_net,\n api_key=None,\n secret_key=None,\n passphrase=None,\n stark_key_public=None,\n stark_key_private=None,\n stark_key_y=None,\n)\n
main docs page https://api-docs.pro.apex.exchange
"},{"location":"quantfreedom/exchanges/apex_exchange/apex/#quantfreedom.exchanges.apex_exchange.apex.Apex.create_order","title":"create_order","text":"create_order(\n symbol,\n buy_sell,\n order_type,\n asset_size,\n limitFeeRate=None,\n limitFee=None,\n price=None,\n accountId=None,\n time_in_force=\"GOOD_TIL_CANCEL\",\n reduceOnly=False,\n triggerPrice=None,\n triggerPriceType=None,\n trailingPercent=None,\n clientId=None,\n expiration=None,\n isPositionTpsl=False,\n signature=None,\n sourceFlag=None,\n)\n
Apex API for Creating Orders
"},{"location":"quantfreedom/exchanges/apex_exchange/apex/#quantfreedom.exchanges.apex_exchange.apex.Apex.get_candles","title":"get_candles","text":"get_candles(\n symbol,\n timeframe,\n since_datetime=None,\n until_datetime=None,\n candles_to_dl=200,\n)\n
"},{"location":"quantfreedom/exchanges/apex_exchange/apex/#quantfreedom.exchanges.apex_exchange.apex.Apex.get_candles--summary","title":"Summary","text":"Apex candle docs
"},{"location":"quantfreedom/exchanges/apex_exchange/apex/#quantfreedom.exchanges.apex_exchange.apex.Apex.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 Defaultsymbol
str
Use APEX API for symbol list
requiredtimeframe
str
\"1m\", \"5m\", \"15m\", \"30m\", \"1h\", \"2h\", \"4h\", \"6h\", \"12h\", \"d\", \"w\"
requiredsince_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
200
Returns:
Type Descriptionarray
a 2 dim array with the following columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\"
"},{"location":"quantfreedom/exchanges/apex_exchange/apex/#quantfreedom.exchanges.apex_exchange.apex.Apex.set_leverage","title":"set_leverage","text":"set_leverage(\n symbol,\n leverage,\n)\n
Apex API for initial margin rate of a contract
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_us/","title":"binance_us","text":""},{"location":"quantfreedom/exchanges/binance_exchange/binance_us/#quantfreedom.exchanges.binance_exchange.binance_us-classes","title":"Classes","text":""},{"location":"quantfreedom/exchanges/binance_exchange/binance_us/#quantfreedom.exchanges.binance_exchange.binance_us.BinanceUS","title":"BinanceUS","text":" Bases: Exchange
get_candles(\n symbol,\n timeframe,\n since_datetime=None,\n until_datetime=None,\n candles_to_dl=1500,\n)\n
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_us/#quantfreedom.exchanges.binance_exchange.binance_us.BinanceUS.get_candles--summary","title":"Summary","text":"Biance US candle docs
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_us/#quantfreedom.exchanges.binance_exchange.binance_us.BinanceUS.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 Defaultsymbol
str
Use Binance US API for symbol list
requiredtimeframe
str
\"1m\", \"5m\", \"15m\", \"30m\", \"1h\", \"2h\", \"4h\", \"6h\", \"12h\", \"d\", \"w\"
requiredsince_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 Descriptionarray
a 2 dim array with the following columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\"
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_usdm/","title":"binance_usdm","text":""},{"location":"quantfreedom/exchanges/binance_exchange/binance_usdm/#quantfreedom.exchanges.binance_exchange.binance_usdm-classes","title":"Classes","text":""},{"location":"quantfreedom/exchanges/binance_exchange/binance_usdm/#quantfreedom.exchanges.binance_exchange.binance_usdm.BinanceUSDM","title":"BinanceUSDM","text":" Bases: Exchange
__init__(\n use_test_net,\n api_key=None,\n secret_key=None,\n)\n
main docs page
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_usdm/#quantfreedom.exchanges.binance_exchange.binance_usdm.BinanceUSDM.create_order","title":"create_order","text":"create_order(\n symbol,\n side,\n type,\n quantity=None,\n positionSide=None,\n timeInForce=\"GTC\",\n reduceOnly=None,\n price=None,\n newClientOrderId=None,\n stopPrice=None,\n closePosition=None,\n activationPrice=None,\n callbackRate=None,\n workingType=None,\n priceProtect=None,\n newOrderRespType=None,\n priceMatch=None,\n selfTradePreventionMode=None,\n goodTillDate=None,\n recvWindow=None,\n)\n
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_usdm/#quantfreedom.exchanges.binance_exchange.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 DefaultNone
required Returns:
Type DescriptionDictionary
dictionary of info about the symbols
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_usdm/#quantfreedom.exchanges.binance_exchange.binance_usdm.BinanceUSDM.get_candles","title":"get_candles","text":"get_candles(\n symbol,\n timeframe,\n since_datetime=None,\n until_datetime=None,\n candles_to_dl=1500,\n)\n
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_usdm/#quantfreedom.exchanges.binance_exchange.binance_usdm.BinanceUSDM.get_candles--summary","title":"Summary","text":"Biance USDM candle docs
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_usdm/#quantfreedom.exchanges.binance_exchange.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 Defaultsymbol
str
Use Binance USDM API for symbol list
requiredtimeframe
str
\"1m\", \"5m\", \"15m\", \"30m\", \"1h\", \"2h\", \"4h\", \"6h\", \"12h\", \"d\", \"w\"
requiredsince_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 Descriptionarray
a 2 dim array with the following columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\"
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_usdm/#quantfreedom.exchanges.binance_exchange.binance_usdm.BinanceUSDM.get_exchange_info","title":"get_exchange_info","text":"get_exchange_info()\n
Binance Exchange Information
Parameters:
Name Type Description DefaultNone
required Returns:
Type DescriptionDictionary
dictionary of info about the exchange
"},{"location":"quantfreedom/exchanges/binance_exchange/binance_usdm/#quantfreedom.exchanges.binance_exchange.binance_usdm.BinanceUSDM.get_symbols_list","title":"get_symbols_list","text":"get_symbols_list()\n
Binance Exchange Information
Parameters:
Name Type Description DefaultNone
required Returns:
Type DescriptionList
List of exchange symbols
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/","title":"bybit","text":""},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit-classes","title":"Classes","text":""},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit","title":"Bybit","text":" Bases: Exchange
__init__(\n use_test_net,\n api_key=None,\n secret_key=None,\n)\n
main docs page https://bybit-exchange.github.io/docs/v5/intro upgrade to unified account
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.adjust_order","title":"adjust_order","text":"adjust_order(\n symbol,\n asset_size=None,\n category=\"linear\",\n custom_order_id=None,\n orderIv=None,\n order_id=None,\n price=None,\n slLimitPrice=None,\n slTriggerBy=None,\n stopLoss=None,\n takeProfit=None,\n tpLimitPrice=None,\n tpslMode=None,\n tpTriggerBy=None,\n triggerBy=None,\n triggerPrice=None,\n)\n
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.cancel_all_open_orders","title":"cancel_all_open_orders","text":"cancel_all_open_orders(\n symbol=None,\n category=\"linear\",\n baseCoin=None,\n settleCoin=None,\n orderFilter=None,\n stopOrderType=None,\n)\n
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.create_order","title":"create_order","text":"create_order(\n symbol,\n buy_sell,\n position_mode,\n order_type,\n asset_size,\n category=\"linear\",\n time_in_force=\"GTC\",\n price=None,\n triggerDirection=None,\n triggerPrice=None,\n triggerBy=None,\n tpTriggerBy=None,\n slTriggerBy=None,\n custom_order_id=None,\n takeProfit=None,\n stopLoss=None,\n reduce_only=None,\n closeOnTrigger=None,\n isLeverage=None,\n)\n
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.get_all_symbols_info","title":"get_all_symbols_info","text":"get_all_symbols_info(\n category=\"linear\",\n limit=500,\n symbol=None,\n status=None,\n baseCoin=None,\n)\n
Bybit API link to Get Instrument Info
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.get_candles","title":"get_candles","text":"get_candles(\n symbol,\n timeframe,\n since_datetime=None,\n until_datetime=None,\n candles_to_dl=1000,\n category=\"linear\",\n)\n
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.get_candles--summary","title":"Summary","text":"Bybit candle docs
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.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 Defaultsymbol
str
Use Bybit API for symbol list
requiredtimeframe
str
\"1m\", \"5m\", \"15m\", \"30m\", \"1h\", \"2h\", \"4h\", \"6h\", \"12h\", \"d\", \"w\"
requiredsince_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 Descriptionarray
a 2 dim array with the following columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\"
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.get_closed_pnl","title":"get_closed_pnl","text":"get_closed_pnl(\n symbol,\n limit=50,\n since_datetime=None,\n until_datetime=None,\n category=\"linear\",\n)\n
Bybit API link to Get Closed Profit and Loss
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.get_open_orders","title":"get_open_orders","text":"get_open_orders(\n baseCoin=None,\n category=\"linear\",\n custom_order_id=None,\n limit=50,\n orderFilter=None,\n orderStatus=None,\n order_id=None,\n settleCoin=None,\n since_datetime=None,\n symbol=None,\n until_datetime=None,\n)\n
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.get_order_history","title":"get_order_history","text":"get_order_history(\n baseCoin=None,\n category=\"linear\",\n custom_order_id=None,\n limit=50,\n orderFilter=None,\n orderStatus=None,\n order_id=None,\n settleCoin=None,\n since_datetime=None,\n symbol=None,\n until_datetime=None,\n)\n
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.get_position_info","title":"get_position_info","text":"get_position_info(\n symbol,\n baseCoin=None,\n category=\"linear\",\n limit=50,\n settleCoin=None,\n)\n
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.get_risk_limit_info","title":"get_risk_limit_info","text":"get_risk_limit_info(\n symbol,\n category=\"linear\",\n)\n
Bybit API link to Get Risk Limit
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.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 DefaultNone
required Returns:
Type Descriptionlist
symbols
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.get_trading_fee_rates","title":"get_trading_fee_rates","text":"get_trading_fee_rates(\n symbol=None,\n baseCoin=None,\n category=\"linear\",\n)\n
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.get_wallet_info","title":"get_wallet_info","text":"get_wallet_info(\n accountType=\"UNIFIED\",\n trading_with=None,\n)\n
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.set_leverage","title":"set_leverage","text":"set_leverage(\n symbol,\n leverage,\n category=\"linear\",\n)\n
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.set_leverage_mode","title":"set_leverage_mode","text":"set_leverage_mode(\n setMarginMode=\"ISOLATED_MARGIN\",\n)\n
ISOLATED_MARGIN, REGULAR_MARGIN(i.e. Cross margin), PORTFOLIO_MARGIN
"},{"location":"quantfreedom/exchanges/bybit_exchange/bybit/#quantfreedom.exchanges.bybit_exchange.bybit.Bybit.set_position_mode","title":"set_position_mode","text":"set_position_mode(\n position_mode,\n symbol,\n category=\"linear\",\n trading_with=None,\n)\n
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/","title":"mufex","text":""},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex-classes","title":"Classes","text":""},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex","title":"Mufex","text":" Bases: Exchange
__init__(\n use_test_net,\n api_key=None,\n secret_key=None,\n)\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_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.adjust_order","title":"adjust_order","text":"adjust_order(\n params={},\n)\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_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.cancel_all_open_orders_per_symbol","title":"cancel_all_open_orders_per_symbol","text":"cancel_all_open_orders_per_symbol(\n symbol,\n)\n
no link yet
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.cancel_open_order","title":"cancel_open_order","text":"cancel_open_order(\n symbol,\n order_id=None,\n custom_order_id=None,\n)\n
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.create_order","title":"create_order","text":"create_order(\n symbol,\n buy_sell,\n position_mode,\n order_type,\n asset_size,\n time_in_force=\"GoodTillCancel\",\n price=None,\n triggerDirection=None,\n triggerPrice=None,\n triggerBy=None,\n tpTriggerBy=None,\n slTriggerBy=None,\n custom_order_id=None,\n takeProfit=None,\n stopLoss=None,\n reduce_only=None,\n closeOnTrigger=None,\n)\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_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_all_symbols_info","title":"get_all_symbols_info","text":"get_all_symbols_info(\n category=\"linear\",\n limit=1000,\n symbol=None,\n)\n
Mufex API link to Get Instrument Info
Parameters:
Name Type Description Defaultcategory
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_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_candles","title":"get_candles","text":"get_candles(\n symbol,\n timeframe,\n since_datetime=None,\n until_datetime=None,\n candles_to_dl=1500,\n category=\"linear\",\n)\n
mufex candle docs
Parameters:
Name Type Description Defaultsymbol
str
Mufex Symbol List
requiredtimeframe
str
\"1m\", \"5m\", \"15m\", \"30m\", \"1h\", \"2h\", \"4h\", \"6h\", \"12h\", \"d\", \"w\"
requiredsince_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 Descriptionarray
a 2 dim array with the following columns \"timestamp\", \"open\", \"high\", \"low\", \"close\", \"volume\"
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_closed_pnl","title":"get_closed_pnl","text":"get_closed_pnl(\n symbol,\n limit=200,\n since_datetime=None,\n until_datetime=None,\n)\n
Mufex API link to Get Closed Profit and Loss
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_filled_orders","title":"get_filled_orders","text":"get_filled_orders(\n symbol,\n limit=200,\n since_datetime=None,\n until_datetime=None,\n execType=None,\n order_id=None,\n)\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_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_open_orders","title":"get_open_orders","text":"get_open_orders(\n symbol,\n limit=50,\n order_id=None,\n custom_order_id=None,\n orderFilter=None,\n)\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_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_order_history","title":"get_order_history","text":"get_order_history(\n symbol,\n limit=50,\n order_id=None,\n custom_order_id=None,\n orderStatus=None,\n orderFilter=None,\n)\n
use link to see all Request Parameters
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_position_info","title":"get_position_info","text":"get_position_info(\n symbol=None,\n settleCoin=None,\n limit=50,\n)\n
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_risk_limit_info","title":"get_risk_limit_info","text":"get_risk_limit_info(\n symbol,\n category=\"linear\",\n)\n
Mufex API link to Get Risk Limit
Parameters:
Name Type Description Defaultsymbol
str
Symbol
requiredcategory
str
If category is not passed, then return \"\"For now, default:linear
'linear'
Returns:
Type Description_type_
description
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_symbol_trading_fee_rates","title":"get_symbol_trading_fee_rates","text":"get_symbol_trading_fee_rates(\n symbol=None,\n)\n
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.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 DefaultNone
required Returns:
Type Descriptionlist
symbols
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_trading_fee_rates","title":"get_trading_fee_rates","text":"get_trading_fee_rates(\n symbol=None,\n)\n
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.get_wallet_info","title":"get_wallet_info","text":"get_wallet_info(\n trading_with=None,\n)\n
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.set_leverage","title":"set_leverage","text":"set_leverage(\n symbol,\n leverage,\n)\n
No link yet
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.set_leverage_mode","title":"set_leverage_mode","text":"set_leverage_mode(\n symbol,\n leverage_mode,\n leverage=5,\n)\n
Cross/isolated mode. 0: cross margin mode; 1: isolated margin mode
"},{"location":"quantfreedom/exchanges/mufex_exchange/mufex/#quantfreedom.exchanges.mufex_exchange.mufex.Mufex.set_position_mode","title":"set_position_mode","text":"set_position_mode(\n position_mode,\n trading_with=None,\n symbol=None,\n)\n
"},{"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(\n candles,\n length,\n smoothing_type=rma_tv,\n)\n
Average true range smoothing from tradingview
Parameters:
Name Type Description Defaultcandles
array
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]
requiredlength
int
Number of bars
requiredsmoothing_type
Callable
function to process the smoothing of the atr
rma_tv
Returns:
Type Descriptionarray
atr
"},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.bb_tv","title":"bb_tv","text":"bb_tv(\n length,\n multi,\n source,\n basis_ma_type=sma_tv,\n)\n
Bollinger bands from tradingview
Parameters:
Name Type Description Defaultsource
array
Values to process
requiredlength
int
Number of bars
requiredmulti
float
Standard deviation factor
requiredbasis_ma_type
Callable
Function to process basic ma
sma_tv
Returns:
Type Descriptiontuple[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(\n candles,\n length,\n)\n
Donchain channels
Parameters:
Name Type Description Defaultcandles
array
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]
requiredlength
int
Number of bars of donchain lookback
requiredReturns:
Type Descriptiontuple[array, array, array]
upper, basis, lower
"},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.ema_tv","title":"ema_tv","text":"ema_tv(\n source,\n length,\n)\n
Exponential Moving average from tradingview
Parameters:
Name Type Description Defaultsource
array
Values to process
requiredlength
int
Number of bars
requiredReturns:
Type Descriptionarray
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(\n candles,\n lin_reg_length,\n smoothing_length,\n smoothing_type=sma_tv,\n)\n
Linear regression indicator
Parameters:
Name Type Description Defaultcandles
array
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]
requiredlin_reg_length
int
Number of bars for lin reg
requiredsmoothing_length
int
Number of bars for singal line
requiredsmoothing_type
Callable
function to process the smoothing of the singal line
sma_tv
Returns:
Type Descriptiontuple[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(\n source,\n fast_length,\n slow_length,\n signal_smoothing,\n oscillator_type=ema_tv,\n signal_ma_type=ema_tv,\n)\n
Moving average convergence divergence from tradingview
Parameters:
Name Type Description Defaultsource
array
Values to process
requiredfast_length
int
Number of bars
requiredslow_length
int
Number of bars
requiredsignal_smoothing
int
Number of bars
requiredoscillator_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(\n source,\n length,\n)\n
Relative strength index Moving average from tradingview
Parameters:
Name Type Description Defaultsource
array
Values to process
requiredlength
int
Number of bars
requiredReturns:
Type Descriptionarray
rma
"},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.rma_tv_2","title":"rma_tv_2","text":"rma_tv_2(\n source_1,\n source_2,\n length,\n)\n
Relative strength index Moving average from tradingview
Parameters:
Name Type Description Defaultsource_1
array
Values to process
requiredsource_2
array
Values to process
requiredlength
int
Number of bars
requiredReturns:
Type Descriptionarray
rma_1, rma_2
"},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.rsi_tv","title":"rsi_tv","text":"rsi_tv(\n length,\n source,\n)\n
Relative strength index
Parameters:
Name Type Description Defaultsource
array
Values to process
requiredlength
int
Number of bars
requiredReturns:
Type Descriptionarray
rsi
"},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.sma_tv","title":"sma_tv","text":"sma_tv(\n source,\n length,\n)\n
Simple Moving average from tradingview
Parameters:
Name Type Description Defaultsource
array
Values to process
requiredlength
int
Number of bars
requiredReturns:
Type Descriptionarray
sma
"},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.squeeze_momentum_lazybear_tv","title":"squeeze_momentum_lazybear_tv","text":"squeeze_momentum_lazybear_tv(\n candles,\n length_bb,\n length_kc,\n multi_bb,\n multi_kc,\n)\n
LazyBear Pinescript
Parameters:
Name Type Description Defaultcandles
array
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]
requiredlength_bb
int
Number of bars of Bollinger Bands
requiredlength_kc
int
Number of bars of KC
requiredmulti_bb
int
The multiplier by which the Bollinger Bands will get multiplied
requiredmulti_kc
int
The multiplier by which the KC will get multiplied
requiredReturns:
Type Descriptiontuple[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(\n source,\n length,\n)\n
Standard deviation from tradingview
Explainer Video
Parameters:
Name Type Description Defaultsource
array
Values to process
requiredlength
int
Number of bars
requiredReturns:
Type Descriptionarray
stdev
"},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.supertrend_tv","title":"supertrend_tv","text":"supertrend_tv(\n candles,\n atr_length,\n factor,\n)\n
Super Trend
Parameters:
Name Type Description Defaultcandles
array
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]
requiredatr_length
int
Number of bars
requiredfactor
int
The multiplier by which the ATR will get multiplied
requiredReturns:
Type Descriptiontuple[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(\n candles,\n)\n
True Range from tradingview
Parameters:
Name Type Description Defaultcandles
array
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]
requiredReturns:
Type Descriptionarray
true_range
"},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.vwap_tv","title":"vwap_tv","text":"vwap_tv(\n candles,\n)\n
Volume Weighted Average Price
Parameters:
Name Type Description Defaultcandles
array
2-dim np.array with columns in the following order [timestamp, open, high, low, close, volume]
requiredReturns:
Type Descriptionarray
vwap
"},{"location":"quantfreedom/indicators/tv_indicators/#quantfreedom.indicators.tv_indicators.wma_tv","title":"wma_tv","text":"wma_tv(\n source,\n length,\n)\n
Weighted Moving Average From Tradingview
Explainer Video
Parameters:
Name Type Description Defaultsource
array
Values to process
requiredlength
int
Number of bars
requiredReturns:
Type Descriptionarray
wma
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/","title":"nb_indicators","text":""},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators-functions","title":"Functions","text":""},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_atr_tv","title":"nb_atr_tv","text":"nb_atr_tv(\n candles,\n length,\n smoothing_type=nb_rma_tv,\n)\n
Average true range smoothing https://www.tradingview.com/pine-script-reference/v5/#fun_ta.atr
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_bb_tv","title":"nb_bb_tv","text":"nb_bb_tv(\n source,\n length,\n multi,\n basis_ma_type=nb_sma_tv,\n)\n
returns basis, upper, lower
Bollinger bands https://www.tradingview.com/pine-script-reference/v5/#fun_ta.bb
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_ema_tv","title":"nb_ema_tv","text":"nb_ema_tv(\n source,\n length,\n)\n
Exponential Moving average https://www.tradingview.com/pine-script-reference/v5/#fun_ta.ema
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_macd_tv","title":"nb_macd_tv","text":"nb_macd_tv(\n source,\n fast_length,\n slow_length,\n signal_smoothing,\n oscillator_type=nb_ema_tv,\n signal_ma_type=nb_ema_tv,\n)\n
return order = histogram, macd, signal Moving average convergence divergence https://www.tradingview.com/pine-script-reference/v5/#fun_ta.macd
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_rma_tv","title":"nb_rma_tv","text":"nb_rma_tv(\n source,\n length,\n)\n
Relative strength index Moving average https://www.tradingview.com/pine-script-reference/v5/#fun_ta.rma
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_rma_tv_2","title":"nb_rma_tv_2","text":"nb_rma_tv_2(\n source_1,\n source_2,\n length,\n)\n
Relative strength index Moving average https://www.tradingview.com/pine-script-reference/v5/#fun_ta.rma
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_rsi_tv","title":"nb_rsi_tv","text":"nb_rsi_tv(\n source,\n length,\n)\n
Relative strength index https://www.tradingview.com/pine-script-reference/v5/#fun_ta.rsi
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_sma_tv","title":"nb_sma_tv","text":"nb_sma_tv(\n source,\n length,\n)\n
Simple Moving average https://www.tradingview.com/pine-script-reference/v5/#fun_ta.sma
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_squeeze_momentum_lazybear_tv","title":"nb_squeeze_momentum_lazybear_tv","text":"nb_squeeze_momentum_lazybear_tv(\n candles,\n length_bb,\n length_kc,\n multi_bb,\n multi_kc,\n)\n
Returns = sqz_hist, sqz_on, no_sqz
https://www.tradingview.com/script/nqQ1DT5a-Squeeze-Momentum-Indicator-LazyBear/
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_stdev_tv","title":"nb_stdev_tv","text":"nb_stdev_tv(\n source,\n length,\n)\n
Standard deviation https://www.tradingview.com/pine-script-reference/v5/#fun_ta.stdev
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_supertrend_tv","title":"nb_supertrend_tv","text":"nb_supertrend_tv(\n candles,\n atr_length,\n factor,\n)\n
return super trend, direction Super Trend https://www.tradingview.com/pine-script-reference/v5/#fun_ta.supertrend
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_true_range_tv","title":"nb_true_range_tv","text":"nb_true_range_tv(\n candles,\n)\n
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_vwap_tv","title":"nb_vwap_tv","text":"nb_vwap_tv(\n candles,\n)\n
"},{"location":"quantfreedom/nb_funcs/nb_indicators/nb_indicators/#quantfreedom.nb_funcs.nb_indicators.nb_indicators.nb_wma_tv","title":"nb_wma_tv","text":"nb_wma_tv(\n source,\n length,\n)\n
Weighted Moving average https://www.tradingview.com/pine-script-reference/v5/#fun_ta.wma
"},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_increase_position/","title":"nb_increase_position","text":""},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_increase_position/#quantfreedom.nb_funcs.nb_order_handler.nb_increase_position-functions","title":"Functions","text":""},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_increase_position/#quantfreedom.nb_funcs.nb_order_handler.nb_increase_position.nb_c_pl_ra_ps","title":"nb_c_pl_ra_ps","text":"nb_c_pl_ra_ps(\n equity,\n logger,\n max_equity_risk_pct,\n possible_loss,\n risk_account_pct_size,\n total_trades,\n)\n
Possible loss risk account percent size
"},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_increase_position/#quantfreedom.nb_funcs.nb_order_handler.nb_increase_position.nb_c_too_b_s","title":"nb_c_too_b_s","text":"nb_c_too_b_s(\n entry_size_asset,\n logger,\n max_asset_size,\n min_asset_size,\n stringer,\n)\n
Check if the asset size is too big or too small
"},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_increase_position/#quantfreedom.nb_funcs.nb_order_handler.nb_increase_position.nb_c_total_trades","title":"nb_c_total_trades","text":"nb_c_total_trades(\n average_entry,\n logger,\n market_fee_pct,\n max_trades,\n position_size_asset,\n possible_loss,\n sl_price,\n stringer,\n total_trades,\n)\n
Checking the total trades
"},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_increase_position/#quantfreedom.nb_funcs.nb_order_handler.nb_increase_position.nb_min_asset_amount","title":"nb_min_asset_amount","text":"nb_min_asset_amount(\n acc_ex_other,\n logger,\n nb_entry_calc_np,\n nb_entry_calc_p,\n order_info,\n stringer,\n)\n
Setting your position size to the min amount the exchange will allow
"},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_increase_position/#quantfreedom.nb_funcs.nb_order_handler.nb_increase_position.nb_rpa_slbcb","title":"nb_rpa_slbcb","text":"nb_rpa_slbcb(\n acc_ex_other,\n logger,\n nb_entry_calc_np,\n nb_entry_calc_p,\n order_info,\n stringer,\n)\n
Risking percent of your account while also having your stop loss based open high low or close of a candle
"},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_stop_loss/","title":"nb_stop_loss","text":""},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_stop_loss/#quantfreedom.nb_funcs.nb_order_handler.nb_stop_loss-functions","title":"Functions","text":""},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_stop_loss/#quantfreedom.nb_funcs.nb_order_handler.nb_stop_loss.nb_check_move_sl_to_be","title":"nb_check_move_sl_to_be","text":"nb_check_move_sl_to_be(\n average_entry,\n can_move_sl_to_be,\n current_candle,\n logger,\n market_fee_pct,\n nb_move_sl_bool,\n nb_zero_or_entry_calc,\n price_tick_step,\n sl_price,\n sl_to_be_cb_type,\n sl_to_be_when_pct,\n stringer,\n)\n
Checking to see if we move the stop loss to break even
"},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_stop_loss/#quantfreedom.nb_funcs.nb_order_handler.nb_stop_loss.nb_check_move_tsl","title":"nb_check_move_tsl","text":"nb_check_move_tsl(\n average_entry,\n current_candle,\n logger,\n nb_move_sl_bool,\n nb_sl_price_calc,\n price_tick_step,\n sl_price,\n stringer,\n trail_sl_bcb_type,\n trail_sl_by_pct,\n trail_sl_when_pct,\n)\n
Checking to see if we move the trailing stop loss
"},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_stop_loss/#quantfreedom.nb_funcs.nb_order_handler.nb_stop_loss.nb_cm_sl_to_be_pass","title":"nb_cm_sl_to_be_pass","text":"nb_cm_sl_to_be_pass(\n average_entry,\n can_move_sl_to_be,\n current_candle,\n logger,\n market_fee_pct,\n nb_move_sl_bool,\n nb_zero_or_entry_calc,\n price_tick_step,\n sl_price,\n sl_to_be_cb_type,\n sl_to_be_when_pct,\n stringer,\n)\n
Long stop loss to break even pass
"},{"location":"quantfreedom/nb_funcs/nb_order_handler/nb_stop_loss/#quantfreedom.nb_funcs.nb_order_handler.nb_stop_loss.nb_sl_based_on_candle_body","title":"nb_sl_based_on_candle_body","text":"nb_sl_based_on_candle_body(\n bar_index,\n candles,\n logger,\n nb_sl_bcb_price_getter,\n nb_sl_price_calc,\n price_tick_step,\n sl_based_on_add_pct,\n sl_based_on_lookback,\n sl_bcb_type,\n stringer,\n)\n
Long Stop Loss Based on Candle Body Calculator
"},{"location":"quantfreedom/nb_funcs/nb_simulate/nb_sim_base/","title":"nb_sim_base","text":""},{"location":"quantfreedom/nb_funcs/nb_simulate/nb_sim_base/#quantfreedom.nb_funcs.nb_simulate.nb_sim_base-classes","title":"Classes","text":""},{"location":"quantfreedom/nb_funcs/nb_simulate/nb_sim_base/#quantfreedom.nb_funcs.nb_simulate.nb_sim_base-functions","title":"Functions","text":""},{"location":"quantfreedom/nb_funcs/nb_simulate/nb_sim_df/","title":"nb_sim_df","text":""},{"location":"quantfreedom/nb_funcs/nb_simulate/nb_sim_df/#quantfreedom.nb_funcs.nb_simulate.nb_sim_df-classes","title":"Classes","text":""},{"location":"quantfreedom/nb_funcs/nb_strategies/nb_strategy/","title":"nb_strategy","text":""},{"location":"quantfreedom/nb_funcs/nb_strategies/nb_strategy/#quantfreedom.nb_funcs.nb_strategies.nb_strategy-functions","title":"Functions","text":""},{"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__(\n asset_tick_step,\n increase_position_type,\n long_short,\n market_fee_pct,\n max_asset_size,\n min_asset_size,\n price_tick_step,\n sl_strategy_type,\n)\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 Defaultasset_tick_step
float
asset_tick_step
requiredincrease_position_type
IncreasePositionType
How you want to process increasing your position
requiredlong_short
str
long or short
requiredmarket_fee_pct
float
market_fee_pct
requiredmax_asset_size
float
max_asset_size
requiredmin_asset_size
float
min_asset_size
requiredprice_tick_step
float
price_tick_step
requiredsl_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(\n equity,\n possible_loss,\n total_trades,\n)\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 Defaultequity
float
equity
requiredpossible_loss
float
possible_loss
requiredtotal_trades
int
total_trades
requiredReturns:
Type Description(int, int)
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(\n entry_size_asset,\n)\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 Defaultentry_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(\n average_entry,\n possible_loss,\n position_size_asset,\n sl_price,\n total_trades,\n)\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 Defaultaverage_entry
float
average_entry
requiredpossible_loss
float
possible_loss
requiredposition_size_asset
float
position_size_asset
requiredsl_price
float
sl_price
requiredtotal_trades
int
total_trades
requiredReturns:
Type Descriptiontuple[int, int]
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(\n entry_price,\n possible_loss,\n sl_price,\n)\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 Defaultentry_price
float
entry_price
requiredpossible_loss
float
possible_loss
requiredsl_price
float
sl_price
requiredReturns:
Type Descriptionfloat
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(\n average_entry,\n entry_price,\n position_size_usd,\n possible_loss,\n sl_price,\n)\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 Defaultaverage_entry
float
average_entry
requiredentry_price
float
entry_price
requiredposition_size_usd
float
position_size_usd
requiredpossible_loss
float
possible_loss
requiredsl_price
float
sl_price
requiredReturns:
Type Descriptionfloat
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(\n entry_price,\n sl_price,\n)\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 Defaultentry_price
float
entry_price
requiredsl_price
float
sl_price
requiredReturns:
Type Descriptiontuple[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, 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(\n average_entry,\n entry_price,\n position_size_asset,\n position_size_usd,\n possible_loss,\n sl_price,\n total_trades,\n)\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 Defaultaverage_entry
float
average_entry
requiredentry_price
float
entry_price
requiredposition_size_asset
float
position_size_asset
requiredposition_size_usd
float
position_size_usd
requiredpossible_loss
float
possible_loss
requiredsl_price
float
sl_price
requiredtotal_trades
int
total_trades
requiredReturns:
Type Descriptiontuple[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, 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(\n average_entry,\n entry_price,\n equity,\n position_size_asset,\n position_size_usd,\n possible_loss,\n sl_price,\n total_trades,\n)\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 Defaultaverage_entry
float
average_entry
requiredentry_price
float
entry_price
requiredequity
float
equity
requiredposition_size_asset
float
position_size_asset
requiredposition_size_usd
float
position_size_usd
requiredpossible_loss
float
possible_loss
requiredsl_price
float
sl_price
requiredtotal_trades
int
total_trades
requiredReturns:
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, 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(\n equity,\n average_entry,\n entry_price,\n position_size_asset,\n position_size_usd,\n possible_loss,\n sl_price,\n total_trades,\n)\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 Defaultaverage_entry
float
average_entry
requiredentry_price
float
entry_price
requiredequity
float
equity
requiredposition_size_asset
float
position_size_asset
requiredposition_size_usd
float
position_size_usd
requiredpossible_loss
float
possible_loss
requiredsl_price
float
sl_price
requiredtotal_trades
int
total_trades
requiredReturns:
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, 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(\n equity,\n entry_price,\n sl_price,\n)\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 Defaultequity
float
equity
requiredentry_price
float
entry_price
requiredsl_price
float
sl_price
requiredReturns:
Type Descriptiontuple[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, 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(\n average_entry,\n entry_price,\n equity,\n position_size_asset,\n position_size_usd,\n possible_loss,\n sl_price,\n total_trades,\n)\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 Defaultaverage_entry
float
average_entry
requiredentry_price
float
entry_price
requiredequity
float
equity
requiredposition_size_asset
float
position_size_asset
requiredposition_size_usd
float
position_size_usd
requiredpossible_loss
float
possible_loss
requiredsl_price
float
sl_price
requiredtotal_trades
int
total_trades
requiredReturns:
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, 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(\n possible_loss,\n sl_price,\n entry_price,\n)\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 Defaultentry_price
float
entry_price
requiredpossible_loss
float
possible_loss
requiredsl_price
float
sl_price
requiredReturns:
Type Descriptionfloat
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(\n average_entry,\n entry_price,\n position_size_usd,\n possible_loss,\n sl_price,\n)\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 Defaultaverage_entry
float
average_entry
requiredentry_price
float
entry_price
requiredposition_size_usd
float
position_size_usd
requiredpossible_loss
float
possible_loss
requiredsl_price
float
sl_price
requiredReturns:
Type Descriptionfloat
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(\n average_entry,\n can_move_sl_to_be,\n current_candle,\n sl_price,\n)\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(\n average_entry,\n current_candle,\n sl_price,\n)\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(\n bar_index,\n candles,\n)\n
Long Stop Loss Based on Candle Body Calculator
"}]} \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index c85651d1..fa340011 100755 Binary files a/sitemap.xml.gz and b/sitemap.xml.gz differ