• Overview
  • Reviews
  • Comments

IR Calc

Only for the Brazilian tributary system.

Is in English due to market rules.

The popularization of Automated Trading Systems brings a universe of new possibilities that are accompanied by need for care and control. This Utility Script calculates the income tax from operations history of the Platform. Follow the didactic description.


Important

  • The bills are saved in the Data Folder "...\MQL5\Files\";
  • The application is used for operations on Stock and Futures Exchange BM&FBOVESPA;
  • It is an excellent option to check promotional brokerage package of orders;
  • Essential to monitor the brokerage charging;
  • For scalper, day, swing and position.


Method

The Script carry out Federal Revenue's recommendation to use average prices. Average purchase and sale prices are calculated for all days of each asset. Thus normal operations, symmetrical day-trade and asymmetrical can be count in the same day.

Operation Calculation Simultaneous
Normal Yes Yes
Symmetrical day-trade Yes Yes
Asymmetrical day-trade Yes Yes
  • Symmetrical day-trade: In and out has same volume, e.g. -400 PETR4 +400 PETR4;
  • Asymmetrical day-trade: In and out has different volumes, e.g. -3500 PETR4 +5500 PETR4 -2000 PETR4.


Input parameters

  • Year of the first bill: Sets the year of the first bill;
  • Month of the first bill: Sets the month of the first bill;
  • Year of the last bill: Sets the year of the last bill;
  • Month of the last bill: Sets the month of the last bill;
  • Brokerage charge: Brokerage charge to execute a order;
  • ISS+PIS+COFINS: Portion referring to the sum of the ISS, PIS and COFINS taxes.
  • Others (Maintenance of custody account and About custody amount): Portion with respect to other costs of the Escrow Agent;
  • Emoluments Normal: Portion of emoluments for normal operations;
  • Emoluments Day-Trade: Portion of emoluments for day-trade operations;
  • Liquidation Normal: Portion of liquidation for normal operations;
  • Liquidation Day-Trade: Portion of liquidation for day-trade operations;
  • IRRF Normal: Portion of IRRF tax for normal operations;
  • IRRF Day-Trade: Portion of IRRF tax for day-trade operations;
  • Values to compensate Normal: Manual insertion of values, costs or losses, to be compensated against normal operations;
  • Values to compensate Day-Trade: Manual insertion of values, costs or losses, to be compensated against day-trade operations;
  • IRRF to compensate Normal: Manual insertion of IRRF tax to be compensated against normal operations;
  • IRRF to compensate Day-Trade: Manual insertion of IRRF tax to be compensated against day-trade operations;
  • Unique Symbol (for different quotas): For tax calculation of a single symbol when the portions are not equal to all.

Note: ISS, PIS, COFINS and IRRF are proper names of taxes.


Limitation

For papers with different portions each one must be calculate separately through the parameter Unique Symbol (for different quotas).


Results

The result displayed in the images is for the preconfigured values of the portions, with the compensation of R$ 1,000.00 and R$ 500.00 of values, costs or losses, and of R$ 10.00 and R$ 5.00 of IRRF tax in normal operations and day-trade respectively.


Author

Lucas Ramos is an Engineer graduated from the Universidade do Brasil.

The surfer should not be shy. Questions in tab next.

No reviews