Algo Trading. How to view profit Fyers?

 Profit Update


def profitUpdate():

    data = {"symbols":strikeName.get()}

    trailStarted=False

    trailTarget=0

    trailLoss=0

    while(True):

        if(stopThread==True):

            stopThread==False

            break

        out=fyers.quotes(data)

        ltp=out["d"][0]["v"]["lp"]

        profitEarned=(ltp-float(avgPrice.get()))*int(filledQty.get())

        profit.delete(0,"end")

        profit.insert(0,profitEarned) 




Comments

Popular posts from this blog

Create Option Chain using PYTHON.

How to Place Order in Zerodha using Python

How to place order in zerodha when RSI crosses below 30? Algo Trading Python