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
Auxiliator is telegram bot for basic web-application analysis

Auxiliator Auxiliator is telegram bot for basic web-application analysis What for? Sometimes there is no access to your main PC, where you can scan we

Revoltage 13 Dec 26, 2021
Template to create a telegram bot in python

Template for Telegram Bot Template to create a telegram bot in python. How to Run Set your telegram bot token as environment variable TELEGRAM_BOT_TOK

PyTopia 10 Mar 07, 2022
This bot automaticaly access to giveaway ! You can won free NFT !

This bot automaticaly access to giveaway ! You can won free NFT !

2s.py 28 Oct 20, 2022
Volt is yet another discord api wrapper for Python. It supports python 3.8 +

Volt Volt is yet another discord api wrapper for Python. It supports python 3.8 + How to install [Currently Not Supported.] pip install volt.py Speed

Minjun Kim (Lapis0875) 11 Nov 21, 2022
A powerfull Zee5 Downloader Bot With Permeneant Thumbnail Support 💯 With Love From NexonHex

Zᴇᴇ5 DL A ᴘᴏᴡᴇʀғᴜʟʟ Zᴇᴇ5 Dᴏᴡɴʟᴏᴀᴅᴇʀ Bᴏᴛ Wɪᴛʜ Pᴇʀᴍᴇɴᴇᴀɴᴛ Tʜᴜᴍʙɴᴀɪʟ Sᴜᴘᴘᴏʀᴛ 💯 Wɪᴛʜ Lᴏᴠᴇ Fʀᴏᴍ NᴇxᴏɴHᴇx Wʜᴀᴛ Cᴀɴ I Dᴏ ? • ɪ ᴄᴀɴ Uᴘʟᴏᴀᴅ ᴀs ғɪʟᴇ/ᴠɪᴅᴇᴏ ғʀᴏᴍ

Psycharmers 4 Jan 19, 2022
A self-bot for discord, written in Python, which will send you notifications to your desktop if it detects an intruder on your discord server

A self-bot for discord, written in Python, which will send you notifications to your desktop if it detects an intruder on your discord server

LevPrav 1 Jan 11, 2022
A Python script that wraps the gitleaks tool to enable scanning of multiple repositories in parallel

mpgitleaks A Python script that wraps the gitleaks tool to enable scanning of multiple repositories in parallel. The motivation behind writing this sc

Emilio Reyes 7 Dec 29, 2022
Tubee is a web application, which runs actions when your subscribed channel upload new videos

Tubee is a web application, which runs actions when your subscribed channel upload new videos, think of it as a better IFTTT but built specifically for YouTube with many enhancements.

Tomy Hsieh 11 Jan 01, 2023
Credit Card And SK Checker Written In Python

Credit Card And SK Checker Written In Python

Rimuru Tempest 57 Jan 08, 2023
A simple Discord bot written in Python

Acolyte A small and simple little Discord bot written in Python that utilizes the discord.py library. Dependencies The bot depends on Python 3.9 and u

0 Jul 17, 2021
A simple bot to upload file to various cloud servers.

Cloudsy Bot A simple bot to upload file to various cloud servers. Variables API_HASH Your API Hash from my.telegram.org API_ID Your API ID from my.tel

Flying Santas 8 Oct 31, 2022
CryptoApp - Python code to pull wallet balances from a variety of different chains through nothing other than your public key.

CryptoApp - Python code to pull wallet balances from a variety of different chains through nothing other than your public key.

Zach Frank 4 Dec 13, 2022
a harbinger of events or things.

Herald: Intrusion Detection System using IR and ML Herald - noun; a harbinger of events or things. Overview Herald is an intrusion detection system us

Muhammad Muzzammil 4 Jun 07, 2021
Web app for spotify playlist management with last.fm integration

Music Tools Set of utility tools for Spotify and Last.fm. Built on my other libraries for Spotify (spotframework), Last.fm (fmframework) and interfaci

andy 3 Dec 14, 2022
VideocompBot - This is TG Video Compress BoT. Prouduct By BINARY Tech 💫

VideocompBot - This is TG Video Compress BoT. Prouduct By BINARY Tech 💫

1 Jan 04, 2022
Get random jokes bapack2 from jokes-bapack2-api

Random Jokes Bapack2 Get random jokes bapack2 from jokes-bapack2-api Requirements Python Requests HTTP library How to Run py random-jokes-bapack2.py T

Miftah Afina 1 Nov 18, 2021
Asynchronous python aria2 mirror bot Telegram.

aioaria2-mirror-bot A Bot for Telegram made with Python using Pyrogram library. It needs Python 3.9 or newer to run. THIS BOT IS INTENDED TO BE USED O

Adek 85 Jan 03, 2023
Matrix trivia bot with python

Matrix-trivia-bot Getting started See SETUP.md for how to setup and run the template project. Project structure A reference of each file included in t

1 Nov 16, 2021
veez music bot is a telegram music bot project, allow you to play music on voice chat group telegram.

🎶 Veez Music Bot Music bot for playing music on telegram voice chat group. Requirements 📝 FFmpeg NodeJS nodesource.com Python 3.7+ PyTgCalls 🧪 Get

levina 143 Jun 19, 2022
Skautský discord bot

Jáchym 🤖 Open-source skautský discord bot postavený na discord.py O čem? • Funkce • TODO • Poděkování ❓ O čem? Jáchym vznikl jako projekt do odborky

10 May 12, 2022