61 questions
1
vote
3
answers
72
views
Candles high lower than next candles close
Learning Pine Script, I wonder why this simple code doesn't do the job. I wan't to mark every candle with a lower high than next candles close. Here is my code:
condition = high < close[1]
...
0
votes
0
answers
36
views
Missing Last candlestick of 5 minutes using pyspark
I am working on crypto data
I have fetched 1 minute kline data from binance exchange using RUST and send to kafka(redpanda)
topic name "WS_Binance_Data_ALL"
consuming "...
0
votes
0
answers
13
views
Fitted Line (through midpoints of 30 min candle sticks)
I am trying to draw a fitted (horizontal) line through the midpoints of the 30 min candlestick BODIES within the Regular Trading Hours, so this will be 13x 30 min Candles. Therefore, the horizontal ...
0
votes
1
answer
142
views
Echarts candle sticks are too short
I'm using echarts-for-react to display a candle stick chart and sometimes when the interval is too small. I'm getting candle sticks that are too small. I try to set the yAxis min and max value but it ...
0
votes
0
answers
88
views
candle pair count pine script trading view
`why pair counter in my code not working
pine script v5
Example:
GGGG RR should be count as 1 Pair
the if it again happen say GG RRRR then that should be (previous pair+1)
Candle body should be more ...
1
vote
2
answers
306
views
How to continuously save locally big data from tick-by-tick streaming without overloading the RAM?
I want to save locally all the tick-by-tick data from a broker without overloading the RAM. The streaming starts on Sunday and ends the first hours of Saturday. Anytime during the week I want to be ...
1
vote
0
answers
99
views
Missing rows in a continuous aggregate timescaledb table
I have a tick table in timescaledb as follows from which I create a materialized view for 1-minute OHLC bars with its corresponding refresh policy. However, my tick_1min table does not end up having ...
0
votes
0
answers
65
views
Highlight candlesticks in Apexchart
I have a candlestick chart inside an Angular Component that asynchrounously should highlight the border of a specific candlestick... I'm using apexchart 3.40.0 and ng-apexchart 1.7.4...In my mind, I'd ...
0
votes
1
answer
695
views
Convert one minute candle data to five minute candle with C#
I have open, low, close, high, volume and dateTime of one minute candle, I want to convert that one minute candle to five minute candle
My initial thought about converting one minute candle data to ...
0
votes
1
answer
46
views
How to move calculations so only the calcs within a set amount of bars are used
I have two scripts I'm trying to implement this on. I'll use the simple one for the example here. In this example I'm trying to count the number of red candles and the number of green candles within ...
0
votes
1
answer
185
views
I have tick bid/ask data, how can I make candle data from tick's in clickhouse?
I have tick bid/ask data, with columns
symbol
timestamp
ask_amount
ask_price
bid_price
bid_amount
what kind of query in clickhouse can tick data for equal candles with a length of 1 minute? How can I ...
0
votes
1
answer
211
views
Pine Script - Last bar with low value specified
I've been working on an indicator in Pine Script that involves identifying the last candle (closest to the current time) with a low value specified by the user. However, I'm encountering a challenge ...
1
vote
1
answer
210
views
pinescript for not yet closed candle, not yet closed candle should be invisib
Can you please share the pinescript for tradingview which should hide the current moving candle, I mean the not yet closed candle should be invisible, once closed it should be visible
//@version=4
//...
0
votes
1
answer
146
views
Amcharts 5 stock chart - how to color candles based on position string uploaded in data
Attempting to color stock candles based on "inTrade" string included in data. Three states "Long", "Short", "None". Began working with Amcharts 5 "Stock ...
0
votes
1
answer
233
views
Is it possible to plot a shape, on the chart candle, using an indicator script, like found for a 'strategy' scripts?
I would like to know the exact entry and exit prices for the 'alertconditions' I know this can be done for a 'strategy script, but I can't get it to work for an 'indicator'.
the code below doesn't ...
0
votes
1
answer
2k
views
How to access prev row values on select in Polars Dataframe? Heikin-Ashi candle calculation
I have DF = { open: [], high:[], low:[], close[] )
and formula to aggregate current DF:
# OPEN = (Open_n-1 + Close_n-1) / 2.0
# HIGH = Max(High_n, Open_n, Close_n)
# LOW = Min(Low_n, Open_n, Close_n)
#...
-2
votes
1
answer
64
views
Code for background plot between candles and Ma [closed]
I wonder if someone has a piece of pinescript code that plot the Background between the candles and the (pink) 200 SlowMa.
I was looking to do a background plot as the attached picture is showing.
...
0
votes
1
answer
383
views
Problem with a simple indicator that indicates a positive/negative candle
My goal was to create a simple indicator that places a marker above or below the candle, depending on whether the candle is negative or positive. Positive candle = candle that closes above 50%. A ...
0
votes
1
answer
584
views
Using pinescript 5 how can I mark the 3:45am candle, preferably with a shape ontop or beneath like a diamond or star something?
I just want to know how I can mark a candle that opened on a specific time.
For example:
We have a 3:45am candle that's marked with a diamond.
Appreciate the help :)
I have tried on my own and tried ...
0
votes
1
answer
214
views
Pinescript: Plot A Shape whenever candlestick that fulfills condition A crosses candlestick that fulfills condition B (within a lookback period)
Apologies if the below sounds elementary but basically I would like to plot a shape/signal whenever candlestick that fulfills condition A cross under candlestick that fulfills condition B (within a ...
0
votes
1
answer
66
views
How to code a period using multiple candles above a certain level
I am trying to figure out how to catch a bounce with specific zones. Looking at how I would code when price is above a zone for a certain period (but this period would be based on number of ...
0
votes
0
answers
193
views
backtrader shows same time for all candles
This is my code:
data15 = bt.feeds.GenericCSVData(dataname='BTCUSDT-15m-2022-01-01.csv',
dtformat=lambda x: datetime.utcfromtimestamp(int(x)/1000))
from csvgeneric.py:
dt = datetime.strptime(dtfield, ...
1
vote
2
answers
1k
views
Converter bid/ask to OHLC formula
I can get bid and ask data from my market data provider but I want to convert this in OHLC values.
What is the good calculation using bid/ask? I saw in a post that for a specific period:
Open = (first ...
1
vote
1
answer
2k
views
creating multiple candlestick charts on same page with plotly
I'm creating a script that takes stock data from csv (name of the stock , start date , end date) and create a candlestick chart , then add some lines to analyse it all with plotly
example in this ...
0
votes
1
answer
489
views
How to always display crosshair at last series in the Candlestick ApexCharts
I want the crosshair always display at the last series in the Candlestick chart without using the mouse hover. How to do that?
This is my expect:
0
votes
2
answers
143
views
Gnuplot candlesticks next to each other in line graph
I am making a comparison of different algorithms with dependence on the properties of the datasets, and I am watching the execution time. Because there might exist multiple observations for one value ...
4
votes
2
answers
2k
views
Plotly Candlestick updated and shown dynamically in a loop
I would like to dynamically update a Candlestick chart from plotly:
import time
import plotly.graph_objects as go
while True:
candle_df = candle_handler.get_dataframe()
candlestick = go....
1
vote
0
answers
258
views
how can i plot harmonic pattern using plotly in candlestick series?
how can i plot harmonic pattern using plotly in candlestick series like the image below?
The pattern has 5 or points to get connected fully
fig = go.Figure(data=[go.Candlestick(x=df.index,
...
2
votes
1
answer
4k
views
Getting multiple cryptos' ohlc values in ccxt or binance python api?
I'm trying to create an automated bot according to my strategy but I'm struggling with a few things:
1- In ccxt, I can get OHLC data of a specified symbol. But I couldn't find any data on both ...
0
votes
1
answer
383
views
Pinescript Do not enter if the length of green candles(high - low) before entering is more than certain length without security
I don't want to enter the same situation like image.
CandleSize = abs(high-low)
Length = CandleSize < 30
I want to make code to satisfy the condition that applicable only green candle before ...
0
votes
1
answer
682
views
pinescript v4 Do not enter if there are six green candles before entering the position
I'd like to make a code that won't entering the position in a situation like in the picture.
greenCandle = barstate.isconfirmed and (close > open)
sixGreenCandles = greenCandle[6] and ...
0
votes
1
answer
1k
views
How can I create 1 minute candles for trading pairs in Python?
I'm trying to figure out how to create a 1 minute candlestick for trading pair BTC-USD using the binance package in Python.
So far I can get this down:
from binance.client import Client
candles = ...
-1
votes
1
answer
64
views
how to get last time of values in array object nodejs
I have an array objects of market ticks with the following values:
candles['AUDIOUSDT'] = [
{
t: 1649936820000,
o: 41044.99,
c: 41052.21,
h: 41063.84,
l: ...
1
vote
1
answer
1k
views
How to add fibonacci retracement in interactive plots (plotly)
how to add different color hlines in go.figure add_hline() function
previous pyplot function hlines had colors section for adding different colors for pyplot how could i do the same ?
# highest_swing ...
0
votes
2
answers
2k
views
Trend line continuation
I have 2 trends lines, that is generate automatically with candlestick date (high, low, close, open). When this is generated I store the trend line values. When I load this data I need that the lines ...
1
vote
1
answer
696
views
Apexcharts: mixed chart candlestick + area chart (fill area between 2 data points )
I use ApexCharts js for make mixed chart. Candlesticks + on this candlestick I need placed area chart from start date to end date (range, for example between 1.4 to 1.5 ).
For candlestick series i use
...
1
vote
0
answers
77
views
Strategy = Multiple confirmations for alert
I'm pretty much a beginner at coding but am trying to create an indicator with multiple confirmations and alerts but have come across a few issues.
My strategy is to use adx crossunders ,higher volume ...
2
votes
1
answer
984
views
Trading veiw Lightweight graph set timescale at one hour
I am currently using lightweight chart for my candlestick graph but i am facing an issue . How can i set my data in candle stick.
My data.
"data": [
{
"open": "1.18384&...
0
votes
0
answers
107
views
How to save to png candlestick chart with different additional indicators?
My code is:
fig = make_subplots(rows = 1, cols = 1, shared_xaxes = True, subplot_titles =
(currency_name+' '+timeframe), vertical_spacing = 0.1, row_width = [0.6])
# ----------------
# Candlestick ...
0
votes
1
answer
2k
views
How do I get historical candlestick data or kline from Phemex Public API?
I need to be able to extract historical candlestick data (such as Open, Close, High, Low, and Volume) of a candlestick in differing intervals (1m, 3m, 5m, 1H, etc.) at a specified time (timestamps) ...
0
votes
1
answer
65
views
Using function on the whole list of XTS objects
I'm trying to analyze candlestick formation Marubozu in R. So far I was able to download the different stocks data and find the formation using "Candlesticks" library in one stock data. I ...
0
votes
1
answer
1k
views
How to find the value of a single candle x bar before in Pine Script
Which function schould I use to find higher high and lower low values of a single candle?
For example 30 candles before, exactly -30. Candle informations and plot them?
Thanks in advice
2
votes
1
answer
334
views
candlestick chart with javascript
Am trying to design a candlestick chart with java script,but have an error,can any one help me?
and my error is:
Uncaught Error: "candlestick" is not a chart type.
I was watching a video ...
1
vote
1
answer
346
views
Syncrhonize timescale db to work with custom intervals
I am willing to collect candle price stock data on specific time intervals using timescaledb continous aggregations, such as 37 minutes and my intervals will start every day at 00:00.
So for example, ...
2
votes
2
answers
1k
views
Charting OHLC candle with SMA 200 using mplfinance plot function
I'm using mplfinance plot function to draw OHLC candlestick chart of a symbol. OHLC data is of 2 min timeframe. Also, I'm plotting sma 20 period and sma 200 period on the same chart. Because of sma200,...
0
votes
1
answer
3k
views
How I can draw automatic boxes on specific Candles in Pine Script?
I'm trying to program an indicator that show the resistant area
the resistant area should be box ( triangle )
the main idea that the indicator detect the highest red candles with upper tale more that ...
0
votes
0
answers
342
views
How to draw custom views on top and bottom of the candle in candlestick chart
I am using the iOS Charts library for the candlestick chart, I not able to find any way to draw custom views that is a triangle as shown in the image library.
I want to show the triangle(view) on the ...
0
votes
1
answer
2k
views
Why ta-lib's RSI output differs based on the input array size while the period is always 14?
I'm using talib-binding for node in my project to calculate RSI based on Binance's websocket candlestick feed.
I would like to sync my RSI output as much as I can with what Binance's RSI indicator ...
0
votes
1
answer
990
views
talib abstact API vs talib
Why talib.abstract does not cover all functions on talib? examples would be 'CDL3BLACKCROWS' which is available in talib but not in talib.abstract.
talib API/talib.abstract, would not supposed to ...
0
votes
1
answer
470
views
R Shiny App HighCharter OHLC/Candlesticks default zoom period
I am using highcharter library for a shiny app to make candlesticks chart of an XTS. Code in server.R to generate the chart is given below (sry, this code is not reproducible) By default the chart ...