PTMC 的程式開發 (2) 新增一個交易策略
大家好，本篇要教大家如何新增一個交易策略到 PTMC 上。
開啟 AlgoStudio 後，我們可以在 View 選單當中選擇我們自己習慣的介面語言。
4. 點擊建立之後，我們會看到許多密密麻麻的程式碼，首先會看一個以專案名稱為名的 class，這個 class 包含了以下函式：
5. 將相關的函式編寫完成之後，就可以到「執行」選單中選擇「編譯」，編譯成功後，即可在 文件 >> ProtraderMC >> My scripts >> bin >> strategies 資料中，產生這個交易系統的 .dll 檔。
6. 到 PTMC 的「工具」選單，選擇「交易系統集」，會出現一個新的視窗。點擊左上角的加號，即可看到我們剛才產生的交易系統。
7. 在右邊的面板可以看到剛剛在 base 函式下的資訊，也可以讓我們選擇我們要使用的帳戶、商品、線型等等
Visual Studio 版本：
1. 開啟 Visual Studio 後，選擇「檔案」 >> 「新增」 >> 「專案」 >> 「AlgoStudio」 >> 「Strategy」
3. 專案預設的程式碼中，上面的是會用到 namespace，下面才是程式的主體，classname 就是此專案的名稱，裡面也已經預設好四個函式：base、Init、OnQuote、Complete
4. 在 base 函式中可以看到一個 Initialization 的區塊，旁邊有個 "+"， 點開之後可以編輯這個專案的一些基本文字訊息，像是作者、公司、附註等等。
5. 編輯完各函式的參數之後，打開「建置」選單 >> 「建置方案」，下側面板就會顯示建置訊息。
6. 建置成功之後，到右側的「方案總管」面板當中，在我們剛剛的方案上點擊右鍵 >> 選擇「屬性」 >> 「建置」 >> 會顯示方案的「輸出位置」
7. 將該資料夾中產生的 .dll 檔複製到 PTMC 預設的資料夾當中。
8. 回到 PTMC 當中，開啟「工具」選單 >> 「交易系統集」 >> 點擊左上 "+" ，即可開啟方才新增的交易系統。
Referral Program Agreement
Referral Program Agreement (henceforth referred to as “the Agreement”, “Referral Agreement”) is made between PTMC (henceforth referred to as “the Company”) and Referral Partner (henceforth referred to as “Referral Partner” or “the Partner”).
Terms and conditions of the present Agreement are binding for the Company and for the Referral Partner.
The Agreement contains all the terms and conditions that shall regulate relations between the Company and the Referral Partner.
The Agreement shall enter into effect as soon as the Referral Partner registers on the PTMC official website and shall remain valid until the termination of the Agreement.
Please note that the Company reserves the right to revise, modify, change or remove clauses of the Agreement at any time at its sole discretion. Please check periodically terms and conditions of this Agreement on the Company website.
The Company reserves the right to reject the registration of any entity or person in the PTMC Referral program including the case if such entity is a person suspected of fraudulent activities фе its sole discretion.
1. General Terms
1.1. The Company and the Referral Partner agree and accept the obligations under the Agreement.
1.2. The Referral Partner undertakes rights and obligations set forth hereinafter. The Referral Partner agrees to acquire users to the Company acting in his name.
1.3. The Referral Partner acknowledges that all the users acquired to the Company are the Clients of the Company.
1.4. The Agreement is written in English language. The Company may provide the Сlient with the translation of the Agreement into the needed language on demand. English version of this Agreement is to be of prior importance. The translation may be provided only for the convenience of the Сlient.
1.5. To become an Referral Partner a user must:
1.5.1. Register on the Company website PROTRADER.ORG.
1.5.2. After the registration on the PTMC official website the Referral Partner receives an individual unique referral link which is available in user profile.
1.6. The Company has the right to request confirmation of any information provided by the Referral Partner during the registration.
1.6.1. When the information provided by the Referral Partner during the registration is changing, the Referral Partner should inform the Company about such modifications and request the Company to update the data.
1.7. After the Referral Partner accepts terms and conditions of the Agreement, he/she has the right to:
1.7.1. Conduct advertising campaigns in the interest of the Company.
1.7.2. Introduce marketing and advertising campaigns with the aim to acquire new Clients to the Company, provided that such events are legal in the country where they are conducted.
1.7.3. Provide the Clients with the necessary information about the Company, including the Company contact information, as well as general conditions of the services provided.
1.7.4. The Referral Partner has the right to use promotional materials provided by the Company representatives, they are: banners, text links, landing pages etc. The Referral Partner may use banners with the Company logo provided by PTMC and/or his personal referral link.
2. Rights and obligations of the Referral Partner
2.1. By registering on the official PTMC website the Referral Partner confirms that he/she accepts all the terms and conditions set out in the present Agreement. The Referral Partner acknowledges the fact that the Company has a right to modify the terms and conditions of the Agreement unilaterally.
2.2. The Referral Partner agrees to acquire new Clients to the Company under the present terms and conditions set by the Company.
2.3. The Referral Partner accepts terms and conditions regarding funds withdrawal and commissions charged that are specified in the Client Agreement.
2.4. It is prohibited to the Referral Partner to use any fraudulent methods, such as threatening, blackmailing etc. to attract new Clients to the Company.
2.5. The Referral Partner is obliged to get acquainted with the services provided by the Company on his own and inform the Clients he/she has acquired/is going to acquire about important changes in time.
2.6. The Referral Partner is obliged to warn the Client about the risks of currency trading on the foreign exchange market.
2.7. The Referral Partner is obliged to solve the problems the Client may face with while trading on the foreign exchange market. In case if the Referral Partner does not achieve to solve the above mentioned problems on his own, the Referral Partner is obliged to contact the Company and represent the necessary details.
2.8. The Referral Partner shall not give any recommendations or advice to the Client related to trading operations on the market. The Company shall not be responsible for the consequences of such recommendations and advice
2.9. The Referral Partner is not permitted to conduct trading operations on the account of the Client he has acquired.
2.10. It is prohibited to the Referral Partner to get referral revenue from his own accounts and those owned by his close relatives in case if the partner is an individual; as well as from private accounts of founders or accounts of their close relatives in case if the partner is a legal entity.
2.11. In case it is detected that the Referral Partner uses documents of the third parties with the aim to get referral revenue, the Company has the right to block all such accounts including personal account of this Referral Partner without any right of further renewal.
2.12. The Referral Partner shall not disclose the information received from the Company during the collaboration period and the data the containing in the Agreement to any third parties.
2.13. It is forbidden to the Referral Partner to use the following types of advertisement:
2.13.1. Advertisement on websites that contradict the laws of the country where the Referral Partner is located.
2.13.2. Advertisement on websites content of which is contrary to current legislation, morality, public order, good faith or is defamatory, aggressive, obscene, offensive, violent or incites violence, racist or xenophobic, or in general which is illegal or violates a person's rights and/or physical and/or moral integrity.
2.13.3. Spam mailing.
2.13.4. Advertisement with the false information contained.
2.13.5. Any other advertising that may affect credibility or reputation of the Company or any other dishonest marketing methods.
2.14. It is prohibited to the Referral Partner to organize monetary relations with the Clients (including receiving money, payment or banking cards, etc.).
2.15. The Referral Partner certifies and agrees that he shall act in accordance with all the applicable Anti-Money Laundering laws.
2.16. The Referral Partner is obliged to inform the Client of the need to protect security and confidentiality of account and login information and of the necessity not to disclose such information to any third parties. The Company shall not be responsible for the unauthorized use of the Client account information by any third parties.
2.17. The Referral Partner shall be responsible for the accuracy of the Client registration form and the authenticity of the data provided by the Client.
2.18. The Referral Partner allows the Company to use contact information provided during the registration, such as email address and other information specified in order to send the letters and proposals.
2.19. The Referral Partner agrees that the Company may unilaterally terminate and change terms and conditions of the Agreement without any explanations.
2.20. The Referral Partner is not entitled to: publish any negative comments (essays, letters) concerning the Company in any newspapers, magazines or other periodicals, blogs, Internet forums or other web-resources that may affect credibility or reputation of the Company. If the Referral Partner uses his own web-resource in order to attract clients to the Company, the content of the web-resource regarding the Company shall be approved by the Company.
2.21. If the Company detects that the Referral Partner has been involved in activities described in clause 2.20 of the Agreement, the Company is entitled to reject the Referral Partner request for funds withdrawal and to block his account, as well as inform the regulatory authorities of the jurisdiction of the Referral Partner.
2.22. It is prohibited to the Referral Partner to use PTMC brands in any way or manner whatsoever, including but not limited to the words “PTMC” spelled in any possible way (including with typos, spaces, signs, symbols or in any other way). Such forbidden use of the PTMC brands includes the use of such words/trademarks in the referral advertisements or in any part therewith, in the displayed URL and/or in the destination URL.
2.23. The Referral Partner shall only deal with third parties as a client of the Company. The Referral Partner shall not use the Company name, Company logo, etc. anywhere, including promotional materials, letterhead and business cards, advertisements and publications without the Company’s prior consent, with the exception of the case described in clause 1.8.4. of the Agreement.
2.24. The Referral Partner shall respect the confidentiality of the Company business and it is prohibited to him/her to disclose any confidential information or any information concerned the Company business for five years after termination or cancellation of the Agreement.
2.25. The Referral Partner guarantees the precise performance of the above mentioned obligations.
3. Rights and obligations of the acquired Clients
3.1. A user shall be considered as acquired by the Referral Partner after it is registered on the official PTMC website by following the unique link of the Referral Partner.
3.2. A client shall be considered as the acquired by the Referral Partner under the condition that the Client has not be previously registered as the client of the Company.
3.3. The Referral Partner shall not be entitled to refer his close relatives in case if the Referral Partner is an individual; or close relatives of the founders in case if the Referral Partner is a legal entity. The Referral Partner shall not be entitled to refer his own accounts.
3.4. Account owned by the Referral Partner and those owned by his close relatives if the partner is an individual, as well as private accounts of founders or accounts of their close relatives if the partner is a legal entity shall not be considered as those that the Referral Partner has acquired.
3.5. Accounts detected to be registered by the Referral Partner himself in order to get money through dishonest means shall not be considered as those that the Referral Partner has acquired. In case if such violation of the terms and conditions is detected the Company is entitled to terminate the Agreement and to block the Referral Partner account.
3.6. The Referral Partner himself, his relatives or any other affiliated parties shall not be considered as the Clients acquired by the Referral Partner. In case if any data of the Referral Partner coincides with the data provided by any acquired Client (such as ID data, address, telephone number, email address, IP address, etc.), such Client shall not be considered as the acquired one and shall be removed from the Referral Partner list. In such a case the referral revenue credited for this Client will not be paid.
3.7. Should the IP address of the Client be the same as that of the Referral Partner then they shall be considered affiliated and the referral revenue credited for this Client will not be paid.
4. Rights and obligations of the Company
4.1. In case if the Referral Partner fails to perform any obligations under the Agreement, the Company is entitled to terminate this Agreement.
4.2. The Company reserves the right to take legal actions against the Referral Partner in case the Referral Partner attempts to manipulate the Company and/or the Company proprietary trading platform and/or abuse the Referral Program. The Company reserves the right to withhold and/or deduct from any payment to the Referral Partner in the event of such manipulation and/or abuse.
4.3. The Company reserves the right under its sole discretion to reject the registration of any entity or person to the Referral Partner, including the case if such entity is involved in fraudulent activities.
4.4. If the Referral Partner appears to belong to one of the categories described in clause 4.3 the Company is entitled to terminate the Agreement and to block the Referral Partner account.
4.5. If any activity conducted by the Referral Partner is contrary to international law, morality, public order, good faith etc., the Company has a right to terminate the Agreement and to block the Referral Partner account.
4.6. The Company shall pay referral revenue to the Referral Partners after the Company receives payments for the software license paid by the acquired Clients.
4.7. The Company shall provide the software paid by the acquired user after the fact the payment has been carried out.
4.8. The Company shall enable Clients to conduct trading operations using PTMC software by providing them with logins and passwords to the trading terminal.
4.9. The Company maintains records of all trading operations made by the Clients.
4.10. In case if the Referral Partner fails to perform any obligations under the present Agreement, the Company has a right to exclude Clients from his list of the Clients acquired by him/her.
4.11. The Company is responsible for calculations of the referral revenue. In case if the Referral Partner wishes to check the calculations, the Referral Partner may request his Clients to provide the necessary statements. The Company shall not provide Referral Partners with the payment statements of the Clients.
4.12. The Company agrees to pay referral revenue to the Referral Partner in accordance with Appendix 1 of the present Agreement.
4.13. The Company determines method of the referral revenue calculation at its sole discretion.
4.14. In case if revenue is charged for the allegedly fraudulent accounts the Company reserves the right to cancel the revenues from such accounts and exclude such Referral Partners from the Referral Program.
4.15. Neither Party hereof shall be held liable for the complete or partial failure to fulfill its obligations in case if this failure results from Acts of God (including but not limited to fire, earthquake and other natural disasters, war or other military operations, blockades, government regulations and other extraordinary and unavoidable circumstances beyond either Party’s control).
4.16. Under the above mentioned circumstances the Party that fails to fulfill its obligations is obliged to inform the other Party through written notification within five business days from the moment of their onset and cessation.
Appendix 1. Referral revenue calculation
The Company shall pay the Referral Partner percentage in the amount from 10% up to 30% from the software license payments carried out by the Clients acquired by the Referral Partner.
The equivalent of the above mentioned referral revenue is calculated immediately as soon as the acquired client pays for the software and displayed in the user profile of the Client on the official PTMC website.
The Company shall pay the Referral Partner a certain percentage from 10% to 30% from the software license payments. This percentage is determined by the total number of the Clients acquired to the Company by the Referral Partner. The percentage is calculated according to the table attached below.
Crediting of the referral revenue shall be made on a monthly basis and shall be calculated within the first 10 days of each calendar month.
Any other payments are possible only in case if the Company and the Referral Partner agreed it in an amendment agreement.
|Total number of the attracted users*||Referral revenue percentage|
|1 – 9 users||10,00%|
|10 – 99 users||20,00%|
|100 + users||30,00%|