Greetings Folks ,
I have a problem with this APP
I want that each time that Click on START button , I save those selected parameters in a new table or in a csv file that I can check each time in the sidebar (I wanted being updated of course each time I select my parameters and click On START button)
Also , I want that once I click that Start Button a new Line appears in the table that it was displayed (I have used plotly) but as you can see , it is poorly displayed and a new line is not added after selecting the parameters and click on the START button.
Thanks a lot for your help
To make it easy for you , here is the code :
import streamlit as st
import pandas as pd
import numpy as np
from datetime import datetime as dt
import plotly.graph_objects as go
coins_list = [âLTCâ,âETHâ,âBTCâ]
FIXED = 1e5
coin = st.selectbox(âSearch COINâ ,coins_list)
X1 = st.number_input(âSelect your X1â, min_value = 1e-5 , max_value = 999999999.999999 , step = 1e-5)
Y1 = st.number_input(âSelect your Y1â, min_value = 1e-5 , max_value = 999999999.999999 , step = 1e-5)
Z1 = st.number_input(âSelect your Quantityâ, min_value = 1e-5, max_value = 9999999999.9999 , step = 1e-5)
I want each time that I select these parameters to SAVE them in a new table (A time component wil be interesting maybe)
col1,col2,col3,col4,col5 = st.columns(5)
with col3 :
st.button(âSTARTâ) # I want that each time a press the START Button there is a line which is added with the coin selected previously
if coin :
# I want to the figure to be displayed correctly , taking all the width for example than I can adjust font and cells size by myself (please add them as arguments to try them out)
fig2 = go.Figure(data=[go.Table(
header=dict(values=['','','',['BOT - Status'],'',''],
fill_color = 'green',
line_color = 'green',
align = 'center',
font=dict(color='black', family="Lato", size=15)
),
cells = dict(values=[
["Name of the BOT (as per the coin pair selected)",coin],
["Status"],
["Start/Stop of BOT"],
["Purchased Price",],
["Current Price of the coin pair"],
["Completed Loop"],
["Comission Dedected"],
["Profit made"]],
line_color = 'darkslategray',
fill_color = 'white',
align = ['center'],
font=dict(color='black', family="Lato", size=15))
)]
)
fig2.update_layout(margin=dict(l=20, r=20, t=20, b=20),
width=1200,
height=300)
st.write(fig2)