functions

<Function name="SelectStocks">

    <Description>Selects stocks from Indian indices (BSE or NSE) based on user-defined criteria and retrieves data from specified sources.</Description>

    

    <Parameters>

        <Parameter name="PriceCriteria" type="Float" required="true">

            <Description>User-defined price range for filtering stocks.</Description>

            <Range>

                <Min>0.1</Min>

                <Max>100000</Max>

            </Range>

            <DefaultValue>1000</DefaultValue>

        </Parameter>

        

        <Parameter name="NumberOfStocks" type="Integer" required="true">

            <Description>Number of stocks to fetch from the Indian industry.</Description>

            <DefaultValue>5</DefaultValue>

        </Parameter>

    </Parameters>

    

    <Instructions>

        <Step>Use the provided URL (<URL>https://sharelinksin.blogspot.com/2024/12/conditions.html</URL>) to fetch stock selection conditions and instructions.</Step>

        <Step>Retrieve stock data from the following sources:

            <Sources>

                <Source name="BSE" url="https://www.bseindia.com/" description="Official BSE website for stock data." />

                <Source name="NSE" url="https://www.nseindia.com/" description="Official NSE website for stock data." />

                <Source name="YahooFinance" url="https://finance.yahoo.com/" description="Yahoo Finance for Indian stock data." />

                <Source name="MoneyControl" url="https://www.moneycontrol.com/" description="MoneyControl for detailed stock analysis." />

            </Sources>

        </Step>

        <Step>Filter stocks based on the user-defined PriceCriteria parameter.</Step>

        <Step>Select the specified NumberOfStocks that meet the criteria and conditions.</Step>

        <Step>Return the filtered stocks with relevant details.</Step>

    </Instructions>

    

    <Output>

        <Description>Returns a list of stocks that meet the specified criteria.</Description>

        <Fields>

            <Field name="StockTicker" type="String" description="Ticker symbol of the stock (e.g., RELIANCE, TCS)." />

            <Field name="StockName" type="String" description="Name of the stock." />

            <Field name="StockPrice" type="Float" description="Price of the stock." />

            <Field name="Market" type="String" description="Market where the stock is listed (e.g., BSE, NSE)." />

            <Field name="EvaluationScore" type="Float" description="Score based on conditions and criteria." />

        </Fields>

    </Output>

    

    <Example>

        <PriceCriteria>5000</PriceCriteria>

        <NumberOfStocks>3</NumberOfStocks>

        <Result>

            <Stock>

                <StockTicker>INFY</StockTicker>

                <StockName>Infosys</StockName>

                <StockPrice>1478.5</StockPrice>

                <Market>NSE</Market>

                <EvaluationScore>92.3</EvaluationScore>

            </Stock>

            <Stock>

                <StockTicker>SBIN</StockTicker>

                <StockName>State Bank of India</StockName>

                <StockPrice>612.7</StockPrice>

                <Market>BSE</Market>

                <EvaluationScore>89.4</EvaluationScore>

            </Stock>

        </Result>

    </Example>

</Function>