PTV is a useful widget for trading view for doing paper trading when bar reply is enabled

Overview

Alt text

GitHub GitHub contributors GitHub repo size GitHub top language

PTV (paper-trading-view)

paper_trading_view is project written for simulate trade in Demo it use trading view when bar reply is enable.
as you know trading view doesn't have paper trading on bar reply and we prepare it for you in this project, PTV provide you a demo account for upgrade your skill in trading

Why?

this feature does not exist in TradingView . you can use it for train , backtest youre strategies

How It Works

howwork

Quick installation (for windows users)

1- Download project

you can easily download executable version of this project from this Link

2- make sure you installed chrome browser on your device . go to tradingview.com and login into your account .

3- Extract .rar file and Run ptv.exe

Quick installation tutorial video

Notice: Every time you want to run ptv.exe make sure chrome is closed before.

Features

  • Based on Python 3.7+: For botting on any operating system - Windows, macOS and Linux.
  • work with TradingView: For bar reply and getting price we use trading view.
  • Limit/Market orders: you can place a Limit or Market order in 2 side "long", "Short" .
  • SL/TP set: you can set stop loss and take profit for your market or limit order .
  • see Open orders: you can see list of open orders.
  • see Open positions: you can see list of open positions.
  • see trade history: you can see list of trade history.
  • Next/Play/Pause in bar reply: you can use this items in PTV and when price is changing open positions and open orders will be check.
  • initial setting: you can set your initial money / commission.
  • profit/loss of account: your total profit / loss calculate when your position close.
  • save report: you can save your trade history in a csv file.

Requirements

  • Python 3.7+ (install it from website)
  • Chrome driver (Download it from website)
  • selenium ,tkinter

Getting start

make sure you installed python3.7+

# you can clone project from github
git clone https://github.com/xibalbas/paper_trading_view.git
cd paper_trading_view/src

# or
# you can download project zip file and extract 
https://github.com/xibalbas/paper_trading_view/archive/refs/heads/master.zip
cd paper_trading_view-master/src

make an enviorment

pip install virtualenv
python -m venv venv

# Linux Users
source venv/bin/activate

# Windows Users
.\venv\Scripts\activate.bat

install requirements packages

pip install -r requirements.txt

Run

python app.py

Contributing

Contributions are very welcome. There are a number of requirements:

  • See Issues tab, and feel free to submit your own issues
  • Add PRs if you discover a solution to an existing issue
  • The code should be Pep8 compliant.
  • Comments are required for every class and function and they should be a clear description.
  • At least one broad test case and a set of unit tests must be provided for every function.
  • Avoid very pythonic construction

License

PTV is freely available under the MIT license.

Comments
  • demo installation

    demo installation

    hello could you post a demo video on how to install things properly for those of us not familiar with coding and python usage the idea of your application is brilliant ive been searching ages for such pretty sure it is worth some money only thing i struggle with is to run it on python as i constantly get message of wrong sintaxis when copypasting or im doing it totally wrong

    question 
    opened by tehluny 2
  • it is not running in my windows 11 64 bit

    it is not running in my windows 11 64 bit

    Traceback (most recent call last): File "app.py", line 38, in File "selenium\webdriver\chrome\webdriver.py", line 76, in init File "selenium\webdriver\remote\webdriver.py", line 157, in init File "selenium\webdriver\remote\webdriver.py", line 252, in start_session File "selenium\webdriver\remote\webdriver.py", line 321, in execute File "selenium\webdriver\remote\errorhandler.py", line 242, in check_response selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 97 Current browser version is 103.0.5060.114 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "app.py", line 56, in RuntimeError: input(): lost sys.stdin

    opened by ArianKhadem 1
  • Trade instantly closes and loses on opening of trade

    Trade instantly closes and loses on opening of trade

    Sometimes when you open a trade it will instantly close itself as a loss ( or sometimes a profit). In this case it was a limit order. Note that price has not reached SL or even the price in the chart. image

    bug 
    opened by Ramblingjack 1
  • user data directory is already in use

    user data directory is already in use

    Traceback (most recent call last):
      File "[app.py]()", line 38, in <module>
      File "selenium\webdriver\chrome\[webdriver.py]()", line 76, in _init_
      File "selenium\webdriver\remote\[webdriver.py]()", line 157, in _init_
      File "selenium\webdriver\remote\[webdriver.py]()", line 252, in start_session
      File "selenium\webdriver\remote\[webdriver.py]()", line 321, in execute
      File "selenium\webdriver\remote\[errorhandler.py]()", line 242, in check_response
    selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir
    
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "[app.py]()", line 56, in <module>
    RuntimeError: input(): lost sys.stdin
    
    bug enhancement 
    opened by xibalbas 4
  • BTCUSD bug

    BTCUSD bug

    Hey xibalbas, i will be making many issues, not because i dislike this program but because i love it so i hope you don't mind.

    There is an issue where the program will use BTCUSD instead of the chart that is default (EURUSD for me)

    question 
    opened by Ramblingjack 3
Releases(v1.0.1)
Owner
Ali Moradi
working on Algo trading , cryptocurrency , Django
Ali Moradi
:electric_plug: Generating short urls with python has never been easier

pyshorteners A simple URL shortening API wrapper Python library. Installing pip install pyshorteners Documentation https://pyshorteners.readthedocs.i

Ellison 351 Jan 03, 2023
Enigma simulator with python and clean code.

Enigma simulator with python and clean code.

Mohammad Dori 3 Jul 21, 2022
Make your Pass (sanitaire) Fun Again

Make Your Pass (Sanitaire) Fun Again Customize your Pass Sanitaire (French name for EU digital Covide19 Certificate) with colors and images, thus make

101 Dec 01, 2022
Official python API for Phish.AI public and private API to detect zero-day phishing websites

phish-ai-api Summary Official python API for Phish.AI public and private API to detect zero-day phishing websites How it Works (TLDR) Essentially we h

Phish.AI 168 May 17, 2022
Plugin for Sentry which allows sending notification via Telegram messenger.

Sentry Telegram Plugin for Sentry which allows sending notification via Telegram messenger. Presented plugin tested with Sentry from 8.9 to 9.1.1. DIS

Shmele 208 Dec 30, 2022
Azure Neural Speech Service TTS

Written in Python using the Azure Speech SDK. App.py provides an easy way to create an Text-To-Speech request to Azure Speech and download the wav file.

Rodney 1 Oct 11, 2021
A python oriented telegram with API of yobit.net

YoBit-BTC A python oriented telegram bot with API of https://yobit.net/ Developed By @riz4d What is Yobit? ➪ YoBit is a cryptocurrency exchange that w

Muhammed Rizad 6 Apr 02, 2022
The wrapper you need for the osu!api v2

oppy (op.py) oppy is the wrapper for use on the osu! v2 API. Version 1.0.0 Installation To install please use pip to install oppy pip install op.py To

Wayde 2 May 01, 2022
MusicBot is the original Discord music bot written for Python 3.5+, using the discord.py library

The original MusicBot for Discord (formerly SexualRhinoceros/MusicBot)

Just Some Bots 2.9k Jan 02, 2023
Source code from thenewboston Discord Bot with Python tutorial series.

Project Setup Follow the steps below to set up the project on your environment. Local Development Create a virtual environment with Python 3.7 or high

Bucky Roberts 24 Aug 19, 2022
IdeasBot - Funny telegram bot to generate ideas for a project

Repository of PIdeas_bot About Funny telegram bot for generating projects ideas.

Just Koala 5 Oct 16, 2022
A collection of scripts to steal BTC from Lightning Network enabled custodial services. Only for educational purpose! Share your findings only when design flaws are fixed.

Lightning Network Fee Siphoning Attack LN-fee-siphoning is a collection of scripts to subtract BTC from Lightning Network enabled custodial services b

Reckless_Satoshi 14 Oct 15, 2022
Asad Alexa VC Bot Is A Telegram Bot Project That's Allow You To Play Audio And Video Music On Telegram Voice Chat Group.

Asad Alexa VC Bot Is A Telegram Bot Project That's Allow You To Play Audio And Video Music On Telegram Voice Chat Group.

Dr Asad Ali 6 Jun 20, 2022
Download apps and remove icloud

Download apps and remove icloud

52pojie 吾爱破解论坛 签到 支持云函数/服务器等Py3环境运行

52pojie-Checkin 52pojie 吾爱破解论坛 签到 Py3单程序 支持云函数/服务器等Py3环境运行 只需要Cookie即可运行 新版说明 依赖包请用项目 https://github.com/BlueSkyXN/requirements-serverless 需要填写的参数有 co

BlueSkyXN 22 Sep 15, 2022
Gnosis-py includes a set of libraries to work with Ethereum and Gnosis projects

Gnosis-py Gnosis-py includes a set of libraries to work with Ethereum and Gnosis projects: EthereumClient, a wrapper over Web3.py Web3 client includin

Gnosis 93 Dec 23, 2022
Telegram anime bot that uses Anilist API

Telegram Bot Repo Capable of fetching the following Info via Anilist API inspired from AniFluid and Nepgear Anime Airing Manga Character Scheduled Top

Lucky Jain 71 Jan 03, 2023
Dodo - A graphical, hackable email client based on notmuch

Dodo Dodo is a graphical email client written in Python/PyQt5, based on the comm

Aleks Kissinger 44 Nov 12, 2022
⚡ Yuriko Robot ⚡ - A Powerful, Smart And Simple Group Manager Written with AioGram , Pyrogram and Telethon

⚡ Yuriko Robot ⚡ - A Powerful, Smart And Simple Group Manager Written with AioGram , Pyrogram and Telethon

Øғғɪᴄɪᴀʟ Ⱡᴏɢ [₳ғᴋ] 1 Apr 01, 2022
Posts word definitions on Twitter daily

Word Of The Day bot Post daily word definitions on social media. Twitter account: https://twitter.com/WordOfTheDay_B Introduction The goal of this pro

Lucas Rijllart 1 Jan 08, 2022