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
Trust-minimized Bitcoin wallet

coldcore Trust-minimized, airgapped Bitcoin management This is experimental software. Wait for a formal release before use with real funds. A trust-mi

James O'Beirne 121 Jan 01, 2023
Dashboard to monitor the performance of your Binance Futures account

futuresboard A python based scraper and dashboard to monitor the performance of your Binance Futures account. Note: A local sqlite3 database config/fu

86 Dec 29, 2022
Simple Bot With Python 3.8+ For Converstaion Your Media

Media-Conversation Simple Bot With Python 3.8+ For Converstaion Your Media

Farzin 2 Dec 06, 2021
A tool written in Python used to instalock agents in VALORANT using the local API.

Valorant Instalock Tool v2.1.0 by Mr. SOSA A tool written in Python used to instalock agents in VALORANT using the local API. This is NOT a hotkey pro

Mr. SOSA 3 Nov 18, 2021
Catware - A powerful grabber with a built in bot control system

catware A powerful grabber with a built in bot control system PLEASE NOTE THAT I

4 Feb 04, 2022
A simple discord bot based on python

A simple discord bot based on python

SENPAI LEGEND 2 Jul 24, 2022
Telegram Bot to store Posts and Documents and it can Access by Special Links.

File-sharing-Bot Telegram Bot to store Posts and Documents and it can Access by Special Links. I Guess This Will Be Usefull For Many People..... 😇 .

Code X Botz 1.2k Jan 08, 2023
AUDD IS MUSIC RECOGNITION API

AUDD IS MUSIC RECOGNITION API

Abdimk 1 Dec 15, 2021
Quickly visualize docker networks with graphviz.

Docker Network Graph Visualize the relationship between Docker networks and containers as a neat graphviz graph. Example Usage usage: docker-net-graph

Leo Verto 43 Dec 12, 2022
Python 3 SDK/Wrapper for Huobi Crypto Exchange Api

This packages intents to be an idiomatic PythonApi wrapper for https://www.huobi.com/ Huobi Api Doc: https://huobiapi.github.io/docs Showcase TODO Con

3 Jul 28, 2022
An elegant mirai-api-http v2 Python SDK.

Ariadne 一个适用于 mirai-api-http v2 的 Python SDK。 本项目适用于 mirai-api-http 2.0 以上版本。 目前仍处于开发阶段,内部接口可能会有较大的变化。 安装 poetry add graia-ariadne 或 pip install graia

Graia Project 259 Jan 02, 2023
THERE IS AN IMPOSTER AMONG US. VOTE HIM OUT BEFORE HE [ R E D A C T E D ].

🛡️ Guardian There is an impostor among us. Can you help us find out who it is? ⚙️ Installation and Usage Make sure to install Tesseract-OCR before ru

Catus Magnus 1 Jan 06, 2022
OpenEmu Discord Rich Presence provided with Python!

A simple application that provides your current OpenEmu game as an RPC state in Discord via PyPresence. How to use Unzip and open the latest x86_64 ve

Deltaion Lee 6 May 30, 2022
A Recommendation System For Diabetes Detection And Treatment

Diabetes-detection-tg-bot A Recommendation System For Diabetes Detection And Treatment Данная система помогает определить наличие или отсутствие сахар

Alexander Kanonirov 1 Nov 22, 2021
Console XMPP client in python

poezio Homepage: https://poez.io Forge Page: https://lab.louiz.org/poezio/poezio Poezio is a console Jabber/XMPP client. The initial goal was to provi

48 Dec 19, 2022
This is a walkthrough about understanding the #BoF machine present in the #OSCP exam.

Buffer Overflow methodology Introduction These are 7 simple python scripts and a methodology to ease (not automate !) the exploitation. Each script ta

3isenHeiM 53 Dec 08, 2022
Source code for "Efficient Training of BERT by Progressively Stacking"

Introduction This repository is the code to reproduce the result of Efficient Training of BERT by Progressively Stacking. The code is based on Fairseq

Gong Linyuan 101 Dec 02, 2022
Example of a discord bot in Python

discordbot.py Example of a discord bot in Python Requirements Python 3.8 or higher Discord Bot Setting Up Clone this repo or download the files Rename

Debert Jamie 1 Oct 23, 2021
The Official Twilio SendGrid Led, Community Driven Python API Library

The default branch name for this repository has been changed to main as of 07/27/2020. This library allows you to quickly and easily use the SendGrid

Twilio SendGrid 1.4k Jan 07, 2023
Python wrapper for CoWin API's

Cowin Tracker Python API wrapper for CoWin, India's digital platform launched by the government to help citizens register themselves for the vaccinati

Saiprasad Balasubramanian 43 Jun 11, 2022