-
Introduction
Forex Calculator is a website widget that helps calculate Forex orders.
The plugin includes there different calculators:
Margin
Swaps
Profit & Loss
The plugin is available for PandaTS customers who use the Mobile app and WebTrader.
-
Plug-in Installation
To implement the Forex Calculator plug-in, add the following <script> tag just before the closing </body> tag,
And put yourBrandName (As given by the panda team) in the brandSlug attribute, as shown in the following example:<script src="https://wm.pandats.com/pts-forex-calculator/pts-forex-calculator.js" brandslug="yourBrandName"></script>
-
DOM Integration
To integrate the Forex Calculator plug-in, add one of the following <div> tags to your page.
The script will find all <div> tags with "pts-forex-calculator" class and deploy a Calculator in each one of them.
The type of Calculator should be specified in another class as shown in the following example:<div class="pts-forex-calculator" data-type="margin"></div>
<div class="pts-forex-calculator" data-type="swaps"></div>
<div class="pts-forex-calculator" data-type="profit-and-loss"></div>
<div class="pts-forex-calculator" data-type="margin,swaps,profit-and-loss"></div>
-
Custom Icons
It is easily possible to use a custom icon design for any asset shown by the Ticker, in just three steps:
Step one:
Download this file and find the pts-assets-override folder, then add it to the root of your website repository.
Inside pts-assets-override folder, you should see the assets folder and the custom-assets-index.json file as shown in the following example:Step two:
Add override-path attribute to the Forex Calculator <script> tag, with the path to the pts-assets-override folder location (Relative to the root folder) as shown in the following example:<script src="https://wm.pandats.com/pts-forex-calculator/pts-forex-calculator.js" brandslug="yourBrandName" override-path="/pts-assets-ticker"></script>
Step three:
Add your custom icon file to the assets folder, and also to custom-assets-index.json as shown in the following example:The custom asset file should have the same name as the asset name (displayed), in small letters