Money Management to ensure account doesn’t get overdrawn

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #162366 quote
    gashiru
    Participant
    New

    All,

    very new to auto trading, appreciate this might be a very basic ask. However, While AutoTrading, how do I write a piece of code that checks my account balance before placing an order?

     

    Something like:

    If contract is less than account balance:

    buy

    #162368 quote
    Vonasi
    Moderator
    Master

    You can’t. The amount of money in your brokers account is not data that they pass over to the PRT platform.

    You can do some basic calculations in your strategy using the STRATEGYPROFIT instruction and deduct/add it to a starting capital amount to simulate this but it is not accurate because brokers fees are also data that is not passed to the PRT platform and so the effect of these is not known.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Money Management to ensure account doesn’t get overdrawn


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
gashiru @gashiru Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Vonasi
5 years ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 02/22/2021
Status: Active
Attachments: No files
Logo Logo
Loading...