• Übersicht
  • Bewertungen
  • Diskussion (5)
  • Neue Funktionen

Orion Intelligence System

Greetings Traders!

I'm Pablo, a seasoned trader with over 12 years of experience in stocks, forex, and indices. I mainly trade on the eToro platform, but I also have coding expertise in creating expert advisors for MT4. Understanding the challenges traders face, I've developed an expert advisor designed to ease market analysis and improve trading success.

Trading Signal:

High Risk : Click Here Low Risk : Click Here

Pricing:

The current price of the OIS is $1,300 USD. Soon, the price will increase to $2,600 USD, so take advantage of the current pricing while it lasts.

The primary strategy of the Orion Intelligence System is a less aggressive Martingale approach combined with various indicators and semi-AI to automatically trade based on market analysis. It includes pattern detection, support/resistance levels, and risk management to handle high market volatility effectively.

  • Indicators and Semi-AI: Utilizes various indicators and semi-AI for automated trading.
  • Pattern Detection: Identifies harmonic patterns and support/resistance levels.
  • Martingale Strategy: Employs a less aggressive Martingale strategy based on market analysis.
  • Risk Management: Includes drawdown control and recovery mode.
  • Volatility Handling: Operates effectively in high market volatility without a news filter.

Recommended Settings:

  • Timeframe: M15

  • Currency Pairs: AUDCAD, AUDNZD, NZDCAD

  • Minimum Capital: $1,000 to $10,000 (Higher capital increases profit potential)

Easy Setup:

  • Attach the EA to the M15 chart for AUDCAD.
  • Use settings: 1000 for high risk or 2000 for low risk.
  • Recommended leverage: 1:500.
  • Use a low spread account (e.g., Exness).

Performance:

  • Drawdown: Backtests show a maximum of 45% for high risk and 25% for low risk.

Installation:

  • Simple installation with minimal input parameters.
  • Restart MT4 three times for optimal performance.

Final Notes:

  • Be patient for trades to occur.
  • Avoid using other EAs simultaneously.
Could you please add me to my business Facebook account? My FB link: fb.com/business-profile
Empfohlene Produkte
The Expert Advisor identifies the most probable direction of the price based on the divergence of volumes and consolidation of prices in the overbought/oversold areas. Filtering for opening trades is carried out by using a unique formula for calculating the price level - "magnet" (based on the Ichimoku indicator), where the price is highly probable to come within a few bars in the future. The EA contains a minimum of settings, which facilitates its usage. Recommended symbols: EURUSD 15m ; GBPUSD
Check out my LIVE channel to see this EA in profitable action! Check My Profile. Or Check out a video of this EA in the screenshot section at the bottom of this page. Recover your MOST PRECIOUS assets: TIME and PEACE of MIND . Set-and-Forget, Plug-and-Play, autonomous, multifunction, DayTrading EA.    BING DayTrading Pro is a fully autonomous, intervention-free, day trading EA. Designed to take Low-Risk, High Win rate, Low DD trades, with advanced trade management, during the trading day. N
CapTaiNCAT
Nyamsuren Boldbaatar
CapTaiNCAT FullAutomated expert advisor. TimeFrame M1 M5 SET FILES;   https://www.mql5.com/en/market/product/38300#!tab=comments&comment=11565247 Recommendations Before using the EA on a real account, test it with minimal risk or on a demo account; Use VPS server with ping less 10ms; ECN account with low spreads + low commissions + quality execution;  Standard settings are optimized for EURUSD GBPUSD AUDUSD USDCAD USDJPY USDCHF XAUUSD  The settings of the EA  Trade Manager  
Robo GBPUSD
Nguyen Hang Hai Ha
Expert Advisor Robo GBPUSD is programmed specifically for the GBPUSD market with advanced and advanced algorithms. Similar to EA Robo Gold, this EA's strategy applies volatility analysis techniques and price tick models, correlating oscillation frequencies to search for reliable trading signals with high probability. Trading orders always have Stop Loss and Take Profit available, along with a Trailing feature optimized for scalper style to quickly exit the market with low risk. Robo GBPUSD has b
A professional expert analyzes the market using the relative strength index. The basic principle is that the bot takes the indicated prices for a certain period of time and calculates the strength and amplitude of the price. This can show when the trend will lose strength and reverse. The signal from the exit from the overbought/oversold zones is analyzed, the levels of these zones will be the levels with LEVEL_MAX and LEVEL_MIN values. We buy when the signal first falls below a certain level (
Night Cat
Denis Bogdanov
Ein vollautomatisches Handelssystem. Der Expert Advisor verwendet in seinem Algorithmus Marktmuster. Kursbewegung im Kanal in bestimmten Zeitintervallen. Das System verwendet: Festlegung von Preisspannen. Berechnung der Volatilität von Währungspaaren zur Bestätigung des Signals. Dynamische Schlussstände. Streu- und Schlupffilter Dynamische Berechnung des Positionsvolumens in Abhängigkeit von der aktuellen Einlage (optional) Empfohlene Währungspaare: EURUSD,GBPUSD,AUDUSD,AUDCAD,GBPCAD,GBPNZD,GBP
InvestorPRO
Andrey Spiridonov
InvestorPRO is a stable Expert Advisor for professional traders. The EA trades in a fully automated mode. The trading algorithm of the EA is based on analysis of numerous factors that affect the dynamics of an instrument. This EA has been created to provide the trader with a comfortable environment for investment in the financial instruments of the Forex market. The EA is installed in the usual way and is suitable for trading any trading symbols. The EA is designed for trading on the D1 timefra
Peregrine Scalper EA
Cutting Edge Forex LLC
5 (1)
Sophisticated   cutting edge algorithms are the heart of this professional fully automated trading system. Unique ability to identify key supply and demand areas using our in-house sophisticated "Time Strength" algorithm that calculates how strong supply and demand areas are as they move into the past. The areas with the highest likelihood for profitable scalping are identified and traded. Coded by professionals with over 12 years trading and system development for professional traders and hedge
Bfxenterprise RSI
Ricky Romadona Tri Saputra
Bfxenterprise RSI Inspired and optimized RSI indicator is the focus of this Expert Advisor (EA). Designed with the use of RSI to perform optimal transactions. Reading trends and price reversals is done by the RSI whose functions have been sorted. Version of Bfxenterprise The version with the name “Bfxenterprise” focuses on special and thorough sorting of transactions. So this version does not always make transactions, unlike the Expert Advisor version in general. This version relies on accuracy
Arda
Evgeniy Zhdan
2 copy of 10 left at this price.  Next 10 copies $549. Arda is a trading Expert Advisor based on the dissonance of technical indicators  and price patterns. Support: https://www.mql5.com/en/channels/TrendHunter The Expert Advisor was tested on real historical data of EURUSD, GBPUSD and XAUUSD (Gold). You can download a demo version of any program (for example, tickstory - there is a free version) that provides quotes with 99.9% quality and check it yourself. The trading strategy does not co
Voluntas  is the advanced Martingale-  G rid System   which already works. It was designed to exploit existing market inefficiencies. Instead it uses real market mechanics to its advantage to make profit. All costs (Commission & Swap) are included in the Trades. Only 1/2  copies  of the EA left  at $149! Next price -->  $199 Supported currency pairs:  AUDCAD, AUDNZD, NZDCAD Recommended Timeframe:   M15 UPDATES:  09.10.2022 16:26   User friendly attitude Features: Multiple  C urrency Pairs Supp
Forest
Vadim Podoprigora
Forest is a Trend Expert Advisor based on the analysis of a unique mathematical model of trend lines, which allows you to determine the trend movement. The Expert Advisor is most suitable for the currency pair "USDCHF" on period "H1". The EA can work on any type of accounts, and with any brokers. The EA uses mathematical analysis to open trades and applies loss control to open trades. At its core, the EA does not use any risky systems with the increase in the volume or increase in the number of
Works to open two hedging deals, buying and selling, with a goal of each deal of 20 points With the opening of multiple cooling deals in the manner of another lot size and suspending each type of sale or purchase transaction At a profit level. Parameters: Lot1: Manual Lot Size Auto_Lot: Set true to automatically calculate optimal Lot Size based on risk preferences, Set False if you want use manual lot size. Max_Risk: Max Risk as percentage of Equity* the greater this percentage is the great
Octopus Stability
Aleksandr Shurgin
After a thorough work and search for the optimal values of each of the Expert Advisor's parameters, the most stable settings of the algorithms have been selected, which do not require over large history periods. The robot uses a universal trading strategy, allowing the use of the currency pairs EURUSD, GBPUSD, USDCHF, USDJPY and other pairs with low spread. The EA trades on a 5-minute timeframe , it uses levels defined automatically on the bases of multiple parallel price movement calculation me
EAalgotrading
Francesco Lippo
Claro, aquí tienes la traducción al alemán: --- Dieser Trading-Bot basiert auf der Supply-and-Demand-Strategie (Angebot und Nachfrage), die eine der beliebtesten Strategien in der technischen Analyse der Finanzmärkte, wie dem Forex, ist, um Schlüsselbereiche von Unterstützung und Widerstand zu identifizieren. Hier sind die grundlegenden Prinzipien und die Funktionsweise des Bots: Er funktioniert hervorragend auf Nat Gas mit einem 30-Minuten-Zeitrahmen und einem Mindestkapital von 1.600 Euro
Jet Punch
Didit Haryadi Saputra
Jet Punch is another best expert advisor for MT4,  can help you make money while you sleep by automatically entering and exiting trades. It trades by opening trades every day and closing them at the right time to ensure you always earn a profit. The software is very simple and can be used by both beginner and experienced traders.  Jet Punch was tested and has successfully passed the stress test with slippage and commission approximate to the real market condition. Recommendations: Currency pair
VolnaFX
Roman Meskhidze
4.67 (15)
LAUNCH PROMO Next price:        $349 The price will be rise to limit the number of users for this strategy The "Volna FX" Expert Advisor is a representative of robots trading from levels. Levels can be built automatically, or they can be rigidly set in the parameters of the Expert Advisor. CHECK REAL SIGNAL :  https://www.mql5.com/en/signals/847709 The uniqueness of the advisor is that it can work both with averaging and using the martingale principle, or without it, i.e. use a clear take profi
Sonata MT4
Evgeniy Zhdan
The Expert Advisor's strategy is based on proactive forecasting of the most likely price movement. The method for determining this movement is the calculation and ratio of such factors as: short-term OHLC candlestick patterns, the direction of the microtrend, the rate of price change. Only 1 deal on one trading instrument can be opened at a time. Support:   https://www.mql5.com/en/channels/TrendHunter No hazardous trading methods are used. The Expert Advisor has minimal settings, which al
Scalper Gold Reborn
Zahidin Zainal Zulkornain
Scalper Gold Reborn is an Expert Advisor designed specifically for trading gold but can use at currency too. The operation is based on opening orders using the Bolinger Band and Moving Average . Monitoring Live Signal: https://www.mql5.com/en/signals/1805669 Recommendations Timeframe : M1 Pairs : GOLD/Currencies Settings: Default Lot : Use 0.01 for every 10.000cents Leverage: 1:1000 or higher Contact me in private for more setfiles. Setup Open M1 timeframe charts for pair GOLD or currency. At
TWZ Gold Killer
Zafar Iqbal Sheraslam
The Gold Killer support and resistance strategy with Trilling Stop loss is a trading method that focuses on identifying key levels where the price of gold tends to find support (stop falling) and resistance (stop rising). Here's a breakdown of how to apply this strategy effectively: Best Time Frame: 01 Hour Works only on Gold: Minimum Deposit 10K If someone wants for Currencies DM Me. 1. Understanding Support and Resistance Support Level: A price level where a downtrend can be expected to pause
QuatronPro
Marek Kvarda
This robot is designed for major currency pairs and trades several strategies: swings, gaps and SR levels. It uses an advanced algorithm for analyzing price data and looks for the best parameters. Trading signals are filtered by results of analysis of daily and monthly chart for the last 12 periods. It is built on the foundations of the successful EA Triton . This is not a scalping robot. It is not sensitive to spread and slip. It will be traded at all brokers with quotation accurate to point
Forex Bulls Gold VIP
Hossein Davarynejad
//// Forex Bulls  GOLD  VIP //// Introducing Forex Bulls Gold VIP  :  the cutting-edge Gold  development expert meticulously crafted for daily time frame strategies with an integrated stop-loss mechanism. As the developer behind this powerful tool, let me delve into the key features and advantages that make  Bulls Gold  a must-have for your daily Gold trading endeavors: . Daily Time Frame Precision: Forex Bulls Gold VIP  is tailored to excel in the   daily   time frame, ensuring optimal precis
Hercules Gold VIP
Hossein Davarynejad
*     MT5 Version is free  + one Daily Trader on BTC USD is free  * 37 WEEK LIVE RESULT                               Live Signal =  signal      //// HERCULES GOLD VIP //// the cutting-edge Gold  development expert meticulously crafted for daily time frame strategies with an integrated stop-loss mechanism. As the developer behind this powerful tool, let me delve into the key features and advantages that make   a must-have for your daily Gold trading endeavors: . Daily Time Frame Precision: H
EA works with none of the technical indicators.   It waits for the trend and trade accordingly. No standard indicators. No grid trading. No arbitrage. No curve fitting according to back-test results No Hedge   Very low Stop Loss Ratio  Tested with 99.90% data Modelling quality. Can work with even $30 USD Recommendations : Developed for M1, EURUSD ECN Broker with 5 points Settings Spread: Need to be as low as possible. Trailing Status: trailing stop usage option Trailing stop: Pips to allow trail
Unusual EA
Khairudi Kherikhanov
Автоматический советник Unusual EA не предназначен для получения сверх прибыли. Больше подойдет долгосрочным инвесторам, для которых трейдинг не игра, а работа. Советник Unusual EA, также можно использовать в портфеле, совместно с другими советниками. Размер прибыли и просадки зависит от выбранной валютной пары и таймфрейма.Наиболее эффективен на периодах M30,H1 и H4, хотя может использоваться на любых таймфреймах и торговых инструментах. Параметры советника: MagicNumber- метка "своих" с
Millennium EA
Vladimir Pleshakov
The scientific approach to trading and responsible development are the main principles of  Millennium  EA. In order to create this EA, a research work was done in the field of trading. Dow theory, the theory of fractal analysis, the methods of Bill Williams and other traders, all this served as the theoretical basis for the advisor, which is designed to automate trading decisions. Signals: https://www.mql5.com/en/signals/1748354 https://www.mql5.com/en/signals/1748359 https://www.mql5.com/en/sig
The MelBar HedgeScalper FinTech RoboTrader MAXIMUM LOTSIZE : 100 Lots (US$10,000,000) per TRADE/POSITION FULLY TRIED, TESTED, PROVEN & VERIFIED ON A REAL LIVE TRADING ACCOUNT! TRY OUT THE DEMO! The Experienced Trader & Global Money Manager Version. 89% Trade Winning Percentage. 32.679% Profit Gain or ROI in 2 Trading Days. Profit Factor 3.59 Average Trade Length 1h 22m. The MelBar HedgeScalper FinTech RoboTrader is easy to use. Has the Advantage of Retiring Unnecessary "Debt
Rapture
Evgeniy Zhdan
The automated trading system is developed based on the "Comfort Range" theory. According to this theory, the chart of each trading instrument has its own dynamically changing range of movement. The skill of determining such a range allows you to use this information as a leading indicator and predict price movement in the near future. The Rapture Expert Advisor determines the "Comfort Range" of the trading instrument and works in the direction of the expected future movement. The EA does
Käufer dieses Produkts erwarben auch
Please do not   pm   me if you are asking for:  Discount ( Price will go back to original price 3800 in the future ) Backtesting result ( We don't trust mislead informations ) (LOJ IS NOT A HFT Strategy, Will not be violated by Prop firm rules) We don't rely on backtest results. The backtesting environment can't access our database to retrieve historical data. We aim to provide clarity to EA traders and not mislead them. The best approach is to monitor our signals. If you're wondering how to ve
Ai Hybrid Robot MT4
Mansour Babasafary
5 (3)
Several experts in one expert With this expert, you can use several up-to-date strategies Enhanced with artificial intelligence Can be used in several popular forex currencies Can be used in the most popular forex time frames Without using high-risk strategies Attributes : Can be used in the EURUSD , GBPUSD , USDCHF , AUDUSD , USDCAD , NZDUSD  currency pairs Can be used in M30 , H1 , H4 , D1 time frames Has profit limit and loss limit Without using risky strategies like martingale or hedg
Big Forex Players MT4
Marzena Maria Szmit
4.67 (24)
We proudly present our cutting-edge robot, the  Big Forex Players EA  designed to maximize your trading potential, minimize emotional trading, and make smarter decisions powered by cutting-edge technology. The whole system in this EA took us many months to build, and then we spent a lot of time testing it. This unique EA includes three distinct strategies that can be used independently or in together. The robot receives the positions of the   biggest Banks   (p ositions are sent from our databa
The Expert Advisor works on the basis of wave-like changes in price movements. The dynamic regression channel allows you to accurately predict the price movement in the short term. The Expert Advisor uses the indicator in its trading: https://www.mql5.com/en/market/product/64252 Trading instruments (TF 5m): GBPUSD, EURUSD, USDJPY. The Expert Advisor has been successfully tested with 99% quality quotes, floating spread and random ping since 2003. Optimization of the advisor is not requir
MAX Gold 1
Peng Peng Gao
这是一种全自动智能自适应算法。MAX Gold  系统计算历史数据,并根据即将突破支撑位和阻力位的概率百分比执行分析,并下达挂单。 EA 交易可适应任何市场条件。它使用质量为 99,9% 的真实刻度进行了回溯测试和优化。它已成功完成压力测试。 EA 包含统计信息收集算法,并在信息面板上输出。 建议选择ECN经纪商和点差最低的账户。 货币对/时间框架:XAUUSD M30. 推荐货币对/时间框架: XAUUSD M30 要求和建议 5 位报价。 最大点差:0 - 20 点。 最低存款额:100美元。 最大止损水平:0 - 5 分。 建议杠杆为 1:100 或更高。 如果您在同一个账户上使用多个顾问,请确保所有顾问都有不同的魔术号码。 参数 订单类型 - 选择交易方向。 魔术 - 交易 ID。 Order Comment - 对订单的评论。 滑点 - 触发订单前的允许滑点。 风险保护平仓订单 - 当设置为 true 时,EA 使用强制平仓来防止损失。 使用自定义滑点 - 在滑点的情况下关闭头寸。 自定义滑点 - 以
Quantum Algo Trading MT4
Lo Thi Mai Loan
5 (6)
Nur noch 2 Kopierer zu diesem Preis, der nächste Preis beträgt $1633 Überprüfen Sie die Live-Ergebnisse hier: $50K Persönliches Signal:   [Hier klicken] Prop-Firma Live-Signal:   [Hier klicken] MT5-Version hier:   [Hier klicken] Willkommen bei   Quantum Algo Trading MT4 EA . Dieses EA ist darauf ausgelegt, mehr als nur ein mechanisches System zu sein; es wird Ihr Begleiter auf Ihrer Handelsreise ein Leben lang sein. Das EA verwendet ein Ausbruchssystem mit einem Algorithmus, der von jeman
Silicon Ex
Nadiya Mirosh
" Silicon Ex ": Your Reliable Assistant in the World of Forex Silicon Ex is a modern trading bot, specially created for traders in the Forex market. This innovative tool serves as a reliable partner for those who strive for efficient and automated trading. Key Features of "Silicon Ex": Reliability and Stability: Created using advanced technologies that ensure stable and reliable operation in the market. Intelligent Risk Management: Built-in money management system (Money Management) allows yo
Magnat
Alexander Buseinus
A professional Expert Advisor designed for trading any instrument of the Metatrader 4 platform. Work Features: A large number of input parameters, with a wide range of settings, allow you to work on all instruments with any broker trading conditions. Depending on trading conditions, it can work with direct market positions or dynamic pending orders. When switching the corresponding input parameter, the Expert Advisor always opens only one trading position at a time, or it can open many posit
AI Nodiurnal EA ist ein fortschrittlicher Forex-Roboter, der modernste maschinelle Lerntechnologie nutzt, um Handelsstrategien zu optimieren und die Leistung auf dem dynamischen Devisenmarkt zu verbessern. Der Begriff "Nodiurnal" spiegelt seine Fähigkeit wider, sich anzupassen und nicht nur während der üblichen Tageshandelszeiten, sondern auch während nicht standardmäßiger Zeiträume zu operieren, und bietet somit einen kontinuierlichen und adaptiven Ansatz für den Devisenhandel. Einstellungen: S
Aura Black Edition
Stanislav Tomilov
4.56 (16)
Aura Black Edition is a fully automated EA designed to trade GOLD only. Expert showed stable results on XAUUSD in 2011-2020 period. No dangerous methods of money management used, no martingale, no grid or scalp. Suitable for any broker conditions. EA trained with a multilayer perceptron Neural Network (MLP) is a class of feedforward artificial neural network (ANN). The term MLP is used ambiguously, sometimes loosely to any feedforward ANN, sometimes strictly to refer to networks composed of mult
Waka Waka EA
Valeriia Mishchenko
4.3 (47)
EA has a live track record with 4.5 years of stable trading with low drawdown: Live performance MT5 version can be found here Waka Waka is the advanced grid system which already works on real accounts for years. Instead of fitting the system to reflect historical data (like most people do) it was designed to exploit existing market inefficiencies. Therefore it is not a simple "hit and miss" system which only survives by using grid. Instead it uses real market mechanics to its advantage to make p
Btcusd Grid
Ahmad Aan Isnain Shofwan
BTCUSD GRID EA ist ein automatisiertes Programm, das zur Verwendung der Grid-Handelsstrategie entwickelt wurde BTCUSD GRID EA ist sowohl für Anfänger als auch für erfahrene Händler äußerst nützlich.   Es gibt zwar andere Arten von Trading-Bots, die Sie verwenden können, aber die logische Natur der Grid-Trading-Strategie macht es für Krypto-Grid-Trading-Bots einfach, automatisierten Handel ohne Probleme durchzuführen.   BTCUSD GRID EA ist die insgesamt beste Plattform, wenn Sie einen Grid-Tradin
Bonnitta EA
Ugochukwu Mobi
3.33 (18)
Bonnitta EA basiert auf der Pending-Position-Strategie (PPS) und einem sehr fortschrittlichen geheimen Handelsalgorithmus. Die Strategie von Bonnitta EA ist eine Kombination aus einem geheimen benutzerdefinierten Indikator, Trendlinien, Unterstützungs- und Widerstandsniveaus (Preisaktion) und dem wichtigsten oben erwähnten geheimen Handelsalgorithmus. KAUFEN SIE KEINEN EA OHNE ECHTEN GELDTEST VON LÄNGER ALS 3 MONATE, ICH HABE MEHR ALS 100 WOCHEN (MEHR ALS 2 JAHRE) GEBRAUCHT, UM BONNITTA EA MI
Bandwagon
ADELYN CASTILLO
4.92 (26)
240 % Gewinn im 22. Monat. Sie können das Bandwagon Live-Konto mit der 2-Jahres-Leistung Bandwagon 2-Jahres oder Bandwagon V2 überprüfen. *NOTIZ: Jetzt mit 50 % Rabatt! Sichern Sie sich jetzt Ihr Exemplar! Erwarten Sie jeden Monat eine Preiserhöhung *WARNUNG: SAGEN SIE NEIN ZU PIRACIE. Seien Sie vorsichtig mit Benutzern, die nach einer Kopie von Bandwagon EA fragen. Bandwagon kann Piraterie erkennen und wenn Ihr Konto solche Dinge erkennt, kann ich nicht garantieren, dass der EA immer noch so f
Robotertestergebnisse: Ersteinzahlung: 1000, Gesamtnettogewinn: 11999, Gewinnfaktor: 2,58, erwartete Auszahlung: 2,48, Drawdown: 5,49 %. Das empfohlene Währungspaar für den Handel ist XAUUSD (Gold). Empfohlene Zeiträume: M5 Empfohlenes Startguthaben: $500 oder mehr. Der empfohlene maximale Spread für XAUUSD beträgt 20 Pips. Kontotyp: ECN. Wie handelt dieser Roboter? Technische Beschreibung des Roboters: Der Roboter „Scalping Forex Robot M5“ ist ein aktiver Gold-Scalper-Roboter. Der Roboter
Top Algo v4
Yvan Musatov
5 (1)
Торговый робот Top Algo является технической разработкой для автоматизации торговли на валютном Форекс рынке. Его цель — помочь как начинающим участникам рынка, у которых недостаточно фундаментальной базы в сфере трейдинга  так и профессиональным и облегчить опытным инвесторам процесс приумножения прибыли. Top Algo можно также назвать мультивалютным роботом-советником, так как он может работать на нескольких валютных парах.  Профессиональный эксперт Top Algo может подключиться к вашему торгов
Golden Pickaxe
Valeriia Mishchenko
4.67 (6)
EA has high-performance live track records of different set files: XAU Risky Vol XAU Balanced Vol XAU Balanced MT5 version can be found here Golden Pickaxe is a mean-reversion grid trading system that uses machine learning technology to place high-profit potential trades on the Gold market. It uses real market inefficiencies to its advantage to have an edge over the market. The EA has 5 predefined set files, which are essentially 5 different trading systems on gold . You may choose the def
ChimeraFxTool
Marve Edom Agbor
5 (1)
CHECK COMMENTS SECTION FOR BACKTESTING PARAMETERS.. The ChimeraFxTool Best EA for Prop Firms (MFF/FTMO The ChimeraFxTool Best EA for Prop Firms (MFF/FTMO)   - No Martingale   - No Grid   - No Hedging Best Risk Management   - Daily Loss limit   - Stop loss and TP protections Best Profit Factor   - Daily Max Profit Lock Protection   - Monthly Profit Lock Protection Best Signal Accuracy    - Best candle Patterns    - Best timed Response     Strategy    - Trend Tracker
Check Screenshot for Each parameters description and customize to your strategy. Note: do not buy any pirated clone in our name we do not sell in any other store other than the official mql5 market, not even on Ebay beware of scammers and do not fall victim out of curiosity. thanks. For Backtesting Parameters For FTMO, if encounter error 130 kindly change spread to 100 from current $ 100 K Below: Pair USTECHCASH100 Cm = "DMF_AI_EA_ROBOT" ; Strategy = 1 ElapsedSECONDS = 7 MaxDailyProfit = 3500 Ma
GerFX Density Scalper
Exler Consulting GmbH
4.43 (7)
IMPORTANT: Please contact me after buying or renting for the correct key paramter.  Before you buy a night scalper please be aware of the risks involved: Past performance is no guarantee of future profitability (the EA could also make losses).  The backtests shown (e.g. in screenshots) are highly optimized to find the best parameters but therefore results cannot be transferred to live trading. Any mean reversion can get caught on the wrong side of a fast movements due to unexpected news or flas
MyGrid Scalper Ultimate
Ahmad Aan Isnain Shofwan
2 (1)
168ドルの価格は、グランドオープンだけの特別価格です。通常価格は$1,688になります MyGrid Scalper Ultimate 8soCfP12Ph19mi914zQaZz2KsGGtcANVhVVfKAnmVRqM ロボットです。 MyGrid Scalper Ultimate は、MyGrid Scalper EA の有料バージョンです https://www.mql5.com/en/market/product/87277 数千人のユーザーが使用していることが証明されています。 MyGrid Scalper Ultimate は派生物であり、Super Grid Scalper EA の一部です。 https://www.mql5.com/en/market/product/85399 MyGrid Scalper Ultimate は、数千人のユーザーが無料版を使用して、実際のアカウントで既に動作する高度なグリッド システムです。したがって、購入する前に無料版を試すことをお勧めします。 特徴: さまざまなロット モード: 固定ロット、
Benefit EA
Vsevolod Merzlov
Benefit EA is a non-indicative flexible grid adviser with special entry points that provide a statistical advantage, revealed through the mathematical modeling of market patterns. The EA does not use stop loss. All trades are closed by take profit or trailing stop. It is possible to plan the lot increments. The "Time Filter" function is set according to the internal time of the terminal as per the displayed time of the instrument's server, not the operating system (can match). This function allo
Diamond Scalping MT4
Lo Thi Mai Loan
4.4 (5)
Nur noch 24 Stunden, bis die nächste Preissteigerung erfolgt!  Der nächste Preis ist: $ 2033 Live Performance 1 (EURUSD): Die MT5-Version ist hier zu finden: Bei Kauf dieses EA erhalten Sie einen kostenlosen HFT-Tagespass für die Prop-Firmen. Für weitere Details senden Sie bitte eine Nachricht an den unten stehenden Chat-Kanal. Treten Sie den Kanälen bei, um Benachrichtigungen und die neuesten Updates zu erhalten: https://www.mql5.com/de/channels/diamondscalping Um auf dem Handelsmarkt
GoldScalper
Chiedozie Titus Ugwu
GoldScalper ist ein professionelles automatisches Handelssystem, das für die MT4-Plattform und das XAU/USD-Paar entwickelt und optimiert wurde. Dieses System funktioniert unabhängig auf Ihrem Terminal, Sie können es auf Ihrem Computer oder auf einem VPS ausführen, da der Computer eingeschaltet sein muss, während der Roboter läuft. Der Roboter analysiert den Markt 24 Stunden am Tag und öffnet seine Trades im 5M-Zeitrahmen. Dank dessen ist es effektiver als ein Mensch. Updates und Optimieru
Algo v3 ea robot
Sharif Khatib Said
ALGO V3 EA is developed with over a year of intense research and testing. This expert advisor employs multi-timeframe volatility measurements, analyses intentions of market participants and anticipate price movements before they occur with help candlestick patterns, and supply & demand analysis for accurate entries that are highly reactive to market price movements of Gold, breaking out at critical price levels. Gold Mana is proven to be resilient for more than 3 years with stable trading throug
Scalper Pro Vision
Kirill Borovskii
2 (1)
We present to your attention an advanced tool for scalping trading. This expert has a market-adaptive algorithm and a fully automatic self-learning mode. Therefore, it has a minimum of settings and is intuitive to operate. The advisor is designed specifically for brokers with low spreads and StopLevel less than 5 . The advisor works on pending orders and opens them only in a specified period of time. Characteristics: Working symbols All low spread symbols Working Timeframe: H1 Min deposit: $100
Algo Samurai Gold
Abdul Malikul Hanan
Algo Samurai Gold: Scalp XAUUSD with Built-in Profit Protection Real Account Signal Page :    https://www.mql5.com/en/signals/2235827 https://www.mql5.com/en/signals/2239627 https://www.mql5.com/en/signals/2240852 set file used :   AlgoSamuraiGold Trade Gold with Confidence and Control Algo Samurai Gold is an automated forex trading robot (Expert Advisor) designed to scalp profits from the XAUUSD (Gold) market. This scalping strategy allows you to capitalize on small price movements througho
Trading robot Sniper (Sniper). Die in der Arbeit der 7 Trading-Indikatoren und eine Vielzahl von verschiedenen Mechanismen, die Trading-Prozess! Alle verwendeten Signal-Indikatoren bekannt ist Parabolic SAR, MACD, MA, Envelopes, CCI, RVI, Alligator ! Berater ständig analysiert und unter Kontrolle hält jede Marktsituation. Konzipiert für den vollständig automatisierten Handel! Jeder Auftrag unterstützt Dual sichere Netz mit sehr glatten Martingal. Um Risiken zu reduzieren, versuchen Sie nicht set
Smart Advisor Calculation is designed for a very interesting method that is able finally to give the martingale a new positive way! At startup the Expert Advisor sets virtual orders and trades like the real deal. As soon as the drawdown of virtual orders reaches the set number, the robot immediately enters the market for real orders! Thus the price is going without setbacks such as 30-70 pips, with great probability will kick back at the entrance to the market! This is used by a robot! If the pr
Forebot
Marek Kvarda
This robot uses a custom hidden oscillating indicator and also analyzes the market response. It traded mostly at the time of higher volatility. It works with several pending orders with different size of volume and their position actively modifies. It uses advanced money management. TradingMode setting can also meet the conditions FIFO. It is successful in different markets and different timeframes. Best results are achieves with a broker with the spread to 5 points on EURUSD. Is necessary a b
Auswahl:
Keine Bewertungen
Antwort auf eine Rezension
Version 13.48 2024.08.27
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.47 2024.08.24
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.45 2024.08.20
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.43 2024.08.19
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.42 2024.08.18
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.41 2024.08.17
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.40 2024.08.16
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.39 2024.08.15
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.38 2024.08.15
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.37 2024.08.14
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.36 2024.08.13
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.35 2024.08.13
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.33 2024.08.13
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.32 2024.08.12
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.31 2024.08.10
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.30 2024.08.09
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.29 2024.08.09
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.28 2024.08.09
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.27 2024.08.06
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.26 2024.08.05
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.25 2024.08.04
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.24 2024.07.31
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.23 2024.07.25
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.22 2024.06.27
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.20 2024.06.24
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.15 2024.06.22
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.13 2024.06.22
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.10 2024.06.14
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.9 2024.06.14
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.8 2024.06.14
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.6 2024.06.13
void fun_29(int para_0_in)
{
int local_1_in;
//-------------
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;
//-------------
double shortMA = iMA(global_50_st, 0, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
double longMA = iMA(global_50_st, 0, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
double rsi = iRSI(global_50_st, 60, 20, PRICE_CLOSE, 0);
//-------------
bool isBullish = (shortMA > longMA) && (rsi > 50);
bool isBearish = (shortMA < longMA) && (rsi < 50);
bool isOverbought = (rsi > 70);
bool isOversold = (rsi < 30);
//-------------
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = true;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = false;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0) ||
(isBearish && global_56_do > 0) || (isBullish && global_56_do < 0) ||
(isBearish && global_58_do > 0) || (isBullish && global_58_do < 0) ||
(isBearish && global_21_do > 0 && isOverbought) || (isBullish && global_21_do < 0 && isOversold) ||
(isBearish && global_56_do > 0 && isOverbought) || (isBullish && global_56_do < 0 && isOversold) ||
(isBearish && global_58_do > 0 && isOverbought) || (isBullish && global_58_do < 0 && isOversold)) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;
}
}
}
Version 13.5 2024.06.12
void fun_29(int para_0_in) {
int local_1_in;
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxDrawdownLimit = accountEquity * maxDrawdownLimitPercent;
double currentDrawdown = accountBalance - accountEquity;

double shortMA;
double longMA;
double rsi;
int shortMAPeriod = 50;
int longMAPeriod = 200;
int rsiPeriod = 14;
bool isBullish;
bool isBearish;
bool isOverbought;
bool isOversold;

shortMA = iMA(global_50_st, 0, shortMAPeriod, 0, MODE_SMA, PRICE_CLOSE, 0);
longMA = iMA(global_50_st, 0, longMAPeriod, 0, MODE_SMA, PRICE_CLOSE, 0);
rsi = iRSI(global_50_st, 0, rsiPeriod, PRICE_CLOSE, 0);

isBullish = (shortMA > longMA) && (rsi > 50);
isBearish = (shortMA < longMA) && (rsi < 50);
isOverbought = (rsi > 70);
isOversold = (rsi < 30);

if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + drawdownDurationHours * 60 * 60;
drawdownPaused = True;
maxDrawdownCheckTime = TimeCurrent() + maxDrawdownCheckDays * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = False;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in, 2, 48);
if (StringLen(global_50_st) != 6) {
tmp_st_1 = "99";
} else {
tmp_st_1 = fun_20(StringSubstr(global_50_st, 0, 3)) + fun_20(StringSubstr(global_50_st, 3, 3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st);
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in));
global_42_do = LotsMartinp;
global_18_in = global_19_in;
if ((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != "")) {
local_1_in = para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2;
global_21_do = global_2_a_160_ko[local_1_in].do_3;
global_28_do = global_2_a_160_ko[local_1_in].do_4;
global_29_do = global_2_a_160_ko[local_1_in].do_5;
global_30_in = global_2_a_160_ko[local_1_in].do_6;
global_31_do = global_2_a_160_ko[local_1_in].do_7;
global_33_do = global_2_a_160_ko[local_1_in].do_8;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in));
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in));
global_129_do = MarketInfo(global_50_st, 13);
global_125_do = MarketInfo(global_50_st, 13) * MarketInfo(global_50_st, 11);
global_126_do = MarketInfo(global_50_st, 10);
global_127_do = MarketInfo(global_50_st, 9);
global_128_do = MarketInfo(global_50_st, 11);
global_130_do = 0.0;
if (iClose(global_50_st, 0, 1) > 0.0) {
global_130_do = (MathAbs(global_127_do / iClose(global_50_st, 0, 1) - 1.0)) * 10000.0;
}
fun_13();
if (iATR(global_50_st, 1440, global_22_in, 1) / MarketInfo(global_50_st, 9) > global_23_do) {
global_123_bo = false;
return;
}
global_123_bo = true;

if ((isBearish && global_21_do > 0) || (isBullish && global_21_do < 0)) {
global_123_bo = false;
return;
}
}
}
Version 13.2 2024.06.11
void fun_29(int para_0_in)
{
int local_1_in;
//----- -----
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
static double movingAverageDrawdown = 0.0;
static int drawdownPeriod = 14;
static double emergencyStopLimit = 0.2;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxFixedDrawdownLimit = accountEquity * 0.09;
double maxDynamicDrawdownLimit = movingAverageDrawdown * 1.2;
double maxDrawdownLimit = MathMin(maxFixedDrawdownLimit, maxDynamicDrawdownLimit);
double currentDrawdown = accountBalance - accountEquity;
//----- -----
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + 7 * 24 * 60 * 60;
}
static double drawdownHistory[14] = {0};
static int drawdownIndex = 0;
drawdownHistory[drawdownIndex] = currentDrawdown;
drawdownIndex = (drawdownIndex + 1) % drawdownPeriod;
double drawdownSum = 0.0;
for (int i = 0; i < drawdownPeriod; i++) {
drawdownSum += drawdownHistory[i];
}
movingAverageDrawdown = drawdownSum / drawdownPeriod;
if (currentDrawdown / accountEquity >= emergencyStopLimit) {
drawdownPaused = True;
Print("Emergency stop triggered! Drawdown exceeded ", emergencyStopLimit * 100, "%.");
return;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + 24 * 60 * 60;
drawdownPaused = True;
maxDrawdownCheckTime = TimeCurrent() + 7 * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = False;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in,2,48) ;
if(StringLen(global_50_st) != 6)
{
tmp_st_1 = "99";
}
else
{
tmp_st_1 = fun_20(StringSubstr(global_50_st,0,3)) + fun_20(StringSubstr(global_50_st,3,3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st) ;
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in)) ;
global_42_do = LotsMartinp ;
global_18_in = global_19_in ;
if((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != ""))
{
local_1_in=para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2 ;
global_21_do = global_2_a_160_ko[local_1_in].do_3 ;
global_28_do = global_2_a_160_ko[local_1_in].do_4 ;
global_29_do = global_2_a_160_ko[local_1_in].do_5 ;
global_30_in = global_2_a_160_ko[local_1_in].do_6 ;
global_31_do = global_2_a_160_ko[local_1_in].do_7 ;
global_33_do = global_2_a_160_ko[local_1_in].do_8 ;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in)) ;
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in)) ;
global_129_do = MarketInfo(global_50_st,13) ;
global_125_do = MarketInfo(global_50_st,13) * MarketInfo(global_50_st,11) ;
global_126_do = MarketInfo(global_50_st,10) ;
global_127_do = MarketInfo(global_50_st,9) ;
global_128_do = MarketInfo(global_50_st,11) ;
global_130_do = 0.0 ;
if(iClose(global_50_st,0,1)>0.0)
{
global_130_do = (MathAbs(global_127_do / iClose(global_50_st,0,1) - 1.0)) * 10000.0 ;
}
fun_13();
if(iATR(global_50_st,86400,global_22_in,1) / MarketInfo(global_50_st,9)>global_23_do)
{
global_123_bo = false ;
return;
}
global_123_bo = true ;
}
}
Version 12.5 2024.06.11
void fun_29(int para_0_in)
{
int local_1_in;
//----- -----
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
static double movingAverageDrawdown = 0.0;
static int drawdownPeriod = 14;
static double emergencyStopLimit = 0.2;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxFixedDrawdownLimit = accountEquity * 0.09;
double maxDynamicDrawdownLimit = movingAverageDrawdown * 1.2;
double maxDrawdownLimit = MathMin(maxFixedDrawdownLimit, maxDynamicDrawdownLimit);
double currentDrawdown = accountBalance - accountEquity;
//----- -----
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + 7 * 24 * 60 * 60;
}
static double drawdownHistory[14] = {0};
static int drawdownIndex = 0;
drawdownHistory[drawdownIndex] = currentDrawdown;
drawdownIndex = (drawdownIndex + 1) % drawdownPeriod;
double drawdownSum = 0.0;
for (int i = 0; i < drawdownPeriod; i++) {
drawdownSum += drawdownHistory[i];
}
movingAverageDrawdown = drawdownSum / drawdownPeriod;
if (currentDrawdown / accountEquity >= emergencyStopLimit) {
drawdownPaused = True;
Print("Emergency stop triggered! Drawdown exceeded ", emergencyStopLimit * 100, "%.");
return;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + 24 * 60 * 60;
drawdownPaused = True;
maxDrawdownCheckTime = TimeCurrent() + 7 * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = False;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in,2,48) ;
if(StringLen(global_50_st) != 6)
{
tmp_st_1 = "99";
}
else
{
tmp_st_1 = fun_20(StringSubstr(global_50_st,0,3)) + fun_20(StringSubstr(global_50_st,3,3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st) ;
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in)) ;
global_42_do = LotsMartinp ;
global_18_in = global_19_in ;
if((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != ""))
{
local_1_in=para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2 ;
global_21_do = global_2_a_160_ko[local_1_in].do_3 ;
global_28_do = global_2_a_160_ko[local_1_in].do_4 ;
global_29_do = global_2_a_160_ko[local_1_in].do_5 ;
global_30_in = global_2_a_160_ko[local_1_in].do_6 ;
global_31_do = global_2_a_160_ko[local_1_in].do_7 ;
global_33_do = global_2_a_160_ko[local_1_in].do_8 ;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in)) ;
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in)) ;
global_129_do = MarketInfo(global_50_st,13) ;
global_125_do = MarketInfo(global_50_st,13) * MarketInfo(global_50_st,11) ;
global_126_do = MarketInfo(global_50_st,10) ;
global_127_do = MarketInfo(global_50_st,9) ;
global_128_do = MarketInfo(global_50_st,11) ;
global_130_do = 0.0 ;
if(iClose(global_50_st,0,1)>0.0)
{
global_130_do = (MathAbs(global_127_do / iClose(global_50_st,0,1) - 1.0)) * 10000.0 ;
}
fun_13();
if(iATR(global_50_st,86400,global_22_in,1) / MarketInfo(global_50_st,9)>global_23_do)
{
global_123_bo = false ;
return;
}
global_123_bo = true ;
}
}
Version 12.3 2024.06.07
void fun_29(int para_0_in)
{
int local_1_in;
//----- -----
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
static double movingAverageDrawdown = 0.0;
static int drawdownPeriod = 14;
static double emergencyStopLimit = 0.2;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxFixedDrawdownLimit = accountEquity * 0.09;
double maxDynamicDrawdownLimit = movingAverageDrawdown * 1.2;
double maxDrawdownLimit = MathMin(maxFixedDrawdownLimit, maxDynamicDrawdownLimit);
double currentDrawdown = accountBalance - accountEquity;
//----- -----
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + 7 * 24 * 60 * 60;
}
static double drawdownHistory[14] = {0};
static int drawdownIndex = 0;
drawdownHistory[drawdownIndex] = currentDrawdown;
drawdownIndex = (drawdownIndex + 1) % drawdownPeriod;
double drawdownSum = 0.0;
for (int i = 0; i < drawdownPeriod; i++) {
drawdownSum += drawdownHistory[i];
}
movingAverageDrawdown = drawdownSum / drawdownPeriod;
if (currentDrawdown / accountEquity >= emergencyStopLimit) {
drawdownPaused = True;
Print("Emergency stop triggered! Drawdown exceeded ", emergencyStopLimit * 100, "%.");
return;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + 24 * 60 * 60;
drawdownPaused = True;
maxDrawdownCheckTime = TimeCurrent() + 7 * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = False;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in,2,48) ;
if(StringLen(global_50_st) != 6)
{
tmp_st_1 = "99";
}
else
{
tmp_st_1 = fun_20(StringSubstr(global_50_st,0,3)) + fun_20(StringSubstr(global_50_st,3,3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st) ;
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in)) ;
global_42_do = LotsMartinp ;
global_18_in = global_19_in ;
if((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != ""))
{
local_1_in=para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2 ;
global_21_do = global_2_a_160_ko[local_1_in].do_3 ;
global_28_do = global_2_a_160_ko[local_1_in].do_4 ;
global_29_do = global_2_a_160_ko[local_1_in].do_5 ;
global_30_in = global_2_a_160_ko[local_1_in].do_6 ;
global_31_do = global_2_a_160_ko[local_1_in].do_7 ;
global_33_do = global_2_a_160_ko[local_1_in].do_8 ;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in)) ;
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in)) ;
global_129_do = MarketInfo(global_50_st,13) ;
global_125_do = MarketInfo(global_50_st,13) * MarketInfo(global_50_st,11) ;
global_126_do = MarketInfo(global_50_st,10) ;
global_127_do = MarketInfo(global_50_st,9) ;
global_128_do = MarketInfo(global_50_st,11) ;
global_130_do = 0.0 ;
if(iClose(global_50_st,0,1)>0.0)
{
global_130_do = (MathAbs(global_127_do / iClose(global_50_st,0,1) - 1.0)) * 10000.0 ;
}
fun_13();
if(iATR(global_50_st,86400,global_22_in,1) / MarketInfo(global_50_st,9)>global_23_do)
{
global_123_bo = false ;
return;
}
global_123_bo = true ;
}
}
Version 11.5 2024.06.07
void fun_29(int para_0_in)
{
int local_1_in;
//----- -----
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
static double movingAverageDrawdown = 0.0;
static int drawdownPeriod = 14;
static double emergencyStopLimit = 0.2;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxFixedDrawdownLimit = accountEquity * 0.09;
double maxDynamicDrawdownLimit = movingAverageDrawdown * 1.2;
double maxDrawdownLimit = MathMin(maxFixedDrawdownLimit, maxDynamicDrawdownLimit);
double currentDrawdown = accountBalance - accountEquity;
//----- -----
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + 7 * 24 * 60 * 60;
}
static double drawdownHistory[14] = {0};
static int drawdownIndex = 0;
drawdownHistory[drawdownIndex] = currentDrawdown;
drawdownIndex = (drawdownIndex + 1) % drawdownPeriod;
double drawdownSum = 0.0;
for (int i = 0; i < drawdownPeriod; i++) {
drawdownSum += drawdownHistory[i];
}
movingAverageDrawdown = drawdownSum / drawdownPeriod;
if (currentDrawdown / accountEquity >= emergencyStopLimit) {
drawdownPaused = True;
Print("Emergency stop triggered! Drawdown exceeded ", emergencyStopLimit * 100, "%.");
return;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + 24 * 60 * 60;
drawdownPaused = True;
maxDrawdownCheckTime = TimeCurrent() + 7 * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = False;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in,2,48) ;
if(StringLen(global_50_st) != 6)
{
tmp_st_1 = "99";
}
else
{
tmp_st_1 = fun_20(StringSubstr(global_50_st,0,3)) + fun_20(StringSubstr(global_50_st,3,3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st) ;
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in)) ;
global_42_do = LotsMartinp ;
global_18_in = global_19_in ;
if((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != ""))
{
local_1_in=para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2 ;
global_21_do = global_2_a_160_ko[local_1_in].do_3 ;
global_28_do = global_2_a_160_ko[local_1_in].do_4 ;
global_29_do = global_2_a_160_ko[local_1_in].do_5 ;
global_30_in = global_2_a_160_ko[local_1_in].do_6 ;
global_31_do = global_2_a_160_ko[local_1_in].do_7 ;
global_33_do = global_2_a_160_ko[local_1_in].do_8 ;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in)) ;
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in)) ;
global_129_do = MarketInfo(global_50_st,13) ;
global_125_do = MarketInfo(global_50_st,13) * MarketInfo(global_50_st,11) ;
global_126_do = MarketInfo(global_50_st,10) ;
global_127_do = MarketInfo(global_50_st,9) ;
global_128_do = MarketInfo(global_50_st,11) ;
global_130_do = 0.0 ;
if(iClose(global_50_st,0,1)>0.0)
{
global_130_do = (MathAbs(global_127_do / iClose(global_50_st,0,1) - 1.0)) * 10000.0 ;
}
fun_13();
if(iATR(global_50_st,86400,global_22_in,1) / MarketInfo(global_50_st,9)>global_23_do)
{
global_123_bo = false ;
return;
}
global_123_bo = true ;
}
}
Version 11.0 2024.06.07
void fun_29(int para_0_in)
{
int local_1_in;
//----- -----
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
static double movingAverageDrawdown = 0.0;
static int drawdownPeriod = 14;
static double emergencyStopLimit = 0.2;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxFixedDrawdownLimit = accountEquity * 0.09;
double maxDynamicDrawdownLimit = movingAverageDrawdown * 1.2;
double maxDrawdownLimit = MathMin(maxFixedDrawdownLimit, maxDynamicDrawdownLimit);
double currentDrawdown = accountBalance - accountEquity;
//----- -----
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + 7 * 24 * 60 * 60;
}
static double drawdownHistory[14] = {0};
static int drawdownIndex = 0;
drawdownHistory[drawdownIndex] = currentDrawdown;
drawdownIndex = (drawdownIndex + 1) % drawdownPeriod;
double drawdownSum = 0.0;
for (int i = 0; i < drawdownPeriod; i++) {
drawdownSum += drawdownHistory[i];
}
movingAverageDrawdown = drawdownSum / drawdownPeriod;
if (currentDrawdown / accountEquity >= emergencyStopLimit) {
drawdownPaused = True;
Print("Emergency stop triggered! Drawdown exceeded ", emergencyStopLimit * 100, "%.");
return;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + 24 * 60 * 60;
drawdownPaused = True;
maxDrawdownCheckTime = TimeCurrent() + 7 * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = False;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in,2,48) ;
if(StringLen(global_50_st) != 6)
{
tmp_st_1 = "99";
}
else
{
tmp_st_1 = fun_20(StringSubstr(global_50_st,0,3)) + fun_20(StringSubstr(global_50_st,3,3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st) ;
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in)) ;
global_42_do = LotsMartinp ;
global_18_in = global_19_in ;
if((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != ""))
{
local_1_in=para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2 ;
global_21_do = global_2_a_160_ko[local_1_in].do_3 ;
global_28_do = global_2_a_160_ko[local_1_in].do_4 ;
global_29_do = global_2_a_160_ko[local_1_in].do_5 ;
global_30_in = global_2_a_160_ko[local_1_in].do_6 ;
global_31_do = global_2_a_160_ko[local_1_in].do_7 ;
global_33_do = global_2_a_160_ko[local_1_in].do_8 ;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in)) ;
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in)) ;
global_129_do = MarketInfo(global_50_st,13) ;
global_125_do = MarketInfo(global_50_st,13) * MarketInfo(global_50_st,11) ;
global_126_do = MarketInfo(global_50_st,10) ;
global_127_do = MarketInfo(global_50_st,9) ;
global_128_do = MarketInfo(global_50_st,11) ;
global_130_do = 0.0 ;
if(iClose(global_50_st,0,1)>0.0)
{
global_130_do = (MathAbs(global_127_do / iClose(global_50_st,0,1) - 1.0)) * 10000.0 ;
}
fun_13();
if(iATR(global_50_st,86400,global_22_in,1) / MarketInfo(global_50_st,9)>global_23_do)
{
global_123_bo = false ;
return;
}
global_123_bo = true ;
}
}
Version 9.9 2024.06.07
void fun_29(int para_0_in)
{
int local_1_in;
//----- -----
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
static double movingAverageDrawdown = 0.0;
static int drawdownPeriod = 14;
static double emergencyStopLimit = 0.2;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxFixedDrawdownLimit = accountEquity * 0.09;
double maxDynamicDrawdownLimit = movingAverageDrawdown * 1.2;
double maxDrawdownLimit = MathMin(maxFixedDrawdownLimit, maxDynamicDrawdownLimit);
double currentDrawdown = accountBalance - accountEquity;
//----- -----
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + 7 * 24 * 60 * 60;
}
static double drawdownHistory[14] = {0};
static int drawdownIndex = 0;
drawdownHistory[drawdownIndex] = currentDrawdown;
drawdownIndex = (drawdownIndex + 1) % drawdownPeriod;
double drawdownSum = 0.0;
for (int i = 0; i < drawdownPeriod; i++) {
drawdownSum += drawdownHistory[i];
}
movingAverageDrawdown = drawdownSum / drawdownPeriod;
if (currentDrawdown / accountEquity >= emergencyStopLimit) {
drawdownPaused = True;
Print("Emergency stop triggered! Drawdown exceeded ", emergencyStopLimit * 100, "%.");
return;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + 24 * 60 * 60;
drawdownPaused = True;
maxDrawdownCheckTime = TimeCurrent() + 7 * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = False;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in,2,48) ;
if(StringLen(global_50_st) != 6)
{
tmp_st_1 = "99";
}
else
{
tmp_st_1 = fun_20(StringSubstr(global_50_st,0,3)) + fun_20(StringSubstr(global_50_st,3,3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st) ;
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in)) ;
global_42_do = LotsMartinp ;
global_18_in = global_19_in ;
if((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != ""))
{
local_1_in=para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2 ;
global_21_do = global_2_a_160_ko[local_1_in].do_3 ;
global_28_do = global_2_a_160_ko[local_1_in].do_4 ;
global_29_do = global_2_a_160_ko[local_1_in].do_5 ;
global_30_in = global_2_a_160_ko[local_1_in].do_6 ;
global_31_do = global_2_a_160_ko[local_1_in].do_7 ;
global_33_do = global_2_a_160_ko[local_1_in].do_8 ;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in)) ;
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in)) ;
global_129_do = MarketInfo(global_50_st,13) ;
global_125_do = MarketInfo(global_50_st,13) * MarketInfo(global_50_st,11) ;
global_126_do = MarketInfo(global_50_st,10) ;
global_127_do = MarketInfo(global_50_st,9) ;
global_128_do = MarketInfo(global_50_st,11) ;
global_130_do = 0.0 ;
if(iClose(global_50_st,0,1)>0.0)
{
global_130_do = (MathAbs(global_127_do / iClose(global_50_st,0,1) - 1.0)) * 10000.0 ;
}
fun_13();
if(iATR(global_50_st,86400,global_22_in,1) / MarketInfo(global_50_st,9)>global_23_do)
{
global_123_bo = false ;
return;
}
global_123_bo = true ;
}
}
Version 9.0 2024.06.07
void fun_29(int para_0_in)
{
int local_1_in;
//----- -----
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
static double movingAverageDrawdown = 0.0;
static int drawdownPeriod = 14;
static double emergencyStopLimit = 0.2;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxFixedDrawdownLimit = accountEquity * 0.09;
double maxDynamicDrawdownLimit = movingAverageDrawdown * 1.2;
double maxDrawdownLimit = MathMin(maxFixedDrawdownLimit, maxDynamicDrawdownLimit);
double currentDrawdown = accountBalance - accountEquity;
//----- -----
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + 7 * 24 * 60 * 60;
}
static double drawdownHistory[14] = {0};
static int drawdownIndex = 0;
drawdownHistory[drawdownIndex] = currentDrawdown;
drawdownIndex = (drawdownIndex + 1) % drawdownPeriod;
double drawdownSum = 0.0;
for (int i = 0; i < drawdownPeriod; i++) {
drawdownSum += drawdownHistory[i];
}
movingAverageDrawdown = drawdownSum / drawdownPeriod;
if (currentDrawdown / accountEquity >= emergencyStopLimit) {
drawdownPaused = True;
Print("Emergency stop triggered! Drawdown exceeded ", emergencyStopLimit * 100, "%.");
return;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + 24 * 60 * 60;
drawdownPaused = True;
maxDrawdownCheckTime = TimeCurrent() + 7 * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = False;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in,2,48) ;
if(StringLen(global_50_st) != 6)
{
tmp_st_1 = "99";
}
else
{
tmp_st_1 = fun_20(StringSubstr(global_50_st,0,3)) + fun_20(StringSubstr(global_50_st,3,3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st) ;
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in)) ;
global_42_do = LotsMartinp ;
global_18_in = global_19_in ;
if((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != ""))
{
local_1_in=para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2 ;
global_21_do = global_2_a_160_ko[local_1_in].do_3 ;
global_28_do = global_2_a_160_ko[local_1_in].do_4 ;
global_29_do = global_2_a_160_ko[local_1_in].do_5 ;
global_30_in = global_2_a_160_ko[local_1_in].do_6 ;
global_31_do = global_2_a_160_ko[local_1_in].do_7 ;
global_33_do = global_2_a_160_ko[local_1_in].do_8 ;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in)) ;
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in)) ;
global_129_do = MarketInfo(global_50_st,13) ;
global_125_do = MarketInfo(global_50_st,13) * MarketInfo(global_50_st,11) ;
global_126_do = MarketInfo(global_50_st,10) ;
global_127_do = MarketInfo(global_50_st,9) ;
global_128_do = MarketInfo(global_50_st,11) ;
global_130_do = 0.0 ;
if(iClose(global_50_st,0,1)>0.0)
{
global_130_do = (MathAbs(global_127_do / iClose(global_50_st,0,1) - 1.0)) * 10000.0 ;
}
fun_13();
if(iATR(global_50_st,86400,global_22_in,1) / MarketInfo(global_50_st,9)>global_23_do)
{
global_123_bo = false ;
return;
}
global_123_bo = true ;
}
}
Version 7.5 2024.06.03
Version 7.9 2024.06.06
void fun_29(int para_0_in)
{
int local_1_in;
//----- -----
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
static double movingAverageDrawdown = 0.0;
static int drawdownPeriod = 14;
static double emergencyStopLimit = 0.2;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxFixedDrawdownLimit = accountEquity * 0.09;
double maxDynamicDrawdownLimit = movingAverageDrawdown * 1.2;
double maxDrawdownLimit = MathMin(maxFixedDrawdownLimit, maxDynamicDrawdownLimit);
double currentDrawdown = accountBalance - accountEquity;
//----- -----
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + 7 * 24 * 60 * 60;
}
static double drawdownHistory[14] = {0};
static int drawdownIndex = 0;
drawdownHistory[drawdownIndex] = currentDrawdown;
drawdownIndex = (drawdownIndex + 1) % drawdownPeriod;
double drawdownSum = 0.0;
for (int i = 0; i < drawdownPeriod; i++) {
drawdownSum += drawdownHistory[i];
}
movingAverageDrawdown = drawdownSum / drawdownPeriod;
if (currentDrawdown / accountEquity >= emergencyStopLimit) {
drawdownPaused = True;
Print("Emergency stop triggered! Drawdown exceeded ", emergencyStopLimit * 100, "%.");
return;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + 24 * 60 * 60;
drawdownPaused = True;
maxDrawdownCheckTime = TimeCurrent() + 7 * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = False;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in,2,48) ;
if(StringLen(global_50_st) != 6)
{
tmp_st_1 = "99";
}
else
{
tmp_st_1 = fun_20(StringSubstr(global_50_st,0,3)) + fun_20(StringSubstr(global_50_st,3,3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st) ;
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in)) ;
global_42_do = LotsMartinp ;
global_18_in = global_19_in ;
if((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != ""))
{
local_1_in=para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2 ;
global_21_do = global_2_a_160_ko[local_1_in].do_3 ;
global_28_do = global_2_a_160_ko[local_1_in].do_4 ;
global_29_do = global_2_a_160_ko[local_1_in].do_5 ;
global_30_in = global_2_a_160_ko[local_1_in].do_6 ;
global_31_do = global_2_a_160_ko[local_1_in].do_7 ;
global_33_do = global_2_a_160_ko[local_1_in].do_8 ;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in)) ;
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in)) ;
global_129_do = MarketInfo(global_50_st,13) ;
global_125_do = MarketInfo(global_50_st,13) * MarketInfo(global_50_st,11) ;
global_126_do = MarketInfo(global_50_st,10) ;
global_127_do = MarketInfo(global_50_st,9) ;
global_128_do = MarketInfo(global_50_st,11) ;
global_130_do = 0.0 ;
if(iClose(global_50_st,0,1)>0.0)
{
global_130_do = (MathAbs(global_127_do / iClose(global_50_st,0,1) - 1.0)) * 10000.0 ;
}
fun_13();
if(iATR(global_50_st,86400,global_22_in,1) / MarketInfo(global_50_st,9)>global_23_do)
{
global_123_bo = false ;
return;
}
global_123_bo = true ;
}
}
Version 7.5 2024.06.03
void fun_29(int para_0_in)
{
int local_1_in;
//----- -----
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
static double movingAverageDrawdown = 0.0;
static int drawdownPeriod = 14;
static double emergencyStopLimit = 0.2;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxFixedDrawdownLimit = accountEquity * 0.09;
double maxDynamicDrawdownLimit = movingAverageDrawdown * 1.2;
double maxDrawdownLimit = MathMin(maxFixedDrawdownLimit, maxDynamicDrawdownLimit);
double currentDrawdown = accountBalance - accountEquity;
//----- -----
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + 7 * 24 * 60 * 60;
}
static double drawdownHistory[14] = {0};
static int drawdownIndex = 0;
drawdownHistory[drawdownIndex] = currentDrawdown;
drawdownIndex = (drawdownIndex + 1) % drawdownPeriod;
double drawdownSum = 0.0;
for (int i = 0; i < drawdownPeriod; i++) {
drawdownSum += drawdownHistory[i];
}
movingAverageDrawdown = drawdownSum / drawdownPeriod;
if (currentDrawdown / accountEquity >= emergencyStopLimit) {
drawdownPaused = True;
Print("Emergency stop triggered! Drawdown exceeded ", emergencyStopLimit * 100, "%.");
return;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + 24 * 60 * 60;
drawdownPaused = True;
maxDrawdownCheckTime = TimeCurrent() + 7 * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = False;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in,2,48) ;
if(StringLen(global_50_st) != 6)
{
tmp_st_1 = "99";
}
else
{
tmp_st_1 = fun_20(StringSubstr(global_50_st,0,3)) + fun_20(StringSubstr(global_50_st,3,3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st) ;
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in)) ;
global_42_do = LotsMartinp ;
global_18_in = global_19_in ;
if((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != ""))
{
local_1_in=para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2 ;
global_21_do = global_2_a_160_ko[local_1_in].do_3 ;
global_28_do = global_2_a_160_ko[local_1_in].do_4 ;
global_29_do = global_2_a_160_ko[local_1_in].do_5 ;
global_30_in = global_2_a_160_ko[local_1_in].do_6 ;
global_31_do = global_2_a_160_ko[local_1_in].do_7 ;
global_33_do = global_2_a_160_ko[local_1_in].do_8 ;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in)) ;
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in)) ;
global_129_do = MarketInfo(global_50_st,13) ;
global_125_do = MarketInfo(global_50_st,13) * MarketInfo(global_50_st,11) ;
global_126_do = MarketInfo(global_50_st,10) ;
global_127_do = MarketInfo(global_50_st,9) ;
global_128_do = MarketInfo(global_50_st,11) ;
global_130_do = 0.0 ;
if(iClose(global_50_st,0,1)>0.0)
{
global_130_do = (MathAbs(global_127_do / iClose(global_50_st,0,1) - 1.0)) * 10000.0 ;
}
fun_13();
if(iATR(global_50_st,86400,global_22_in,1) / MarketInfo(global_50_st,9)>global_23_do)
{
global_123_bo = false ;
return;
}
global_123_bo = true ;
}
}
Version 7.1 2024.06.02
void fun_29(int para_0_in)
{
int local_1_in;
//----- -----
string tmp_st_1;
string tmp_st_2;
string tmp_st_3;
static datetime maxDrawdownStartTime = 0;
static datetime maxDrawdownEndTime = 0;
static bool drawdownPaused = False;
static datetime maxDrawdownCheckTime = 0;
static double movingAverageDrawdown = 0.0;
static int drawdownPeriod = 14;
static double emergencyStopLimit = 0.2;
double accountBalance = AccountBalance();
double accountEquity = AccountEquity();
double maxFixedDrawdownLimit = accountEquity * 0.09;
double maxDynamicDrawdownLimit = movingAverageDrawdown * 1.2;
double maxDrawdownLimit = MathMin(maxFixedDrawdownLimit, maxDynamicDrawdownLimit);
double currentDrawdown = accountBalance - accountEquity;
//----- -----
if (maxDrawdownCheckTime == 0) {
maxDrawdownCheckTime = TimeCurrent() + 7 * 24 * 60 * 60;
}
static double drawdownHistory[14] = {0};
static int drawdownIndex = 0;
drawdownHistory[drawdownIndex] = currentDrawdown;
drawdownIndex = (drawdownIndex + 1) % drawdownPeriod;
double drawdownSum = 0.0;
for (int i = 0; i < drawdownPeriod; i++) {
drawdownSum += drawdownHistory[i];
}
movingAverageDrawdown = drawdownSum / drawdownPeriod;
if (currentDrawdown / accountEquity >= emergencyStopLimit) {
drawdownPaused = True;
Print("Emergency stop triggered! Drawdown exceeded ", emergencyStopLimit * 100, "%.");
return;
}
if (currentDrawdown >= maxDrawdownLimit && !drawdownPaused && TimeCurrent() >= maxDrawdownCheckTime) {
maxDrawdownStartTime = TimeCurrent();
maxDrawdownEndTime = TimeCurrent() + 24 * 60 * 60;
drawdownPaused = True;
maxDrawdownCheckTime = TimeCurrent() + 7 * 24 * 60 * 60;
}
if (TimeCurrent() >= maxDrawdownEndTime && drawdownPaused) {
drawdownPaused = False;
maxDrawdownStartTime = 0;
maxDrawdownEndTime = 0;
}
if (!drawdownPaused) {
global_93_st = IntegerToString(para_0_in,2,48) ;
if(StringLen(global_50_st) != 6)
{
tmp_st_1 = "99";
}
else
{
tmp_st_1 = fun_20(StringSubstr(global_50_st,0,3)) + fun_20(StringSubstr(global_50_st,3,3));
}
global_26_in = StringToInteger(tmp_st_1 + global_93_st) ;
global_25_in = GlobalVariableGet(string(IsTesting()) + "Magic" + global_50_st + string(global_26_in)) ;
global_42_do = LotsMartinp ;
global_18_in = global_19_in ;
if((global_3_in != 1 || StringTrimLeft(StringTrimRight(global_4_st)) != ""))
{
local_1_in=para_0_in - 1;
global_18_in = global_2_a_160_ko[local_1_in].in_2 ;
global_21_do = global_2_a_160_ko[local_1_in].do_3 ;
global_28_do = global_2_a_160_ko[local_1_in].do_4 ;
global_29_do = global_2_a_160_ko[local_1_in].do_5 ;
global_30_in = global_2_a_160_ko[local_1_in].do_6 ;
global_31_do = global_2_a_160_ko[local_1_in].do_7 ;
global_33_do = global_2_a_160_ko[local_1_in].do_8 ;
}
global_14_in = GlobalVariableGet(string(IsTesting()) + "NUMBER" + global_50_st + string(global_26_in)) ;
global_69_do = GlobalVariableGet(string(IsTesting()) + "Distance_Price" + global_50_st + string(global_26_in)) ;
global_129_do = MarketInfo(global_50_st,13) ;
global_125_do = MarketInfo(global_50_st,13) * MarketInfo(global_50_st,11) ;
global_126_do = MarketInfo(global_50_st,10) ;
global_127_do = MarketInfo(global_50_st,9) ;
global_128_do = MarketInfo(global_50_st,11) ;
global_130_do = 0.0 ;
if(iClose(global_50_st,0,1)>0.0)
{
global_130_do = (MathAbs(global_127_do / iClose(global_50_st,0,1) - 1.0)) * 10000.0 ;
}
fun_13();
if(iATR(global_50_st,86400,global_22_in,1) / MarketInfo(global_50_st,9)>global_23_do)
{
global_123_bo = false ;
return;
}
global_123_bo = true ;
}
}
Version 7.0 2024.06.01
In the new update of the Orion Intelligence System,

I implemented new privacy measures against scammers and those who attempt to crack my EA.

If they try to crack it and use it on their live account,

it will generate errors. We worked on this EA for over three years, dedicating a lot of time to its development,

so that traders who are struggling with their trades can benefit from it.
Version 5.9 2024.05.31
MultiCurrency Mode separated by comma (Limit to 9)
Version 5.5 2024.05.28
MultiCurrency Mode separated by comma (Limit to 9)
Version 5.0 2024.05.28
MultiCurrency Mode separated by comma (Limit to 9)
Version 3.9 2024.05.27

In the new update of the Orion Intelligence System,
I implemented new privacy measures against scammers and those who attempt to crack my EA.
If they try to crack it and use it on their live account,
it will generate errors. We worked on this EA for over three years, dedicating a lot of time to its development,
so that traders who are struggling with their trades can benefit from it.






Version 3.5 2024.05.26
The latest update (v3.5) of our EA brings critical changes to the setting of stoploss for both OP_SELL and OP_BUY orders. In this update, we have optimized the setting of stoploss by adjusting their values to provide better protection against unexpected market movements. This update enhances safety and security for our clients while they engage in forex trading.
Version 3.0 2024.05.25
The latest update (v3.0) of our EA brings critical changes to the setting of stoploss for both OP_SELL and OP_BUY orders. In this update, we have optimized the setting of stoploss by adjusting their values to provide better protection against unexpected market movements. This update enhances safety and security for our clients while they engage in forex trading.
Version 1.7 2024.05.17
The latest update (v1.7) of our EA brings critical changes to the setting of stoploss for both OP_SELL and OP_BUY orders. In this update, we have optimized the setting of stoploss by adjusting their values to provide better protection against unexpected market movements. This update enhances safety and security for our clients while they engage in forex trading.
Version 1.5 2024.05.17
The latest update (v1.5) of our EA brings critical changes to the setting of stoploss for both OP_SELL and OP_BUY orders. In this update, we have optimized the setting of stoploss by adjusting their values to provide better protection against unexpected market movements. This update enhances safety and security for our clients while they engage in forex trading.