Purchase a specific dollar value worth of a stock/equity

Forums ProRealTime English forum ProOrder support Purchase a specific dollar value worth of a stock/equity

Viewing 3 posts - 1 through 3 (of 3 total)
  • #238923

    Hey all,

     

    Is it possible to code an algo to purchase a specific $$ amount of a stock, vs hardcoding the number of shares?

    eg if a stock is trading at $500 and to want to purchase $2000 worth of it, the number of stocks would be 4. if a stock was trading at $250, it would be 8 shares.

    #238926
    JS

    Hi,

    You can use the following:

    If BuyConditions then

    Buy 2000 Cash

    EndIf

    2 users thanked author for this post.
    #238937

    Great, thanks 🙂

Viewing 3 posts - 1 through 3 (of 3 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login