Questions tagged [trading]

The act of buying and selling financial instruments, such as money markets spot instruments, stocks, bonds, commodities, virtual currencies, indices, futures, options, CFD-s and other derivatives, performed on a for-profit basis.

Trading in general and speculative trading are a form of participation in a process of mutually beneficial exchange.

Speculative trading is a knowingly speculative, for-profit, participation in a multi-layer scene of sell-side and buy-side market participants ( liquidity providers ), brokerage entities / mediators, market regulators ( where territorially applicable and legally enforced ) and retail traders.

Markets typically offer trading in both Buy ( a.k.a. Long ) and Sell ( Short ) contract positions for various financial instruments such as:

  • money markets spot contracts,
  • ETF contracts,
  • virtual currencies,
  • stocks,
  • bonds,
  • commodities,
  • indices,
  • futures,
  • options,
  • options on index,
  • non-deliverable swaps,
  • CFD-s and other derivatives.
1444 questions
5
votes
4 answers

What grid distributed computing frameworks are currently favoured for trading systems

There seems to a quite a few grid computing frameworks out there, but which ones are actually being used to any great extent by the investment banks for purposes of low latency distributing calculation? I'd be interested to hear answers covering…
Rich
  • 4,572
  • 3
  • 25
  • 31
5
votes
2 answers

Error Getting the EUR.USD Historical data using R on Ibrokers

I am using the IBrokers package and twsInstrument and for some reason it gives me an error using the simplest of methods. require("IBrokers") require("twsInstrument") tws <- ConnectIB() past.data<-reqHistoricalData(tws,getContract("EUR.USD")) gives…
Kyle Balkissoon
  • 348
  • 1
  • 3
  • 13
4
votes
3 answers

How to remove duplicated buy signal

I'm testing my stock trading logic and I made a position column to check the buying / selling signal df = pd.DataFrame({'position': [1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1.0, 1.0, 0.0, -1.0, -1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0]}) I…
4
votes
0 answers

How to create an custom entry/exit signal in VectorBT?

thanks for reading! I'm trying to backtest a strategy that I wrote in Pinescrpt, and I struggle to create my entry conditions. So this is the code import numpy as np import pandas as pd import vectorbt as vbt from datetime import datetime from…
4
votes
1 answer

Finding previous trading day in pandas is very slow

I have this df data1_txt = """ date 7/8/2021 7/6/2021 6/29/2021 """ I need to get the previous trading day. I manage to do it with pandas_market_calendars python package. Here is my whole code import io import pandas_market_calendars as mcal from…
Bogdan Titomir
  • 335
  • 1
  • 6
4
votes
1 answer

Tradinview api: automaticly add users to private Indicator

I was wondering if Tradingview offers an API call to manage users and give rights to private indicator scripts? I would like to publish an Indicator as "invite-only": I would like to setup a Link on my Website, where users can add there Username,…
4
votes
7 answers

Binance API: APIError(code=-1111): Precision is over the maximum defined for this asset. || Python

I have a trading bot which operates in 'ADAUSDT' with dynamic quantities for buying and selling, being my whole USDT balance the initial quantity, and trading with that same balance + profits or losses (it basically trades and keeps trading with the…
4
votes
2 answers

CCXT okex5 swap contracts - Parameter posSide error

I am trying to create a perpetual limit order using ccxt on okex exchange version 5. The API is successfully placing orders(both limit and market) on spot exchange but not on perpetual exchange. Here is what I am trying - exchange_swap =…
4
votes
2 answers

Binance WebSocket Order Book - depths change every time

Below is a python script that subscribes order book information via Biance's Websocket API (Documentation Here). In both requests(btcusdt@depth and btcusdt@depth@100ms), each json payload is streamed with a varying depth. Please shed light on what…
koyamashinji
  • 535
  • 1
  • 6
  • 19
4
votes
1 answer

Binance Paper Trading Api?

Can anyone recommend a Binance that has an API and supports Paper trading? I am currently experimenting with Binance webhooks and would like to test some strategies without risking real money. Binance unfortunately does not support paper trading...
Ranga Upul
  • 49
  • 1
  • 2
4
votes
1 answer

Creating shape or marks in custom indicator, (tradingview charting library (pinejs))

is there any way to create shape or create marks on chart in custom indicator using tradingview charting library. I am using this way to create custom indicators. Thanks in advance.
4
votes
1 answer

How can I plot my historical trades/executions in Tradingview the same way as in Ninjatrader?

I'd like to know if we can draw past trades using a script. I basically want to access my history of executions and draw lines at the price where I did them, to have a clear picture of my winning and losing trades. Is that possible in pine? For…
Daniel
  • 41
  • 3
4
votes
1 answer

Trouble with my strategy buying but not selling in pine editor

I am using pine editor to make a strategy that buys when the D line which is the green line crosses under 17.5 and then sells when the D line crosses over 78. As you can see from the chart I have posted it should buy and sell a couple times but only…
ColtonMSU
  • 41
  • 6
4
votes
1 answer

Scale in buying positions in Amibroker backtesting

I have a simple backtesting code in Amibroker. It looks something like this; Buy = BuySignal(); Sell = SellSignal(); My equity is $10000. This code works but the limitation is that when it buys, the entire equity $10000 is sunk into the buy. What…
user3848207
  • 3,737
  • 17
  • 59
  • 104
4
votes
1 answer

How to resample OHLCV data into 5-min?

I have this set of data 2016-08-09 12:39:00,536.7841,536.7849,536.6141,536.7849,0.656 2016-08-09 12:40:00,536.6749,536.6749,536.6749,536.6749,0.2642 2016-08-09 12:41:00,535.84,535.84,535.615,535.615,0.348 2016-08-09…
hopieman
  • 399
  • 7
  • 22