Log in or register to download unlimited Forex robots!
AIS1 Trading Robot
The instruction is given bellow..
AIS1 Trading Robot: Instruction
Issue date: 14.02.2009
Issue number: 1
Content
1. Introduction
2. Basic information
3. Trading strategy description
4. Trading strategy adjustment
5. Risk management adjustment
6. Trailing-stop stepping
7. Conclusion
1. Introduction
1.1. AIS1 Trading Robot: Instruction refers to original code http://codebase.mql4.com/5260.
1.2. AIS1 Trading Robot is intended for EURUSD trading symbol.
2. Basic information
2.1. The program contents 10 data elements with predefined values that are intended for changes:
2.1.1. 5 constants, lines 16-21;
2.1.2. 5 variables, lines 28-32.
2.2. Constant "acs.Symbol" defines only permitted trading symbol.
2.3. In case of necessity it is possible to assign another value, for example, "EURUSDm".
2.4. Constant "aci.OrderID" defines "magic number" for "OrderSend ()" function, see lines 219-220.
2.5. In case of necessity it is possible to assign another value, for example, "1".
2.6. Constant "acd.TrailStepping" defines step of trailing-stop in spreads, see line 118.
2.7. In case of necessity it is possible to assign another value, for example, "2".
2.8. Constants "aci.Index.1" and "aci.Index.2" define working timeframes, see lines 98 and 99.
2.9. Value "aci.Index.1 = 7" selects daily timeframe D1 in array "aci.Timeframe", see line 22.
2.10. Value "aci.Index.2 = 6" selects 4-hour timeframe H4 in array "aci.Timeframe", see line 22.
2.11. Built-in trading strategy "A System: EURUSD Daily Metrics" uses only D1 and H4 timeframes.
2.12. Constants "acs.Symbol", "aci.Index.1" and "aci.Index.2" are key elements of the trading strategy.
2.13. The robot's behaviour with another values of those constants requires additional study.
2.14. Variable "aed.AccountReserve" means deposit reserve for possible losses.
2.15. Deposit reserve size determines limit of deposit relative drawdon, see line 50.
2.16. Deposit reserve defends capital value from market risk.
2.17. Automatic deposit reserve control is in lines 77-78.
2.18. Variable "aed.OrderReserve" means order reserve for possible losses.
2.19. Variable "aed.OrderReserve" limits market risk for each trade operation, see lines 192-200.
2.20. Order reserve defends deposit reserve from market risk.
2.21. Usage and size setting rules of the reserves are explained in the following example:
"
< Example. Account manager is talking to investor >
1. AM. There are two trading systems A1 and A2. There are descriptions and statements of those systems.
2. I. Studied. I select À1.
3. AM. Select now: 1) deposit reserve size; 2) order reserve size.
4. I. More information, please.
5. AM.
5.1. Size of reserve is measured in percents of deposit value.
5.2. Let your initial deposit is $100000.
5.3. Let you set deposit reserve size to 20%.
5.4. It means that your capital is equal to $80000, deposit reserve is equal to $20000.
5.5. Let trading position has opened.
5.6. Let your deposit has grown to $110000.
5.7. In this case your capital is equal to $88000, deposit reserve is equal to $22000.
5.8. Let your deposit has lowered to $105000.
5.9. In this case your capital is equal to $88000, deposit reserve is equal to $17000.
5.10. Let your deposit has grown to $200000.
5.11. In this case your capital is equal to $160000, deposit reserve is equal to $40000.
5.12. Let then your deposit has only lowered.
5.13. At deposit value $180000 your capital is equal to $160000, deposit reserve is equal to $20000.
5.14. At deposit value $170000 your capital is equal to $160000, deposit reserve is equal to $10000.
5.15. At deposit value $160000 your capital is equal to $160000, deposit reserve is exhausted, system stop.
5.16. If trading is stopped by your command then deposit reserve will be restored.
5.17. Deposit value at the trading stop is your capital.
5.18. Let trading was stopped at the deposit value equal to $170000, then your capital is equal to $170000.
5.19. Thus deposit reserve defends your capital value from possible losses.
5.20. All our systems have automatic reserve control feature.
6. I. I see.
7. AM.
7.1. Order reserve defends deposit reserve in above explained manner.
7.2. Expected deposit reserve life time depends on order reserve size.
7.3. Let order reserve size will be equal to 10% and deposit reserve size will be equal to 20%.
7.4. Then system A1 can survive in approximately 2 losses consequence.
7.5. A1 statements demonstrate that longer consequences arise approximately 4 times for one year of trading.
7.6. Let order reserve size will be equal to 5% and deposit reserve size will be equal to 20%.
7.7. Then system A1 can survive in approximately 4 losses consequence.
7.8. A1 statements demonstrate that longer consequences arise approximately 1 times for one year of trading.
7.9. On other hand, order reserve determines orders size, that is affecting to system profitability.
7.10. Order size calculation is in lines 192-216 of system A1 code.
8. I. I see. Let deposit reserve size will be equal to 20% and order reserve size will be equal to 4%.
9. AM. For that order reserve size required deposit value is $50000 or more.
10. I. Server *******, login *******, password *******, deposit $100000, I have accepted account management agreement.
11. AM. Your read only password is À1234.
</Example. Account manager is talking to investor >
"
2.22. Only one trading position can be opened at the same time.
2.23. Variables "aed.TakeFactor", "aed.StopFactor" and "aed.TrailFactor" are the trading strategy presets.
2.24. Usage of those variables is explained in following chapters.
3. Trading strategy description
3.1. Trading strategy "A System: EURUSD Daily Metrics" consists of two parts:
3.1.1. position opening block, lines 161-181;
3.1.2. position managenent block, lines ñòðîêè 132-159.
3.2. Position opening block uses 14 variables:
3.2.1. input - 9 variables:
3.2.1.1. "ald.QuoteAsk" - Ask price, line 84;
3.2.1.2. "ald.QuoteBid" - Bid price, line 85;
3.2.1.3. "ald.Low.1" - Low price of daily timeframe number 1, line 101;
3.2.1.4. "ald.High.1" - High price of daily timeframe number 1, line 102;
3.2.1.5. "ald.Close.1" - Close price of daily timeframe number 1, line 103;
3.2.1.6. "ald.Average.1" - average price of daily timeframe number 1, line 109;
3.2.1.7. "ald.Range.1" - daily price range of daily timeframe number 1, line 111;
3.2.1.8. "ald.QuoteTake" - distance from current price to TakeProfit price level, line 114;
3.2.1.9. "ald.QuoteStop" - distance from current price to StopLoss price level, line 115;
3.2.2. output - 5 variables:
3.2.2.1. "ali.Command" - operation type;
3.2.2.2. "ald.Price" - operation price;
3.2.2.3. "ald.Stop" - StopLoss price level;
3.2.2.4. "ald.Take" - TakeProfit price level;
3.2.2.5. "ald.Risk" - accepted market risk size in price units.
3.3. Buy rules, lines 165-166:
3.3.1. Close price "ald.Close.1" higher than average price "ald.Average.1";
3.3.2. Ask price "ald.QuoteAsk" higher than High price "ald.High.1";
3.3.3. if both of the conditions are true then output variables will be calculated, see lines 167-171.
3.4. Sell rules, lines 173-174:
3.4.1. Close price "ald.Close.1" lower than average price "ald.Average.1";
3.4.2. Bid price "ald.QuoteBid" lower than Low price "ald.Low.1";
3.4.3. if both of the conditions are true then output variables will be calculated, see lines 175-179.
3.5. Position managenent block uses 11 variables:
3.5.1. input - 10 variables:
3.5.1.1. "OrderType ()" - ordet type for the currently managed position;
3.5.1.2. "OrderProfit ()" - net profit value for the currently managed position;
3.5.1.3. "OrderTakeProfit ()" - TakeProfit price level for the currently managed position;
3.5.1.4. "OrderStopLoss ()" - StopLoss price level for the currently managed position;
3.2.1.5. "ald.QuoteAsk" - Ask price, line 84;
3.2.1.6. "ald.QuoteBid" - Bid price, line 85;
3.5.1.7. "ald.QuoteStops" - minimal allowed distance for the stop levels, line 88;
3.2.1.8. "ald.Range.2" - price range of 4-hour timeframe H4 number 1, line 112;
3.2.1.9. "ald.QuoteTrail" - distance from current price to new StopLoss price level, line 116;
3.5.1.10. "ald.TrailStep" - minimal allowed step of trailing-stop, line 118;
3.5.2. output - 1 variable:
3.5.2.1. "ald.Stop" - new StopLoss price level.
3.6. Trailing-stop rules:
3.6.1. for Buy order are in lines 139-143;
3.6.2. for Sell order are in lines 139-143.
3.7. Attempt to trail is made in case of "ald.Stop" value assignment, see lines 153-157.
4. Trading strategy adjustment
4.1. Trading strategy adjustment consist in selection of "best" value set of three following variables:
4.1.1. "aed.TakeFactor" - TakeProfit distance calculation coefficient, see lines 30 and 114;
4.1.2. "aed.StopFactor" - StopLoss distance calculation coefficient, see lines 31 and 115;
4.1.3. "aed.TrailFactor" - Trailing Stop distance calculation coefficient, see lines 32 and 116.
4.2. Sense of notion "best" depends on adjustment goals and appraisement measure system.
4.3. The following trading strategy adjustment order is one of possible ones.
4.4. Trading strategy adjustment order:
4.4.1. set "Initial deposit = 100000 USD" in dialog box "Expert Properties/Testing" of strategy tester;
4.4.2. increase deposit reserve size by "double aed.AccountReserve = 0.99 ;" in line 28;
4.4.3. turn off trailing stop by "double aed.TrailFactor = 0.0 ;" in line 32;
4.4.4. declare variables "aed.TakeFactor" and "aed.StopFactor" as "extern":
4.4.4.1. "extern double aed.TakeFactor = 0.8 ;" in line 30,
4.4.4.2. "extern double aed.StopFactor = 1.0 ;" in line 31;
4.4.5. compile code;
4.4.6. run optimization of "aed.TakeFactor" and "aed.StopFactor" values simultaneously;
4.4.7. assign selected "best" values to "aed.TakeFactor" and "aed.StopFactor" variables;
4.4.8. delete "extern" declaration of "aed.TakeFactor" and "aed.StopFactor" variables:
4.4.8.1. "double aed.TakeFactor = 0.8 ;" in line 30,
4.4.8.2. "double aed.StopFactor = 1.0 ;" in line 31;
4.4.8. declare variable "aed.TrailFactor" as "extern" in line 32 - "extern double aed.TrailFactor = 0.0 ;";
4.4.9. compile code;
4.4.10. run optimization of "aed.TrailFactor" value;
4.4.11. assign selected "best" value to "aed.TrailFactor" variable;
4.4.12. delete "extern" declaration of "aed.TrailFactor" variable "double aed.TrailFactor = 5.0 ;";
4.4.13. restore previous deposit reserve size "double aed.AccountReserve = 0.20 ;" in line 28;
4.4.14. compile code.
4.5. Trading strategy adjustment is completed.
5. Risk management adjustment
5.1. Risk management adjustment consist in setting of two following variables values:
5.1.1. "aed.AccountReserve" - deposit reserve size, line 28;
5.1.2. "aed.OrderReserve" - order reserve size, line 29;
5.2. Deposit reserve and order reserve size setting rules are explained in p. 2.21.
6. Trailing-stop stepping
6.1. To optimize trailing-stop stepping declare in line 18 "extern double acd.TrailStepping = 1.0 ;".
7. Conclusion
7.1. Values "aed.TakeFactor = 0.8" and "aed.StopFactor = 1.0" are excellent settings for EURUSD trading symbol.
7.2. Behaviour of variable "aed.TrailFactor" and parameter "acd.TrailStepping" require further study.
Join the MT4talk Telegram channel: https://t.me/MT4talkchannel
Join the MT4talk Telegram group: https://t.me/+XcwLRi9oFOJhYjlk
Watch videos from the MT4talk YouTube channel.
https://www.youtube.com/@MT4talkForexForum/videos
The instruction is given bellow..
AIS1 Trading Robot: Instruction...
Hello there, and thank you for sharing the instructions for the AIS1 Trading Robot. It seems like you've got some detailed information here. If you have any questions or need assistance with anything related to this trading robot, feel free to ask. I'm here to help!
The instruction is given bellow..
AIS1 Trading Robot: Instruction...
Hello there, and thank you for sharing the instructions for the AIS1 Trading Robot. It seems like you've got some detailed information here. If you have any questions or need assistance with anything related to this trading robot, feel free to ask. I'm here to help!
I'm a bit overwhelmed by all these instructions. Can you give me a simplified version of how to get started with the AIS1 Trading Robot?
The instruction is given bellow..
AIS1 Trading Robot: Instruction...
Hello there, and thank you for sharing the instructions for the AIS1 Trading Robot. It seems like you've got some detailed information here. If you have any questions or need assistance with anything related to this trading robot, feel free to ask. I'm here to help!
I'm a bit overwhelmed by all these instructions. Can you give me a simplified version of how to get started with the AIS1 Trading Robot?
Of course! Let's simplify things. Here's a step-by-step guide to get started with the AIS1 Trading Robot:
Step 1: Installation
Download the AIS1 Trading Robot (AIS1.MQ4) attachment.
Save it to your MetaTrader platform's "Experts" folder.
Step 2: Basic Setup
Open MetaTrader and load the AIS1 Trading Robot.
Make sure you're using the EURUSD trading symbol.
Step 3: Risk Management
Set your desired deposit reserve size. This is a percentage of your initial deposit and helps protect your capital.
Set your order reserve size. This limits risk for each trade operation.
Step 4: Trading Strategy Adjustment
Adjust the values of "aed.TakeFactor," "aed.StopFactor," and "aed.TrailFactor" to fine-tune your trading strategy. Experiment to find the best settings.
Make sure you understand how these values affect your trading strategy and goals.
Step 5: Trailing-Stop Stepping
You can optimize trailing-stop stepping by adjusting "acd.TrailStepping."
Step 6: Conclusion
The recommended settings for EURUSD are "aed.TakeFactor = 0.8" and "aed.StopFactor = 1.0."
Remember, this is a simplified guide. If you have any specific questions or need more details on any step, feel free to ask!
Thanks, that's much clearer. I'll give it a try and see how it goes. If I run into any issues or have questions, I'll come back here for help.
Thanks, that's much clearer. I'll give it a try and see how it goes. If I run into any issues or have questions, I'll come back here for help.
You're welcome! Don't hesitate to return if you need assistance or have any questions. Happy trading, and best of luck with the AIS1 Trading Robot!
Why don't many people post their daily winning results?
MT4talk PRO members can Turn off MT4talk daily winning result post requirements for $49.99 / month. More info...
Latest profit posts from the Trade Executor EA users.
By using the MT4talk website, you automatically agree to the Forum Rules & Terms of Use, as well as the terms below.
Everything you see on the MT4talk website is created by its users, mainly the members of the MT4talk forum.
What is MT4talk?
MT4talk is an online Forex forum with over 5000 Forex robots and over 3000 Forex indicators uploaded by forum members in the last 10 years, available to download from forum posts. The Uploaded file does not come with support.
The website doesn't sell Forex robots and doesn't provide support for the ones you download. MT4talk offers a PRO membership, allowing you to download unlimited files from forum posts. Even though the site usually doesn't provide support for downloaded Forex robots, if you're new to Forex and need help, you can buy the MT4talk dedicated support membership from the MT4talk forum. The MT4talk Dedicated support subscription is only available for purchase for MT4talk PRO members.
The MT4talk Team also provides an Artificial Intelligence Forex robot called "MT4talk Forex AI Signal - Trade Executor EA" to PRO members. However, this Forex robot is only a bonus and is not included in the original PRO membership.
Updates for the Forex robots may be limited or nonexistent, depending on the creator. If you choose to download any Forex robot or setting file from the forum, you acknowledge that you are using it at your own risk. MT4talk PRO membership is a digital product. Therefore, after you complete the PRO membership purchase, there is no refund available!
We are conducting real-life tests on Forex robots to assess their performance. For certain robots, we may use a demo account to conduct tests, and for other Forex robots, we may use a real Forex account. It's essential to recognize that we are not financial advisors and cannot provide investment guidance. Our objective is to discover effective market analysis solutions through testing various strategies, which could be beneficial to our community.
CFTC RULE 4.41 – HYPOTHETICAL OR SIMULATED PERFORMANCE RESULTS HAVE CERTAIN LIMITATIONS. UNLIKE AN ACTUAL PERFORMANCE RECORD, SIMULATED RESULTS DO NOT REPRESENT ACTUAL TRADING. ALSO, SINCE THE TRADES HAVE NOT BEEN EXECUTED, THE RESULTS MAY HAVE UNDER-OR-OVER COMPENSATED FOR THE IMPACT, IF ANY, OF CERTAIN MARKET FACTORS, SUCH AS LACK OF LIQUIDITY. SIMULATED TRADING PROGRAMS, IN GENERAL, ARE ALSO SUBJECT TO THE FACT THAT THEY ARE DESIGNED WITH THE BENEFIT OF HINDSIGHT. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFIT OR LOSSES SIMILAR TO THOSE SHOWN.
Disclaimer - No representation is being made that any Forex account will or is likely to achieve profits or losses similar to those shown on backtests in this forum. In fact, there are frequently sharp differences between hypothetical performance results and the actual results subsequently achieved by any particular trading program. Hypothetical trading does not involve financial risk, and no hypothetical trading record can completely account for the impact of financial risk in actual trading. All information on this forum is for educational purposes only and is not intended to provide financial advice. Any statements posted by forum members or the MT4talk EA Tester Team about profits or income expressed or implied, do not represent a guarantee. Your actual trading may result in losses as no trading system is guaranteed. You accept full responsibilities for your actions, trades, profit or loss, and agree to hold the MT4talk team and forum members of this information harmless in any and all ways.
Affiliates Disclaimer - The website may have links to partner websites, and if you sign up and trade through these links, we will receive a commission. Our affiliate partners are FXOpen, FBS, LQDFX, and MyForexVPS.
Copyright MT4talk.com Forum Rules - Privacy Policy.