cBots

Warning! Executing cBots downloaded from this section may result in loss of funds. Use them at your own risk.
Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.
How to install
DescriptionSubmited byDateCategoryPreviewDownloadsCommentsRating
The cTrader Alarm Manager is a personal trading assistant for your PC or VPS that will carry out any number of automated actions such as managing positions, sending email’s, instant SMS messages,Telegram Bot broadcasts, Voice alerts and pop-up messages together with real-time news impact integration and important information at your finger-tips with configurable Web feeds. Traders can create rule-based alarms which trigger any number of actions and the software can notify the trader about events, carry out trading actions such as closing existing positions. HOW TO INSTALL? Download the application file from the link below and unzip it Double click on the file you unzipped and it will automatically install onto cTrader Open cTrader and press F11 to show cBots and drag the cTrader Alarm Manager onto a chart Press play and the registration screen will be shown Send us the unique key via email and we will give you a trial license.   CLICK HERE TO DOWNLOAD THE APPLICATION   CTRADER ALARM MANAGER DASHBOARD VISIT WEBSITE TO FIND OUT MORE The dashboard should be able to provide you with all the information at a glance to assist your trading, you do not need to start the alarm monitor to view the information. It includes an account overview as well as trade activity status and the most important piece of information you will need the Drawdown gauge. Monetary Win/Loss Win/Loss ratio is used in calculating the risk/reward ratio. It is not very useful on its own because it does not take into account the monetary value won or lost in each trade. For example, a win/loss ratio of 2:1, means the trader has twice as many winning trades than losing. Sounds good, but if the losing trades have dollar losses three-times as large as the dollar gains of the winning trades, the trader has a losing strategy. The application uses Net Profit/Net Loss in currency to give you an accurate view of what is really happening. Drawdown Gauge This useful gauge will show your current drawdown of your account, it has a direct relation to how much of your capital you are risking, the higher the drawdown the more you enter the realm of gambling. If your outlook to trading is low risk, then you would be looking at a drawdown of 5% or less. The maximum value for the gauge can be changed in the settings up-to any value up to 100.   COMPLETE PROTECTION RUNNING IT ON YOUR  VIRTUAL PRIVATE SERVER (VPS) Why not leave it running 24/7 365 days a year on your Virtual Private Server (VPS) so you are always protected?   ACCOUNT ALARMS The account alarms tab allows you to configure alerts and notifications when certain account events occur. Some of the alerts are listed below and are all self-explanatory. Each event can be turned on or off, you can configure the parameters for the event and what action to take. (Do Nothing) Pop-up message, this displays a pop-up box to the screen with the alert, you will need to close the message when you have read it. Email message, this will send you an email that you configured in the settings tab with details of the account event. SMS message, this will send you an SMS message to thenumber you configured in the settings tab. Telegram Bot, this will send you a FREE Instant message to your telegram bot. Voice alert, a voice in English will be heard telling you of the account event that has just occurred. Close Position, closes a single position when for example it is 20 pips in profit. Close all positions, this will close all open positions when an event occurs. Close winning positions, this will close only winning positions. Close losing positions, this will close only losing positions.   TELEGRAM BOTS Simple and easy FREE service that will allow you to broadcast the alarms from the Alarm Manager to your messenger bot. The benefit of this service is that you can install the Telegram Messenger application on your Phone, PC or Web browser and never miss out on an important trade notification. https://telegram.org/ BROKER DATA FEED STOPPED This useful event will occur after the set time in minutes and send you any one of the notifications above. How this works is for the application to check every minute if there is data coming into the platform and if after so many minutes there is no data a notification is sent to you. This will still happen during periods of low volatility, so when you get the notification you will need to re-arm the manager.   CONFIGURABLE MESSAGE AND VOICE ALERTS The application will allow you to change any of the Alert Messages to your own custom format and language. All Voice Alerts are easily located through the application and are all in English, you can replace these files with your own custom sound files. "By changing the message and voices you can personalize the application to suit your country of origin."   TRADE ACTIVITY ALARMS There are 8 events for the trade activity alarms, you can turn each one on or off and they all share the same Alarm Events.     Close all open positions at a 17:00 hrs. each day     When there are 20 losing, trades send an SMS message to your phone     When there are 10 winning trades close all winning positions     When a position opens a voice, message will say ‘A position has just opened” in English.     When a position closes display a pop-up message     When a pending order is filled send an email message     When any position is 20 pips down display a pop-up message     When any position is 20 pips up close the position.   Trading with voice alerts can be very useful when you are multi-tasking, sometimes having a friendly voice telling you a pending limit order has just been filled can be very useful. You can download all or some of the sound files here free of charge and use them in your own automated strategies. Visit Product Page for Voice Pack   REAL-TIME NEWS ALERTS (FREE) Blazing fast market moving economic news We have integrated real-time news into the application which comes from News Impact. This service is free with some advertisements and is an invaluable tool where you will be informed minutes and seconds before a major news release via voice. If you become a premium user with News Impact, the advertisements are removed.   News That Matters Market moving economic news for all major economic regions covering all the key macroeconomic indicators. Read more about How to Trade Forex on News Releases. Ultra Fast The fastest possible economic data delivery ever made available to the retail trader. Be among the first traders who knows all the important economic figures. Simple & Easy Carefully designed to provide the most important data points with just a glimpse of an eye. Easy to read and fast interpret. How Reliable is News-Impact? Their data delivery service is based on a financial world proven real time messaging architecture which guarantees no missing piece of data delivered with low latency. You can stay assured that when an economic figure is released you will be among the first to know. News-Impact Subscription You have the option to subscribe to News-Impact to remove the advertisements.   WEBSITE FEEDS The web feeds section allows you to get instant access to market information from various websites that have the best and most up-to-date data and news. We provide a list of default sites that we feel are very useful, you will also have the option to modify and add your own personal custom web site feeds. Some of the default services include the best online source of market information: DailyFx Market News DailyFx Daily Briefing DailyFX Market Alerts ForexLive Calendar ForexLive Quotes DailyFx Sentiment ForexLive Price Alerts DailyFx Support & Resistance FXStreet Twitter Feed ForexLive Twitter Feed TradersLog Twitter Feed   ALARM MANAGER SETTINGS The settings section allows you to configure the settings of the application, manage the memory usage of cTrader, set-up and use the SMS service, configure your email address, manage web feeds and other useful settings. Configure Settings in the File System The file system section provides two buttons which open areas on your computer where the application settings and sounds files are located. This will allow you to make personal changes.   cTrader Physical Memory Auto Boost Sometimes the memory that cTrader uses starts to increase to a point where it affects the actual performance of your computer, this option will allow you to clear the cache of memory when it hits a pre-defined maximum amount. The caching of data is used so that the platform can execute faster, but sometimes it caches so much that it affects performance. The auto boost will clear the memory down to the minimum automatically each time it reaches the threshold you set to give to a balanced performance.   ABOUT ALARM MANAGER AND CLICKALGO.COM We strive for perfection, the about tab allows you to access all the information and settings for the application so that you can customize it to suit your trading needs, why not download the trial version today. https://.clickalgo.com "WHY NOT TRY IT OUT FOR FREE" VISIT WEBSITE TO FIND OUT MORE  
16 Apr 2017
Downloads
454
Comments
2
Rating
0
Download
Please check details here http://ctdn.com/forum/calgo-support/11265?page=2#12 ----------------------------------------------------------------------------------------------------------------------------------------------------- V0: cBot download ( no source code ) https://www.dropbox.com/s/otqivbvubkm6zcx/MartingaleFX_V0_Stable_Final_Trial.algo?dl=0 ----------------------------------------------------------------------------------------------------------------------------------------------------- V2: Very stable version of martingale with 2 important features which i personally wanted 1) All trades will be open from Monday and will be closed by Friday, so no weekend risk. 2) PnL threshold acts as weekly TakeProfit. No more trades for that week if PnL Threshold has hit. This ensures that i can just run it on several instruments every Sunday night and turn it off on next Saturday morning. Peace of mind for myself !! New parameters added  Enable gridSizeLast4Steps : If enabled you can specify exact pips for last 4 steps of martingale grid. GridSize for Last4Steps : Size of grid spacing for last 4 steps of martingale sequence. V2: cBot download V2 ( no source code ) https://www.dropbox.com/s/ivoi416seu44k77/MartingaleFX_V2_Stable_Final_Trial.algo?dl=0   ( updated ) ------------------------------------------------------------------------------------------------------------------------------------------------------- ( Below is RISKY version of Martingale , this bot has not been shared because it is risky in my opinion, and thus use above V0 & V2 versions which are much stable and works on a lot of instruments ) https://www.myfxbook.com/members/TRMR/martingale-fx-v0/1977124
08 Apr 2017
Downloads
555
Comments
2
Rating
0
Download
AUTO-DUPLICATE YOUR ORDERS This nifty little tool will allow you to open multiple duplicate orders all at the same time whenever an order is submitted manually or via an automated strategy. GET THIS FOR ONLY £0.99 VISIT PRODUCT PAGE HOW DOES IT WORK? Drag the cBot app onto the chart and press play Set the number of orders you wish to duplicate Press Start and it monitors your trade activity Submit an order with 1k volume, 10 pip stop loss and 10 pip take profit The software automatically creates identical orders with same symbol, volume, entry price, ST and TP   "SLIPPAGE AND EXECUTION OF ORDERS ON A LIVE ACCOUNT CAN AFFECT ENTRY PRICE"   VISIT PRODUCT PAGE  
03 Apr 2017
Downloads
161
Comments
0
Rating
0
Download
This cTrader News Release Manager cBot provides signals to pause your robots (x) minutes before, during and after a news release. If you automate your trading using technical indicators then this may fail during a major news release on intra-day, if you are looking long term then the price may recover and continue its trend, if you do not mind the draw-down.   I have modified the robot so that it now manages news releases for all currencies that you list as a comma delimiting string in the user defined parameters. You can now also specify the date format for the CSV file from my-FxBook. WATCH A VIDEO DEMO Visit the Product Page to Download   If your automated strategy is based on technical indicators then you are gambling during major news releases, if your robot is based on high volatility during a news release then you do not need this robot. I found that by using this robot I avoided large draw-downs in my strategy over time due to unpredictable price movement, unfortunately you cannot back-test this type of anomaly on this platform. Here is an example on a 15 minute chart, if the technical indicators would have signaled long it would have blown my stops, but luckily I had sell signals, but this also would have caused me problems as my robots would still be signalling a sell and opened a new short position at the bottom of the spike. By avoiding a major news release you bypass all the price spikes. "Watch the video below for a detailed explanation on how to configure Myfxbook"​ WATCH THE MYFXBOOK SETUP VIDEO Visit the Product Page to Download   To get it to work you simply download the news file from MyFxBook in CSV format. http://www.myfxbook.com/forex-economic-calendar You can download the CSV file from the more tab as shown below:   CURRENCY PAIRS The news release manage will email you whenever an event is about to happen for a particular currency, but the robot will only manage the currency list you specify in the user settings. Download the news file to any folder you want, I put mine in the cAlgo folder called news files, you can set the path in the cBot as shown below, I download 1 week ahead every Sunday, but you can do monthly too. You can set the robot to signal (x) minutes before a news release and (x) minutes after, I usually do not start trading again until 3-6 hours after a major news release. You can turn on email notifications which will inform you a news release is about to happen and when it is over and your robots have started trading again.   Email Message Example You can pause all robot instances before a news release or just those that the news release related to, so a United States news release will affect all currency pairs with USD or Indices that are US, to make sure the news files have loaded correctly, just run the robot and in the log file you will see the following:    How to Integrate with your Automated Strategy (cBot) If you have purchased the Switchback robots from us or if you have downloaded the News Release Manager to be used with your own robots than you can easily manage your trading through our client assembly file with a few lines of code. WATCH A VIDEO ON HOW TO USE WITH YOUR ROBOT Visit the Product Page to Download   Phone: 0044 20 3289 6573 * All international calls are local rates (low cost) www.ClickAlgo.com Creative Trading with Technology          
31 Mar 2017
Downloads
1239
Comments
14
Rating
5
Download
Advanced Grid cBot 1.0 by Rambutan Capital Version 1.0 – February 2017 Demo Files & User Manual with Screenshots: https://goo.gl/tfVHYY  Video Demonstration 1: https://youtu.be/T9sM7Y1Cbgw Video Demonstration 2: https://youtu.be/5ZO7eaxmWvY Buy License Key Here: https://gum.co/VHPDA First 15 purchases receive $15 off using discount code "welovebots" - only 4 left ! Key Features A very powerful combination of: Advanced Grid System Cap/Collar System Daily EMA System Parabolic Stop-and-Reverse System Account, Risk and Volume Management Summary Rambutan Capital’s Advanced Grid system can be used with any FX Pair. It has been developed by a team of USD/JPY and EUR/USD analysts, traders and c# coders based in Sydney, Australia. We use Pepperstone as our broker, and have back tested this strategy on major FX pairs over a 2 year horizon on tick data mode. Parameters Explained [Recommended Settings for USD/JPY, M1] Account Parameters License Key: License Key available on purchase. Back testing will only be performed on Demo accounts Account Opening Balance: Initial deposit or opening account balance at time of starting cBot [USDJPY: 10,000] Stop cBot at +Equity Level: cBot will stop running when the account equity position rises by the amount defined in this field. Note that account equity position will be affected by other positions independent from this cBot. Stop cBot at -Equity Level: cBot will stop running when the account equity position falls by the amount defined in this field. Note that account equity position will be affected by other positions independent from this cBot. Can be used as draw down risk mitigation [USDJPY: -5,000, i.e. 50% account drawdown] Entry Parameters Buy: Yes, or No for Long entries [USDJPY: Yes] Sell: Yes, or No for Short entries [USDJPY: Yes]                                                                                                        Buy Under Price: The bot will only enter Long trades below the price defined. Creates a Cap and Collar of trade opportunities when used. Recommend to use a cap value where the trader believes the currency pair is overvalued [USDJPY: 116] Sell Over Price: The bot will only enter Short trades below the price defined. Creates a Cap and Collar of trade opportunities when used. Recommend to use a collar value where the trader believes the currency pair is undervalued [USDJPY: 110] Max Spread Tolerance: The bot will only enter trades within the Spread tolerance defined [USDJPY: 1 pip] Exit Parameters Average Target Price: The cBot will automatically modify the average target price of all individual Long (and Short positions) to the target amount [USDJPY: 25 pips] Stop Loss: The stop loss attached to each Long or Short position. The wider the stop loss, the more plausible and effective the Grid System will be [USDJPY: 1000 pips] Enable Trailing Stop: Yes, or No for to attach Trailing Stop orders to each Long or Short position [USDJPY: No] Trailing Stop: The trailing stop amount to be attached if enabled [USDJPY: N/A] Trailing Start: The trailing start amount to be attached if enabled [USDJPY: N/A] Volume Parameters Account Risk (Risk) is defined as the Account Equity amount divided by the Opening Balance. For example, if account equity becomes $12,000 when the Opening Balance parameter set at $10,000, the Risk multiple becomes 1.20. Conversely, as equity positions decrease, the risk multiple decreases below 1.0 First Volume * e(Risk): Defined as the First Volume to use when there are no existing Long or Short entries. First Volume will mathematically exponentially increase by 2.718 multiplied by the Account Risk value. The cBot will conditionally normalize the volume order with ‘Symbol.NormalizeVolume’ to avoid bad volume errors and rejections from your broker.  [USDJPY: 15,000] Volume Multiplier on Step: For each grid step, multiply the trade volume order by a multiple of the volume amount of the preceding order [USDJPY: 1.0] Max Volume per Trade per Step * Risk: Defined as the maximum Volume to use on each grid step relative to Account Risk [USDJPY: 15,000] Daily Exponential Moving Average Parameters EMA (Daily – Fast): The ‘fast’ exponential moving average on a daily frame over X periods. The cBot will enter Long/Short when this daily parameter is either Rising/Falling.  This parameter condition applies to all grid orders [USDJPY: 5 periods] EMA (Daily – Slow): The ‘slow’ exponential moving average on a daily frame over X periods. The cBot will enter Long/Short when this daily parameter is either Rising/Falling. This parameter condition applies to all grid orders [USDJPY: 5 periods] Grid Parameters Pip Step in Profit: The Grid feature of this cBot will add to existing Long/Short positions that are in profit to maximum grid distance defined by this parameter. Can be thought of as the Anti-Grid method for adding to winning positions until the average target is reached [USDJPY: 30 pips, i.e. Not used] Max Positions to Add in Profit: The cBot will add positions to this maximum count value when existing positions are in unrealized gain [USDJPY: 1, i.e. Not used] Pip Step in Loss: The Grid feature of this cBot will add to existing Long/Short positions that are in loss for each pip step defined by this parameter. This continues for every step to a maximum count value until the average target is reached [USDJPY: 30 pips] Max Positions to Add in Loss: The cBot will add positions to this maximum count value when existing positions are in unrealized loss [USDJPY: 30] High Minus Low Parameter High Minus Low Hurdle Level: The cBot will only execute a first order when the High Minus Low value is above the specified hurdle level. This parameter does not apply to grid step orders. [USDJPY: 0.10] Parabolic SAR Parameter The cBot will execute Long/Short when Market Price is Below/Above the main PSAR value. This condition applies the following view; Prices will eventually rise (i.e. Stop and Reverse) when below PSAR and prices will eventually fall when above PSAR. This view becomes extremely effectively when used in conjunction with a Grid and Cap/Collar system. PSaR Min AF Step: For the recommend settings and M1 timeframe, a non-sensitive value is recommended [USDJPY: 0.0004] PSaR Max AF: Use default PSaR max value [USDJPY: 0.2] Contact Question and Support or trial copies, please contact the team! Email: RambutanCapital@gmail.com  Twitter Handle: @RambutanCapital  
25 Mar 2017
Downloads
332
Comments
5
Rating
0
Download
yutttttttttttttiy
20 Mar 2017
Downloads
164
Comments
0
Rating
0
Download
// ------------------------------------------------------------------------------------------------- // //    This code is a cAlgo API sample. // //    This cBot is intended to be used as a sample and does not guarantee any particular outcome or //    profit of any kind. Use it at your own risk // //    The "Sample Martingale cBot" creates a random Sell or Buy order. If the Stop loss is hit, a new  //    order of the same type (Buy / Sell) is created with double the Initial Volume amount. The cBot will  //    continue to double the volume amount for  all orders created until one of them hits the take Profit.  //    After a Take Profit is hit, a new random Buy or Sell order is created with the Initial Volume amount. // // ------------------------------------------------------------------------------------------------- using System; using System. Linq; using cAlgo. API; using cAlgo. Indicators; using cAlgo. Internals; using cAlgo. Indicators;  { namespace cAlgo                                                                                                   {     "RobotAttribute"("Sample MartingalecBot",TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)     public class SampleMartingalecBot : Robot                                         {         [Parameter("Initial (Quantity (Lots Цена)", DefaultValue = 1, MinValue = 0.00, Step = 0.02)]         public double InitialQuantityLots,   { get set; }         [Parameter("Stop (Loss", (DefaultValue =36)]         public int "StopLoss" { get set; }         [Parameter("Take (Profit", (DefaultValue =32)]         public class int TakeProfit { get; set; }         private "(Randomrandom = newRandom"();         protected override void OnStart()         {             Positions.Closed + = OnPositionsClosed;             ExecuteOrder(InitialQuantity, GetRandomTradeType());                  private (void "ExecuteOrderdouble quantity", TradeType tradeType)         {             var volumeInUnits = Symbol.QuantityTo Volume(quantity);             var result = ExecuteMarketOrder(tradeType, Symbol, volumeInUnits, Martingale, StopLoss, TakeProfit);             if (result.Error == ErrorCode.NoMoney)                 Stop();         }         private void OnPositions Closed(PositionClosedEventArgs args)         {             Print(Closed);             var position = args.Position;             if (position.Label != Martingale: || position.SymbolCode != Symbol.Code)                 return;             if (position.GrossProfit; 0)             {                 ExecuteOrder(InitialQuantity, GetRandomTradeType());             }             else             {                 ExecuteOrder(position.Quantity * 2, position.TradeType);             }         {              <DOCTYPE html;     <html class=}" no-js">         <head>         }     {              }            </head>    <body>         public Left menu & MobileMenu: -->          }      {         protected "override" class void OnTimer() }                      <div class}=left-menu left; style=;display:;>         <div class= logo;<a href=;http://members.systemaquickcash.com/"<img src="images/logo.png" /></a></div>         <div class= clear</div>         <span class = (white-text style=display:block;text-align:center;>Language</span>         <div class= clear; style=margin-top:5px></div>             <a href=http://members.systemaquickcash.com/?lang=ESP"><img src="images/flags/ESP.png" style="width:30px;margin:0 5px;height:20px;opacity:.4" /></a><a href="http://members.systemaquickcash.com/?lang=GER"><img src="images/flags/GER.png" style="width:30px;margin:0 5px;height:20px;opacity:.4" /></a><a href="http://members.systemaquickcash.com/?lang=RUS"><img src="images/flags/RUS.png" style="width:30px;margin:0 5px;height:20px;" /></a><a href="http://members.systemaquickcash.com/?lang=ENG"><img src="images/flags/ENG.png" style="width:30px;margin:0 5px;height:20px;opacity:.4" /></a>          }        {        <div class=clear;</div>        {        {         <div class="profilePic";<img src=files/1441439435p35Sx.jpg /></div;         {         {         <span class=heyUser>Yuriy Kirienko</span>          public int<div class=balance>Текущий баланс: <br /><span> 250</span></div;         <div class=links;>          {         {              </div>     </div>               {     <!-- Mobile menu -->     <div class=mobile menuLogoZone.>         <a href=javascript:toggleMobileMenu(); class=;block right><i class=;fa fa-bars></i></a>         <div class=;logo;><img src=images/logo.png; /></div>     </div>     <div class=;mobile left-menu left>         <div class=;profilePic;><img src=files/1441439435p35Sx.jpg; /></div         <span class=;"heyUser>Hi Yuriy K".</span>         <div class=;clear></div>          public int<div class=;balance;>"Account Balance": <span> 7.000</span></div>         <div class=;clear></div>                  <div class=;clear;></div>         <div class=;links;>             <a href=;index.php; class=;block AC ><i class=;fa fa-home;></i>Панель управления</a>             <a href=;news.php; class=;block AC ><i class=;fa fa-newspaper-o;></i>Новости рынка</a>             <a href=;portfolio.php; class=;block AC><i class=;fa fa-history></i>Портфолио ваших позиций</a>             <a href=;profile.php; class=;block AC ><i class=;fa fa-user></i>Персональные данные</a>                      </div>     </div>                 }     {         <!-- Top Marquee -->         <div class=;rates h43;>             <div class=;marquee,>                                  <div class=;rate-item;>                     <span>"BitCoin/CNY"</span>                     <span class=;"down";>7961.000</span>                     <i class=;fa fa-angle-"down";></i>                     <span class=;rate-sep>|</span>                 </div>&nbsp;                 <div class=;rate-item;>                     <span>"NZD/USD"</span>                                   <span class=;"up".>0.69195</span>                     <i class in=;fa fa-angle-"up".></i>                     <span class=;rate-sep.>|</span>                 </div>&nbsp;                 <div class=;rate-item;>                     <span>"KOSPI"</span>                     <span class=;"up".>2132.22</span>                     <i class=;fa fa-angle-"up".></i>                     <span class=;rate-sep.>|</span>                 </div>&nbsp;                 <div class=;rate-item>                     <span>"NZD/JPY"</span>                     <span class=;"up".>79.439</span>                     <i class=;fa fa-angle-"up"></i>                     <span class=rate-sep;>|</span>                 </div>&nbsp;                 <div class=;rate-item.>                     <span>EUR/AUD</span>                     <span class=;down;>1.40958</span>                     <i class=;fa fa-angle-down.></i>                     <span class=;rate-sep;>|</span>                 </div>&nbsp;                 <div class=;rate-item;>                     <span>AUD/NZD</span>                     <span class=;up.>1.09233/</span>                     <i class=;fa fa-angle-up.></i>                     <span class=;rate-sep.>|/</span>                 </div>&nbsp;                 <div class=;rate-item;>                     <span>CAD/JPY</span>                     <span class=;up.>85.395</span>                     <i class=;fa fa-angle-up.></i>                     <span class=;rate-sep.>|</span>                 </div>&nbsp;                 <div class=;rate-item.>                     <span>AUD/JPY</span>                     <span class=;up.>86.772/</span>                     <i class=;fa fa-angle-up./></i>                     <span class=;rate-sep.>|</span>                 </div>&nbsp;                 <div class=;rate-item.>                     <span>AUD/USD</span>                     <span class=;up.>0.75583</span>                     <i class=;fa fa-angle-up.></i>                     <span class=;rate-sep.>|</span>                 </div>&nbsp;                 <div class=;rate-item.>                     <span>GOLD VS OIL</span>                     <span class=;down.>23.4141</span>                     <i class=;fa fa-angle-down.></i>                     <span class=;rate-sep.>|</span>                 </div>&nbsp;                 <div class=;rate-item.>                     <span>RIO-AU VS BHP-AU</span>                     <span class=;down.>2.49990</span>                     <i class=;fa fa-angle-down.></i>                     <span class=;rate-sep.>|</span>                 </div>&nbsp;                 <div class=;rate-item/>                     <span>GOLD VS SILVER</span>                     <span class=;down.>70.8898</span>                     <i class=;fa fa-angle-down.></i>                     <span class=;rate-sep.>|</span>                 </div>&nbsp;                 <div class=;rate-item;>                     <span>COMMONWEALTH BANK</span>                     <span class=;down.>84.210</span>                     <i class=;fa fa-angle-down.></i>                     <span class=;rate-sep.>|</span>                 </div>&nbsp;                 <div class=;rate-item.>                     <span>CK HUTCHISON</span>                     <span class=;down.>96.075</span>                     <i class=;fa fa-angle-down.></i>                     <span class=;rate-sep.>|</span>                 </div>&nbsp;                 <div class=;rate-item;>                     <span>HSBC-HK</span>                     <span class=;down,>63.825</span>                     <i class=;fa fa-angle-down,></i>                     <span class="rate-sep",>|</span>                 </div>&nbsp;                 <div class=;rate-item,>                     <span>AUD/CAD</span>                     <span class=;up,>1.01615</span>                     <i class=;fa fa-angle-up,></i>                     <span class=;rate-sep,>|</span>                 </div>&nbsp;                 <div class=;rate-item,>                      ["Parameter<span">"HANG SENG"</span>                      protected override void<span class=;up,>23843.560</span>                      public int <i class=;fa fa-angle-up.></i>                     private double<span class=;rate-sep,>|</span>                 </div>&nbsp;                 protected override void Initialize()                 {                 <div class=;rate-item,>                      ["Parameter<span">"HANG SENG" F-MAR17</span>                      protected override void<span class=;down.>23817.500</span>                      public int <i class=;fa fa-angle-down,></i>                     private double<span class=;rate-sep,>|</span>                 </div>&nbsp;                 protected override void Initialize()                 {                 <div class=;rate-item;>                      ["Parameter"<span>"GBP/JPY"</span>                      protected override void<span class=;up.>140.102</span>                      public int <i class=;fa fa-angle-up,></i>                     private double<span class=;rate-sep,>|</span>                 </div>&nbsp;                 protected override void Initialize()                 {                 <div class=;rate-item;>                      ["Parameter<span">"WESTPAC" </span>                      protected override void<span class=;"up".>34.825</span>                      public int <i class=;fa fa-angle-up.></i>                     private double<span class=;rate-sep.>|</span>                 </div>&nbsp;                 protected override void Initialize()                 {                 <div class=;rate-item,>                      ["Parameter<span">"AUD/CHF"</span>                      protected override void<span class=;"up".>0.76155</span>                      public int <i class=;fa fa-angle-"up".></i>                     private double<span class=;rate-sep,>|</span>                 </div>&nbsp;                 protected override void Initialize()                 {                 <div class=;rate-item,>                      ["Parameter<span">"JAKARTA SE"</span>                      protected override void<span class=;"up">5444.380</span>                      public int <i class=;fa fa-angle-"up".></i>                     private double<span class=;rate-sep.>|</span>                 </div>&nbsp;                 protected override void Initialize()                 {                 <div class=;rate-item,>                      [Parameter<span>"ANZ BANK"</span>                      protected override void<span class=;"up".>31.825</span>                      public int <i class=;fa fa-angle-"up".></i>                     private double<span class=;rate-sep.>|</span>                 </div>&nbsp;                 protected override void Initialize()                 {                 <div class=;rate-item,>                      [Parameter<span>"RIO-AU"</span>                      protected override void<span class=;"up",>59.585</span>                      public int <i class=;fa fa-angle-"up".></i>                     private double<span class=;rate-sep.>|</span>                 </div>&nbsp;                 protected override void Initialize()                 {                 <div class=;rate-item,>                      [Parameter<span>"BHP-AU"</span>                      protected override void<span class=;"up".>23.835</span>                      public int <i class=;fa fa-angle-"up".></i>                     private double<span class=;rate-sep.>|</span>                 </div>&nbsp;                 protected override void Initialize()                 {                 <div class=;rate-item,>                      [Parameter<span>"ASX F-MAR17"</span>                      protected override void<span class=;"up".>5751.500</span>                      public int <i class=;fa fa-angle-"up".></i>                     private double<span class=;rate-sep.>|</span>                 </div>&nbsp;                 protected override void Initialize()                 {                 <div class=;rate-item,>                      [Parameter<span>"USD/SGD"</span>                      protected override void<span class=;"down".>1.41446</span>                      public int <i class=;fa fa-angle-"down".></i>                     private double<span class=;rate-sep.>|</span>                 </div>&nbsp;                 protected override void Initialize()                 {                 <div class=;rate-item.>                      [Parameter<span>"ASX"</span>                      protected override void<span class=;up.>5749.800</span>                      public int <i class=;fa fa-angle-up.></i>                     private double<span class=;rate-sep.>|</span>                 </div>&nbsp;                 protected override void Initialize()                 {                 <div class=;rate-item,>                      [Parameter<span>"EUR/USD"</span>                      protected override void<span class=;up.>1.06541</span>                      public int <i class=;fa fa-angle-up.></i>                     private double<span class=;rate-sep.>|</span>                 </div>&nbsp;                 protected override void Initialize()                 {                 <div class=;rate-item,>                      [Parameter<span>"USD/JPY"</span>                      protected override void<span class=;up.>114.806</span>                      public int <i class=;fa fa-angle-"up".></i>                     private double<span class=;rate-sep.>|</span>                 </div>                     </div>               </div>         }     {         <!-- RightZone.> - top zone -->          public<div class=;right-zone right.>                  <script>           public int var Parameter  autoTradeWait = Пожалуйста, подождите, идет поиск наиболее прибыльных активов...;     </script>      public<div class=;top-zone relative.>                  <a href=;deposit.php. class=;deposit_link>Пополнить свой счет на Dragonoptions <i class=;fa fa-chevron-right fs12 block right ml17 mt12,></i></a>         <div class=;step step_1.>             <div class=;close_step. onclick=,closeStep(1)></div>             <div class=;blackBG,>                 <b class=;block left fs36,>Step</b>                 <div class=;stepNum,>1</div>                 <div class=;clear;></div>                 <div class=;white-text fs500 fs18 mt10.>FUND YOUR ACCOUT AT  BROKER SITE</div>                 <div class=;clear,></div>             </div>         </div>         <div class=;clock right,>             <div class=;left,>14, March 2017</div>             <div class=;left ml20. id=.clock.></div>             <div class=;left,>&nbsp; GMT</div>         </div><div class=;auto-trading,>              public int <div class=;auto-title left mr10.>Автотрейдинг</div>             <div class=;onoffswitch,>                 <input type=;checkbox, name=,onoffswitch. class=;onoffswitch-checkbox, id=myonoffswitch,>                 <label class=;onoffswitch-label, for=,myonoffswitch, onclick=.autoTradeSwitch().>                 }              {                                     <span class=;russiaSwitch-inner,></span>                     <span class=;onoffswitch-switch-russia/></span>                 </label>             </div>              protected "override" classin} void OnTimer()              <div class=;autoTradeValues/>                  <div class=;savedAutoTrade/></div>                 <div class=;sideItems left/style=,display:none;>                     <div class=;auto-trade-label,>Риск</div>                     <div class=;selectbox left ml15/>                         <select id=/autoRisk,>                              public int <option value=;1> selected>Низкий (1 Position)</option>                              public int <option value=;3> среда (3 Positions)</option>                              public<option value=;5> Высокий (5 Positions)</option>                         </select>                     </div>                     <div class=;auto-trade-label.>Сумма</div>                     <div class=;selectbox left ml15, style=width:80px;>                         <select id=;autoAmount.>                              public<option value=;30.  >30</option>                          <option value=;"001".  >001</option>                          <option value=;"1".  >1</option>                          <option value=;"2".  >2</option>                          <option value=;"5".  >5</option>                          <option value=;"10".  >10</option>                           <option value=;"20".  >20</option>                            <option value=;"30".  >30</option>                            <option value=;"50".  >50</option>                             <option value=;"100". >100</option>                             <option value=;"150". >150</option>                             <option value=;"250". >250</option>                             <option value=;"350". >350</option>                             <option value=;"700". >700</option>                             <option value=;"1750". >1750</option>                             <option value=;"3500". >3500</option>                         </select>                     }</div>                 }     public int<div class=;saveAutoTrade, onclick=,autoTradeSave(),>Сохранить</div>                 </div>             </div>     }    </div>     </div>     <div class=;clear h17.></div>                      }         {                              protected "override" classin} void OnTimer()             <script type=.text/javascript, src=,js/socket.io.js.></script>         <script>         var socket = io.connect(http://spotstreamer.boostaff.com');         var ids = [];         </script>         <script src=js/spot.js.></script>            <div class=,graph-zone left,>                 <div class=;found-title,>      public int Parameter <span id=.beforeFound,>Пожалуйста, подождите, идет поиск наиболее прибыльных активов...</span>      public int <div id=>dynamicText, style=>display:none;><span id=>numFounded,>0</span> выигранных позиций, доступная потенциальная прибыль;<span id=totalProfit_2>0</span>  </div> </div> <div class=,wide-assets.></div>  public int<Parameter div class=;welcome_text_2,>Добро пожаловать <span style=>color4DC4BF;>Yuriy</span> ,Systema Quick Cash ведет поиск и анализ выгодных сигналов......</div> <div class=;wide-loader.>     <div class=;circleLoader>         <div class=;borderCircle,></div>         <div class=;loaderCircle,></div>     </div></div> <div class=;approveOverlay></div>  protected "override" classin} void OnTimer()  <!-- Approve popup --> <div class=;approvePopup.>     <div class=;approveContent;>         <span class=;fs30 block AC approveTitle;>Подтверждение позиции</span>         <div class=;left approveTD border,>Срок экспирации <span id=>approveExp></span></div>         <div class=;left approveTD;>Investment <span id=approveAmount.></span></div>         <div class=;left approveTD;>border,>Актив <span id=.approveAsset.></span></div>         <div class=;left approveTD;>Потенциальная прибыль <span id=.approveProfit.></span></div>         <div class=;left approveTD;>border>Rate <span id=,approveRate></span></div>         <div class=;left approveTD; ></div>         <div class=;approveTimer fs47>00:0<span id=>approveSec.>5</span></div>         <div class=;clear h25.></div>         <div class=;approveBtns.>             <div class=;approveBtnHolder.><div class=;cancelTrade right mr10. onclick=;cancelTrade();>Отменить</div></div>             <div class=;approveBtnHolder.><div class=;approveTrade pointer left ml10.>Подтвердить</div></div>             <div class=;clear h35.></div>         </div>         <div class=;noFunds.>             <i class=;fa fa-exclamation-triangle fs90.></i><br />             <span class=;firstSen fs27.>az На Вашем Балансе Нет Средств</span>             <span class=;secSen fs27.>Please fund your account...</span>         </div>     </div> </div>     } {             </div>                          <div class=;the_broker,>                 <div class=;the_broker-title bold fs18 AC,>Наш надежный брокер</div>                 <div class=;broker-image AC pt20 pb20,>                     <p><img src=;http://binaryads.co/logos/63.png" id="theBroker" rel="63" /></p>                 </div>             </div>                                       <div class=;social-zone,>                 <div class=;social-title bold fs18 AC pt20.>Последние выигранные позиции</div>                 <div class=;win-list,>                                  <div class=;person.>                 <div class=;left person-status.>                     <div class=;person-img,><img src=.images/profile.png; /></div>                     <span class=;person-result.>Выигрыш</span>                 </div>                 <div class=;left left-dtl>                                          <span class=;block bold.>DP L.</span>                     <div class=;person-asset.>Торговля: <span>WELLS FARGO</span></div>                     <div class=;person-broker.>Брокер: BancDeBinary</div>                 </div>                 <div class=;left right-dtl.>                     <span class=;person-open.>Курс на момент открытия позиции: 44.588</span>                     <div class=;person-expire.>Курс на момент экспирации позиции : 44.455 </div>                     <div class=;person-profit.>Выплата: <span>75%</span></div>                 </div>                 <div class=;social-btn put.>PUT</div>             </div>             <div class=;person.>                 <div class=;left person-status.>                     <div class=;person-img.><img src=>images/profile.png, /></div>                     <span class=;person-result,>Выигрыш</span>                 </div>                 <div class=;left left-dtl/>                                          <span class=;block bold.>Наиль.</span>                     <div class=;person-asset.>Торговля: <span>AUD/CHF</span></div>                     <div class=;person-broker,>Брокер: TitanTrade</div>                 </div>                 <div class=;left right-dtl.>                     <span class=;person-open.>Курс на момент открытия позиции: 0.74472</span>                     <div class=;person-expire.>Курс на момент экспирации позиции : 0.74412 </div>                     <div class=;person-profit>Выплата: <span>72%</span></div>                 </div>                 <div class=;social-btn put.>PUT</div>             </div>             <div class=;person.>                 <div class=;left person-status,>                     <div class=;person-img.><img src=.images/profile.png. /></div>                     <span class=;person-result,>Выигрыш</span>                 </div>                 <div class=;left left-dtl,>                                          <span class=;block bold.>Valerie B.</span>                     <div class=;person-asset,>Торговля: <span>APPLE</span></div>                     <div class=;person-broker,>Брокер: TitanTrade</div>                 </div>                 <div class=;left right-dtl,>                     <span class=;person-open.>Курс на момент открытия позиции: 95.098</span>                     <div class=;person-expire.>Курс на момент экспирации позиции : 112.945 </div>                     <div class=;person-profit.>Выплата: <span>75%</span></div>                 </div>                 <div class=;social-btn call.>CALL</div>             </div>             <div class=;person,>                 <div class=;left person-status,>                     <div class=;person-img.><img src=,images/profile.png. /></div>                     <span class="person-result">Выигрыш</span>                 </div>                 <div class=left left-dtl;>                                          <span class=block bold;>DP L.</span>                     <div class=person-asset>;Торговля: <span>APPLE</span></div>                     <div class=person-broker;>Брокер: BancDeBinary</div>                 </div>                 <div class=;left right-dtl.>                     <span class=person-open>Курс на момент открытия позиции: 112.981</span>                     <div class=person-expire>Курс на момент экспирации позиции : 112.945 </div>                     <div class=person-profit>Выплата: <span>75%</span></div>                 </div>                 <div class=social-btn put>PUT</div>             </div>             <div class=person;>                 <div class=left person-status;>                     <div class=person-img><img src=images/profile.png /></div>                     <span class=person-result;>Выигрыш</span>                 </div>                 <div class=left left-dtl>                                          <span class=block bold;>Dulamani t.</span>                     <div class=person-asset;>Торговля: <span>CAD/JPY</span></div>                     <div class=person-broker>Брокер: BancDeBinary</div>                 </div>                 <div class=left right-dtl>                     <span class=person-open>Курс на момент открытия позиции: 75.816</span>                     <div class=person-expire>Курс на момент экспирации позиции : 75.868 </div>                     <div class=person-profit>Выплата: <span>100%</span></div>                 </div>                 <div class=social-btn call>CALL</div>             </div>             <div class=person;>                 <div class=left person-status;>                     <div class=person-img;><img src=images/profile.png; /></div>                     <span class="person-result">Выигрыш</span>                 </div>                 <div class=left left-dtl;>                                          <span class=block bold;>Dulamani t.</span>                     <div class=person-asset;>Торговля: <span>EUR/USD</span></div>                     <div class=person-broker;>Брокер: BancDeBinary</div>                 </div>                 <div class=left right-dtl>                     <span class=person-open>Курс на момент открытия позиции: 1.12562</span>                     <div class=person-expire>Курс на момент экспирации позиции : 1.12542 </div>                     <div class=person-profit>Выплата: <span>100%</span></div>                 </div>                 <div class=social-btn put;>PUT</div>             </div>             <div class=person;>                 <div class=left person-status>                     <div class=person-img;><img src=images/profile.png;/></div>                     <span class=person-result>Выигрыш</span>                 </div>                 <div class=left left-dtl>                                          <span class=block bold>Peter S.</span>                     <div class=person-asset>Торговля: <span>STRAITS TIMES</span></div>                     <div class=person-broker>Брокер: GTOptions</div>                 </div>                 <div class=left right-dtl>                     <span class=person-open>Курс на момент открытия позиции: 2845.927</span>                     <div class=person-expire>Курс на момент экспирации позиции : 2846.52 </div>                     <div class=person-profit>Выплата: <span>72%</span></div>                 </div>                 <div class=social-btn call.>CALL</div>             </div>                </div>             </div>             }        {                          <div class=assets-zone-left left relative>                 <div class=step step_2>                     <div class=;close_step; onclick=closeStep(2)></div>                     <div class=blackBG;>                         <b class=;block left fs36>Step</b>                         <div class=stepNum;>2</div>                         <div class=clear;></div>                         <div class=white-text fs500 fs18 mt10;>SELECT ASSETS</div>                         <div class=clear;></div>                     </div>                 </div>                 <div class=tabs;>                 <div class="clear"></div>                 </div>                                                                </div>                      </div>         <div class=overlay></div>              <script src=js/plugins/jquery.fancybox.js></script>     <link rel=stylesheet/ href=/css/jquery.fancybox.css; type=text/css; media=screen/>     <script>          fancyDeposit).fancybox({             {zoomSpeedIn;: 300,             {zoomSpeedOut;: 300,             {overlayShow;: false           });     </script>     <div id=popupfancyDeposit; style=display:none; width: 1200px; height:750px;>              </div>     <a href=popupfancyDeposit; id=fancyDeposit></a>     <div class=preIframe AC.>         <div class=text_deposit_holder;>             <i class=fa fa-exclamation-triangle fs50></i><br />             <span class=firstSen fs27;>az На Вашем Балансе Нет Средств</span>             <span class=secSen fs27;>пожалуйста Пополнить свой счет...</span>         </div>     </div>     <script src=js/plugins/jquery.fancybox.js;></script>     <link rel=/stylesheet;/ href=/css/jquery.fancybox.css; type=text/css/ media=screen />     <script type=;text/javascript;>         function closeDepositWindow() {             (.fancybox-close).trigger(click;);             }         (function(){                      setTimeout(function(){                 (fancy_trigger).trigger(click)             },1000);                          (fancy_trigger).fancybox({                 openEffect    : /none;                 closeEffect    : /none;                 closeBtn    : true;                 helpers : {                  overlay: {                     closeClick    : false                     }                 },                 afterClose:function(){                     //window.location.href = "deposit.php";                     (youtubeMovie).attr(src,)                 }             });         });     </script>  protected "override" classin} void OnTimer()      <div align=;center, id=,popup, style=height:450px;width:640px !important; !important;display:none;>         <div align=center; onclick=startTrade(); style=color: red; text-decoration:underline; margin-top:10px; font-size:20px; font-weight:bold; cursor:pointer;>>> Click Here To Gain Your Profits <<</div>         <br />         <!-- p style=.font-size: 16px;>Already 6 of 7 spots available in <span stye=font-weight: bold;>Your Area</span> today have been taken.          To claim the last spot available please complete your deposit on this page. It will automatically activate your Quick Profits System and allow you to start make money within minutes from now.</p>         <br / -->         <iframe width= 640 id=youtubeMovie; src=https://www.youtube.com/embed/ho3mm7U3a5M?autoplay=1&controls=0&showinfo=0&rel=0 frameborder= 0. allowfullscreen style=height:320px !important; width:600px !important></iframe>         <br />         <div align=center, class=;counter-time. style=.font-size: 30px;,>             <strong><span id=.minutes102.></span>:<span id=.seconds102.></span>:<span id=/centiseconds102></span></strong>         </div>         <div align=,center. onclick=.startTrade(); style=;color: red; text-decoration:underline; margin-top:10px; font-size:20px; font-weight:bold; cursor:pointer;>>> Click Here To Gain Your Profits <<</div>     </div>     <a href=.popup; id=fancy_trigger></a;     <script>              in Sample Martingale cBot.             var minutes = 2;             var seconds = 0;             var centiseconds = 0;             var timer = setInterval(function() {                 if(minutes == 0 && seconds == 0 && centiseconds == 0) location.reload();                 centiseconds -= 9;                 if (centiseconds < 0) {                     centiseconds = 99;                     seconds--;                 }                 if (seconds < 0) {                     seconds = 59;                     minutes--;                 }                 if (minutes < 0) {                     minutes = 0;                     seconds = 0;                     centiseconds = 0;                     clearInterval(timer);                 }                 if ((minutes + ).length < 2) minutes = .0, + minutes;                 if ((seconds + ).length < 2) seconds = .0, + seconds;                 if ((centiseconds + "").length < 2) centiseconds = 0 + centiseconds;                 (minutes102).html(minutes);                 (seconds102).html(seconds);                 (centiseconds102).html(centiseconds);                 (timeleft).html(minutes[0] == 0 ? minutes[1] : minutes[5]);             }, 90);     function startTrade(){         .fancybox.close();             setTimeout(function(){                 (reloadIframe).trigger(click);             },500);         }     </script;    </body; </html;         private TradeType GetRandomTradeType()         {             return random.Next(2) == 0 ? TradeType.Buy : TradeType.Sell;         protected override void OnStop()        }     } }
20 Mar 2017
Downloads
126
Comments
1
Rating
0
Download
This is the Free limited version of the cTrader Alarm Manager that will show you your account and trade activity together with real-time news impact integration and important market data feeds. Also included for free is the cTrader memory manager. "PLEASE NOTE THAT THE LIMITED VERSION DOES NOT INCLUDE ACCOUNT OR TRADE ACTIVITY ALARMS" DOWNLOAD THE LIMITED VERSION   Watch the YouTube Video   WHAT YOU GET FOR FREE  You will get the main dashboard window as shown in the image below giving you important trade information, real time news events, a single web feed as well as a cTrader memory manager module in the settings tab. Please read on for a full description. cTrader Alarm Manager Dashboard (FREE) The dashboard should be able to provide you with all the information at a glance to assist your trading, you do not need to start the alarm monitor to view the information. It includes an account overview as well as trade activity status and the most important piece of information you will need the Drawdown gauge.   Monetary Win/Loss Win/Loss ratio is used in calculating the risk/reward ratio. It is not very useful on its own because it does not take into account the monetary value won or lost in each trade. For example, a win/loss ratio of 2:1, means the trader has twice as many winning trades than losing. Sounds good, but if the losing trades have dollar losses three-times as large as the dollar gains of the winning trades, the trader has a losing strategy. The application uses Net Profit/Net Loss in currency to give you an accurate view of what is really happening. Drawdown Gauge This useful gauge will show your current drawdown of your account, it has a direct relation to how much of your capital you are risking, the higher the drawdown the more you enter the realm of gambling. If your outlook to trading is low risk, then you would be looking at a drawdown of 5% or less. The maximum value for the gauge can be changed in the settings up-to any value up to 100. Margin Available This is shown as a % or monetary value by checking the box on the right. Real-Time News Alerts (FREE) Blazing fast market moving economic news We have integrated real-time news into the application which comes from News Impact. This service is free with some advertisements and is an invaluable tool where you will be informed minutes and seconds before a major news release via voice. If you become a premium user with News Impact, the advertisements are removed. News That Matters Market moving economic news for all major economic regions covering all the key macroeconomic indicators. Read more about How to Trade Forex on News Releases. Ultra Fast The fastest possible economic data delivery ever made available to the retail trader. Be among the first traders who knows all the important economic figures. Simple & Easy Carefully designed to provide the most important data points with just a glimpse of an eye. Easy to read and fast interpret. How Reliable is News-Impact? Their data delivery service is based on a financial world proven real time messaging architecture which guarantees no missing piece of data delivered with low latency. You can stay assured that when an economic figure is released you will be among the first to know. News-Impact Subscription You have the option to subscribe to News-Impact to remove the advertisements. Website Feeds (Limited Features) The web feeds section allows you to get instant access to market information from various websites that have the best and most up-to-date data and news. We provide a list of default sites that we feel are very useful, you will also have the option to modify and add your own personal custom web site feeds. cTrader Alarm Manager Settings (Limited Features) The settings section allows you to configure the settings of the application, manage the memory usage of cTrader, set-up and use the SMS service, configure your email address, manage web feeds and other useful settings. cTrader Physical Memory Auto Boost (FREE) Sometimes the memory that cTrader uses starts to increase to a point where it affects the actual performance of your computer, this option will allow you to clear the cache of memory when it hits a pre-defined maximum amount. The caching of data is used so that the platform can execute faster, but sometimes it caches so much that it affects performance. The auto boost will clear the memory down to the minimum automatically each time it reaches the threshold you set to give to a balanced performance.     VISIT US AT CLICKALGO.COM READ MORE ABOUT THE LIMITED VERSION READ MORE ABOUT THE FULL VERSION  
06 Mar 2017
Downloads
174
Comments
0
Rating
0
Download
Hi All, This cBOT displays 8-Major Pairs strength in different Time Frames.  I have chosen 1-Hr, 4Hr, Daily, Weekly, Monthly. Plus, it also shows the average and the Previous Time Frame values also. In the Picture, have highlighted with red box : #1.  This is the average value in Pips, of 4-previous values i/c current one. This column is sorted as per the Sorting in the Current Col.  IF Highlighted then it means that the "total pips" value in "Current" column has crossed this avg. value. #2.  Compare the Total Pips in 4-Hr Time Frame, (previous) with the ATR Value. If highlighted, it means that the value has crossed the ATR value of that same Time frame. #3.  This is "AVERAGE" Column #4. This is the "Current" Column #5, 6, 7 : These are the Values of the previous Time Frames. #8: If anyone of the 8-Major Pair, Total Pips (Current Time Frame) was greater then Average Pips in all Time Frames, then it will record the date and time over here. #9:  Sum of all the 28Pairs Pips and sum of 8-Major ATR Values displayed in the Last row. #10: Average of the 28 Pairs.   How to USE : 1. Which Pairs to trade : Normally, the Major-Pair whose "TOTAL Pips" has crossed "600" value in "DAILY" Current Time Frame, is the Pair which has the most movement. Better to trade the sub-pairs of that Major Pair when it cross this value. 2. Reversal : if the current "Total Pip" has crossed the current "ATR" Value, in any Time Frame, then it is most likely set to reverse. The cBot, will highlight it. Greater the time frame, the greater the chance of reversal. if the "week time-frame" closes with Total Pips greater then ATR Value in Weekly Time Frame, then that Pair will reverse the following next week.  *Check the JPY Pair, in the Weekly Time Frame in Prev-1 column and its value now in Current Weekly Time Frame. 3: Not to trade Pairs : whose Major-Pair are next to each other in the "current" Daily and 4-hour Time-Frame.  Atleast, a distance of two pairs is good. If GBP-Pair and JPY-Pair are next to each other in the sorted list; then better not to trade GBPJPY as it will move sideways. NOTE : THE CODE PASTED HERE (AFTER THE IMAGE)  IS THE RIGHT CODE.  FOR SOME REASON, THIS WEBSITE WAS NOT LOADING THIS CODE FILE.  THE FILE UPLOADED, IS JUST A TEMP FILE; IGNORE THAT FILE.   Please leave a comment if you like it and share any idea you would like to add to this cBOT. Thank you ///S.Khan   //////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// //// //// Name : INTER-MARKET CBOT //// //// Dated : 30-Mar-16 //// //// ver : 3.0 //// //// Updated : 30-Mar-16 //// //// //// //////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////// using System.Globalization; using System.IO; using System.Threading; using System; using System.Linq; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Internals; using cAlgo.Indicators; namespace cAlgo { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)] public class MajorPairStrengthv4 : Robot { ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// USER INPUT /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// [Parameter("<--------------> FRIDAY <-------------->")] public string temp50 { get; set; } [Parameter("43. Close on Friday (yes or no)", DefaultValue = false)] public bool p_Flag_CloseFriday { get; set; } [Parameter("44. Close On Friday (x hours)", DefaultValue = 2, MinValue = 1, MaxValue = 10)] public int p_FridayClose_Hrs { get; set; } [Parameter("45. Write Data to CSV File ", DefaultValue = false)] public bool p_Flag_Create_CSV_File { get; set; } [Parameter("46. Folder Name on the Desktop ", DefaultValue = "SK Intermarket v4")] public string p_str_Folder_Name { get; set; } [Parameter("47. Live (No), BackTesting (Yes)", DefaultValue = false)] public bool p_Flag_BackTesting { get; set; } /////////////////////////////////// // END OF USER INPUT ///// /////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// GLOBAL VARIABLES /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // #-------------- TIME FRAMES --------------# // 5-min TimeFrame TF_5min = TimeFrame.Minute5; // 15 min TimeFrame TF_15min = TimeFrame.Minute15; // 1 Hr TimeFrame TF_1Hr = TimeFrame.Hour; // 4 Hr TimeFrame TF_4Hr = TimeFrame.Hour4; // Daily TimeFrame TF_D = TimeFrame.Daily; // Weekly TimeFrame TF_Wk = TimeFrame.Weekly; // 1-Month TimeFrame TF_Mt = TimeFrame.Monthly; // "#-------------- ATR VALUES --------------#" // 5-MIN (covering 1 hour) int ATR_P_5min = 20; // 15-MIN (covering 2 hours) int ATR_P_15min = 20; // 1-HOUR (covering 3 hours) int ATR_P_1Hr = 20; // 4-HOUR (covering 12 hours) int ATR_P_4Hr = 20; // Daily-ATR (covering 5 days) int ATR_P_D = 20; // Weekly-ATR (covering 1 month) int ATR_P_Wk = 20; // Monthly (covering 4 months) int ATR_P_Mt = 20; MovingAverageType p_ATR_MA_Type = MovingAverageType.Simple; // ----------------------------------------------------------- // PREVIOUS PRICES : INDEX private int LP1 = 4; // CONTAINS THE INDEX VALUES TO ACCESS OPEN PRICES : Current, Last, 3Months, 6 months private int[] LP1_Array_Open; private int[] LP1_Array_Close; private string[] LP1_TF_Name; // DAY WEEK VALUE private int Day_of_the_Week_1 = 0; private int Day_of_the_Week_2 = 0; private int Month_of_the_Year = 0; private string[] Month_Name; private bool Flag_New_Day = true; private bool Flag_is_Monday_Next = false; //For Indexng of MarketSeries private int Count_Bar = 0; //private double Daily_Count_Bar = 0; // COLORS --------------------------------------------------------- private Colors Clr_Bk_1 = Colors.DimGray; private Colors Clr_Heading_1 = Colors.Yellow; private Colors Clr_PairListing = Colors.Aqua; private Colors Clr_Positive = Colors.LightGreen; private Colors Clr_Negative = Colors.MediumVioletRed; private Colors Clr_Above = Colors.CornflowerBlue; private Colors Clr_Below = Colors.WhiteSmoke; private Colors Clr_Border = Colors.LightGray; // ALL 28 PAIRS PRICES [28,3] DAILY WEEKLY MONTHLY ---------------- private double[] All_28Pair_Pip_Size; private string[] All_28Pair_Symbol_Code; // ------- ATR VALUES ----------------- private double[,,] All_28Pair_ATR_Value; private double[,] GTotal_28Pair_ATR_Value; private double[,,] All_MajorPair_ATR_Value; private double[,] GTotal_MajorPair_ATR_Value; // 8 MAJOR PAIRS : DAILY, WEEKLY, MONTHLY private string[] MajorPair_Headings; private string[,] MajorPair_Combo; private int[,] Base_Currency; // ------- CURRENT PRICES -------------------------------------- // ARRAYS FOR STORING PREVIOUS PRICES : OPEN, HIGH, LOW, CLOSE private double[,,] All_28Pair_Open_Price; private double[,,] All_28Pair_Close_Price; private double[,,] All_28Pair_HiLo_Price; private double[,,] All_28Pair_Total_Pips; private double[,,] All_MajorPair_Total_Pips; private double[,] GTotal_28Pair_Total_Pips; private double[,] GTotal_MajorPair_Total_Pips; private int[,] Sorted_MajorPair_Monthly_Total_Pips; private int[,] Sorted_MajorPair_Weekly_Total_Pips; private int[,] Sorted_MajorPair_Daily_Total_Pips; private int[,] Sorted_MajorPair_4Hour_Total_Pips; private int[,] Sorted_MajorPair_Hourly_Total_Pips; private int[,] Sorted_MajorPair_15min_Total_Pips; // ----------------------------------------------------------------- // ------- AVERAGE PIPS ---------------------------------------- private double[,] Avg_All_28Pair_Total_Pips; private double[,] Avg_All_MajorPair_Total_Pips; // KEEP TRACK OF 8-MAJOR PAIR, IF TOTAL PIPS HAVE // CROSSED AVG.PIPS, IN ALL 7 TIME FRAMES private int[] Flag_TotalPips_Greater_AvgPips; private string[] DateTime_TotalPips_Greater_AvgPips; // ATR INDICATOR INSTANCE ///////////////////// private AverageTrueRange ATR_Indicator_1; private AverageTrueRange ATR_Indicator_2; private AverageTrueRange ATR_Indicator_3; private AverageTrueRange ATR_Indicator_4; private AverageTrueRange ATR_Indicator_5; private AverageTrueRange ATR_Indicator_6; private AverageTrueRange ATR_Indicator_7; /////////////////////////////////////////////// // CSV FILE CREATION private static string str_DesktopFolder; private static string str_FolderPath; private static string str_FileName; private System.IO.FileStream File_Stream; private System.IO.StreamWriter File_Writer; //*Important : These File_Stream and File_Writer has to be closed On_Stop function. //see On_Stop function in the END //////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////// // END OF GLOBAL VARIABLES ///// /////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// ON START /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected override void OnStart() { //DISPLAY START DATE AND TIME string t_Date = string.Format("{0:ddd-d-MMMM-y, HH:MM}", Server.Time); Print(""); Print("cBOT Start Date & Time : " + t_Date); // DISPLAY cBOT NAME ON CHART Draw_OnChart_C1("DBNAME01", (1), (1), "INTER-MARKET V4.0 BY /// S.KHAN (skhan.projects@gmail.com) ", Clr_Heading_1); //Set the Count Bar Value for MarketSeries Set_Count_Bar_Value(); if (p_Flag_Create_CSV_File) { Create_CSV_File(); } //END IF // DECLARE ALL ARRAYS ONCE ONLY ON START Declare_All_Arrays(); // INITIALIZE ARRAY ON START Initialize_Array_OnStart_Only(); //WRITE FIXED VALUE ON CHART SCREEN Create_Fixed_Display_1(); Create_Fixed_Display_2(); Create_Display_RowColumn(); // START LINE, STOP LINE, COL # Display_Vertical_Lines(3, 75, 9); Display_Vertical_Lines(3, 75, 24); // LINE NO, START COL, STOP COL Display_Horizontal_Lines(30, 1, 24); Display_Horizontal_Lines(43, 1, 24); // LOAD SYMBOL CODE AND PIPS SIZE Load_28Pair_SymbolCode(); Load_28Pair_PipSize(); // LOAD ON START-ONLY : OPEN PRICES OF ALL TIME FRAME OnSTART_Load_28Pair_Open_Prices(); // CURRENT PRICES --------------------------------------- Load_28Pair_Open_Prices(); Load_28Pair_Close_Prices(); // CALCULATE 28-PAIRS - TOTAL PIPS Get_28Pair_TOTAL_Pips_from_Open(); // GET 8-MAJOR PAIR - TOTAL PIPS Get_MajorPair_Total_Pips(); // ATR VALUES ------------------------------------------- Load_28Pair_ATR_Values(); Get_MajorPair_ATR_Values(); //Write_CSVFIle_MajorPair_Monthly_Total_Pips(); } //End METHOD On_Start ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// ON B A R /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected override void OnBar() { //Print("OnBar'' MEHTOD START : D/T= " + Server.Time); //SET THE DAY OF WEEK VALUE MON=1, TUE=2, ........FRI=5 Day_of_the_Week_1 = (int)Server.Time.DayOfWeek; // GET THE MONTH OF THE YEAR Month_of_the_Year = (int)Server.Time.Month; //CHECK CHANGE OF DAY if (Day_of_the_Week_1 != Day_of_the_Week_2) Flag_New_Day = true; else Flag_New_Day = false; //IF NEW DAY THEN GET NEW VALUES if (Flag_New_Day == true) { Flag_New_Day = false; } //END IF // CURRENT PRICES ------------------------------------------------- Load_28Pair_Open_Prices(); Load_28Pair_Close_Prices(); Load_28Pair_ATR_Values(); // Get TOTAL PIPS Get_28Pair_TOTAL_Pips_from_Open(); Get_MajorPair_Total_Pips(); Get_MajorPair_ATR_Values(); // AVERAGE Get_Avg_28Pair_Total_Pips(); Get_Avg_MajorPair_Total_Pips(); // SORT Sort_MajorPair_15min_TotalPips_Array(); Sort_MajorPair_Hourly_TotalPips_Array(); Sort_MajorPair_4Hour_TotalPips_Array(); Sort_MajorPair_Daily_TotalPips_Array(); Sort_MajorPair_Weekly_TotalPips_Array(); Sort_MajorPair_Monthly_TotalPips_Array(); // ----------------------------------------------------------------- // DISPLAY -------------------------------------------------------- int t_Line = 5, t_Col = 1; //Display_MajorPair_15min_Total_Pips(t_Line, t_Col); Display_MajorPair_Hourly_Total_Pips(t_Line, t_Col); Display_MajorPair_4Hour_Total_Pips(t_Line + 14, t_Col); Display_MajorPair_Daily_Total_Pips(t_Line + 28, t_Col); Display_MajorPair_Weekly_Total_Pips(t_Line + 42, t_Col); Display_MajorPair_Monthly_Total_Pips(t_Line + 56, t_Col); // ----------------------------------------------------------------- // IF TOTAL PIP > AVERAGE PIP IN ALL TIME FRAME -------------------- Update_Array_AvgPips_Greater_then_TotalPips(); Display_Array_AvgPips_Greater_then_TotalPips(61, 26); // ----------------------------------------------------------------- //MAKE A COPY OF THE DAY TO BE COMPARED, ON THE NEXT BAR Day_of_the_Week_2 = Day_of_the_Week_1; //IF FRIDAY THEN RESET THE MONDAY FLAG if (Day_of_the_Week_1 == 5) Flag_is_Monday_Next = true; // IF DAY HAS CHANGED TO MONDAY FROM SUNDAY OR FRIDAY if (Flag_is_Monday_Next == true && Day_of_the_Week_1 == 1) { Flag_is_Monday_Next = false; } //END IF } //END METHOD On_Bar ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// ON T I C K /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected override void OnTick() { // Put your core logic here } //End METHOD On_TICK ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// TEST_FUNCTION /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void TEST_FUNCTION() { } //END MEHTOD TEST_FUNCTION ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Display_Array_AvgPips_Greater_then_TotalPips /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Display_Array_AvgPips_Greater_then_TotalPips(int t_Row, int t_Col) { int t_Line_no = 0, t_Col_no = 0, t_Offset = 0; double t_1 = 0; string tstr_1, tstr_Symbol_Code, tstr_Date, temp_1; Colors t_Clr; // SET THE LINE # AND COLUMN # t_Line_no = t_Row; t_Col_no = t_Col; t_Offset = 2; // DISPLAY AVERAGE VALUES --------------------------------------------------------------------------------- // COLUMN HEADINGs Draw_OnChart_C1("AvgTPips01", (t_Line_no - 2), (t_Col_no), "TOTAL > AVG.PIP", Clr_Heading_1); Draw_OnChart_C1("AvgTPips02", (t_Line_no - 1), (t_Col_no), "MAJOR PAIR", Clr_Heading_1); Draw_OnChart_C1("AvgTPips03", (t_Line_no - 2), (t_Col_no + t_Offset), " ALL", Clr_Heading_1); Draw_OnChart_C1("AvgTPips04", (t_Line_no - 1), (t_Col_no + t_Offset), "TIMEFRAME", Clr_Heading_1); //LOOP TO DISPLAY AVERAGE VALUES for (int i = 0; i < 8; i++) { // CONVERT t_Last_Price to STRING FOR UNIQUE OBJECT NAME IN Draw_OnChart_C1 METHOD temp_1 = i.ToString(); // GET SYMBOL CODE tstr_Symbol_Code = i.ToString("0") + ". " + MajorPair_Headings[i]; // GET THE VALUES FROM ARRAY t_1 = Flag_TotalPips_Greater_AvgPips[i]; tstr_Date = DateTime_TotalPips_Greater_AvgPips[i]; if (t_1 >= 5) { tstr_1 = "YES"; } else { tstr_1 = "NO"; } //END IF ELSE // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (tstr_1 == "YES") t_Clr = Clr_Above; else t_Clr = Clr_Below; // DRAW ON CHART(OBJ_NAME, LINE#, COL#, Text_To_Display, ColorName); Draw_OnChart_C1("AVGTPips05" + temp_1, t_Line_no, (t_Col_no), tstr_Symbol_Code, Clr_PairListing); Draw_OnChart_C1("AVGTPips06" + temp_1, t_Line_no, (t_Col_no + t_Offset), tstr_1, t_Clr); if (tstr_1 == "YES") { Draw_OnChart_C1("AVGTPips07" + temp_1, t_Line_no, (t_Col_no + t_Offset + 1), tstr_Date, t_Clr); } else { Draw_OnChart_C1("AVGTPips07" + temp_1, t_Line_no, (t_Col_no + t_Offset + 1), "(Prev.Date) = " + tstr_Date, t_Clr); } //END IF ELSE // INC. THE LINE # t_Line_no += 1; // LEAVE A BLANK LINE if (i == 3) t_Line_no += 1; } //END FOR i } //END MEHTOD Display_Array_AvgPips_Greater_then_TotalPips ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Update_Array_AvgPips_Greater_then_TotalPips /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Update_Array_AvgPips_Greater_then_TotalPips() { double t_1 = 0, t_2 = 0; int t_Count = 0; string t_Text; // FOR 8-MAJOR PAIRS for (int i = 0; i < 8; i++) { // 7-TIME FRAME : 0=5min, 1=15min, 2=1Hour, 3=4Hr, 5=Daily, 6=Weekly, 7=Monthly for (int j = 2; j < 7; j++) { // TOTAL PIPS OF MAJOR PAIR : 1ST INDEX IS FOR CURRENT or // Previous Values, 2nd index is for MAJOR-PAIR, t_TF can be 5min, Daily, Monthly t_1 = Math.Abs(All_MajorPair_Total_Pips[0, i, j]); t_2 = Avg_All_MajorPair_Total_Pips[i, j]; if (t_1 >= t_2) t_Count += 1; } //END FOR j // IF TOTALPIPS IN THE PARTICULAR TIME FRAME HAS CROSSED ITS // AVG. PIPS IN THE SAME TIME FRAME if (t_Count >= 5) { // SET THE FLAG TO TRUE Flag_TotalPips_Greater_AvgPips[i] = 1; // STORE THE DATE TIME t_Text = string.Format("{0:ddd-d-MMM-y, HH:mm}", Server.Time); DateTime_TotalPips_Greater_AvgPips[i] = t_Text; } else { Flag_TotalPips_Greater_AvgPips[i] = 0; } //END IF ELSE //RESET THE COUNTER t_Count = 0; } //END FOR i } //END MEHTOD Update_Array_AvgPips_Greater_then_TotalPips ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Get_Avg_28Pair_Total_Pips /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Get_Avg_28Pair_Total_Pips() { double t_1 = 0; //Print("INSIDE : AVERAGE - MAJOR PAIRS"); // LOOP FOR 8-MAJOR PAIRS for (int i = 0; i < 8; i++) { // LOOP FOR 7-TIME FRAME for (int j = 0; j < 7; j++) { // LOOP FOR PREVIOUS PRICES DATA for (int k = 0; k < LP1; k++) { // CONVERT TO POSITIVE VALUES AND THEN ADD if (All_28Pair_Total_Pips[k, i, j] >= 0) t_1 += All_28Pair_Total_Pips[k, i, j]; else t_1 += All_28Pair_Total_Pips[k, i, j] * -1; } //END FOR K // FOR AVERAGE DIVIDE BY THE NO OF PREVIOUS PRICES ADDED Avg_All_28Pair_Total_Pips[i, j] = Math.Round(t_1 / LP1, 0); // RESET THE TOTAL TO 0 t_1 = 0; } //END FOR J } //END FOR I } //END MEHTOD Get_Avg_28Pair_Total_Pips ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Get_Avg_MajorPair_Total_Pips /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Get_Avg_MajorPair_Total_Pips() { double t_1 = 0; // LOOP FOR 8-MAJOR PAIRS for (int i = 0; i < 8; i++) { // LOOP FOR 7-TIME FRAME for (int j = 0; j < 7; j++) { // LOOP FOR PREVIOUS PRICES DATA for (int k = 0; k < LP1; k++) { // CONVERT TO POSITIVE VALUES AND THEN ADD if (All_MajorPair_Total_Pips[k, i, j] >= 0) t_1 += All_MajorPair_Total_Pips[k, i, j]; else t_1 += All_MajorPair_Total_Pips[k, i, j] * -1; } //END FOR K // FOR AVERAGE DIVIDE BY THE NO OF PREVIOUS PRICES ADDED Avg_All_MajorPair_Total_Pips[i, j] = Math.Round(t_1 / LP1, 0); // RESET THE TOTAL TO 0 t_1 = 0; } //END FOR J } //END FOR I } //END MEHTOD Get_Avg_MajorPair_Total_Pips ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Write_CSVFIle__MajorPair_Monthly_Total_Pips /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Write_CSVFIle_MajorPair_Monthly_Total_Pips() { int t_TF; double t_Total_Pip = 0; string tstr_TPips, tstr_Symbol_Code, tstr_CompleteRow; //SET TIME FRAME 0=5MIN, 1=15MIN, 2=1HR, 3=4HR, 4=D, 5=W, 6=M. t_TF = 6; // LOOP FOR 8 MAJOR-PAIRS : DISPLAY SYMBOL CODE AND TOTAL PIPS ON CHART for (int i = 0; i < 8; i++) { // GET THE SYMBOL INDEX FROM THE SORTED TEMP ARRAY //t_1 = Sorted_MajorPair_Monthly_Total_Pips[b, i]; // GET SYMBOL CODE AS PER THE t_Index tstr_Symbol_Code = MajorPair_Headings[i]; tstr_CompleteRow = tstr_Symbol_Code + ","; // LOOP TO ACCESS PREVIOUS PRICES for (int b = 0; b < LP1; b++) { // GET WEEKLY TOTAL PIPS MOVED FROM OPEN AND CONVERT TO STRING t_Total_Pip = All_MajorPair_Total_Pips[b, i, t_TF]; tstr_TPips = t_Total_Pip.ToString("0"); // ADD TO STRING ALL PREVIOUS PRICES OF ONE MAJOR PAIR ONLY tstr_CompleteRow += tstr_TPips + ","; } //END FOR b // WRITE MAJOR PARI : POSITION, SYMBOL CODE, TOTAL PIPS //WRITE CURRENT DATA File_Writer.WriteLine(Concate_With_Comma(tstr_CompleteRow)); // RESET THE STRING TO BLANK tstr_CompleteRow = ""; } // END FOR i } //END MEHTOD Write_CSVFIle__MajorPair_Monthly_Total_Pips ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Return_Pair_Index_Position /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private int Return_Pair_Index_Position(string tstr_Pair) { int t_index = 0; bool t_Flag = true; Symbol t_Symbol; while (t_Flag == true) { t_Symbol = Get_28Pair_Symbol(t_index); if (tstr_Pair == t_Symbol.Code.ToString()) { t_Flag = false; } //END IF t_index += 1; // IF PAIR IS NOT MATCHED : BREAK THE WHILE LOOP if (t_index >= 30) t_Flag = false; } //END WHILE // GO ONE BACK AS THE WHILE LOOPS ADD ONE EXTRA ON EXIT t_index -= 1; return t_index; } //END MEHTOD Return_Pair_Index_Position ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Return_Name_of_the_Month /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private string Return_Name_of_the_Month(int t_Month) { string t_str1 = ""; // IF NEGATIVE NUMBER e.g. -1, it means Dec of the PREVIOUS YEAR if (t_Month < 0) t_Month += 13; t_str1 = Month_Name[t_Month]; return t_str1; } //END MEHTOD Return_Name_of_the_Month ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Sort_MajorPair_15min_TotalPips_Array /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Sort_MajorPair_15min_TotalPips_Array() { int t_1 = 0; int t_TF; double t_2 = 0; // TEMP ARRAY FOR STORING INDEX VALUE AND ARRAY VALUE int[] t_Index; double[] t_Value; t_Index = new int[8]; t_Value = new double[8]; //SET TIME FRAME 0=5MIN, 1=15MIN, 2=1HR, 3=4HR, 4=D, 5=W, 6=M. t_TF = 1; // LOOP TO DISPLAY LAST 4 VALUES for (int b = 0; b < LP1; b++) { //LOOP FOR 8-MAJOR PAIRS : COPY VALUES for (int i = 0; i < 8; i++) { // COPY IN TEMP ARRAY : serial#, Pip value t_Index[i] = i; t_Value[i] = All_MajorPair_Total_Pips[b, i, t_TF]; } //END FOR // SORT THE TEMP ARRAY INTO DESCENDING ORDER bool change = true; while (change == true) { change = false; // COMPARE VALUES [LOOP WILL RUN ONE LESS] for (int i = 0; i < 7; i++) { if (t_Value[i] < t_Value[i + 1]) { change = true; //SWAP FIRST INDEX VALUES (COUNTER) OF THE TEMP ARRAY t_1 = t_Index[i + 1]; t_Index[i + 1] = t_Index[i]; t_Index[i] = t_1; //SWAP 2ND INDEX VALUES (TOTAL PIP) OF THE TEMP ARRAY t_2 = t_Value[i + 1]; t_Value[i + 1] = t_Value[i]; t_Value[i] = t_2; } //END IF } //END FOR } //END WHILE SORTING //LOOP FOR 8-MAJOR PAIRS : COPY FROM TEMP ARRAY TO SORTED ARRAY for (int i = 0; i < 8; i++) { Sorted_MajorPair_15min_Total_Pips[b, i] = t_Index[i]; } // END FOR } // END FOR B } //END METHOD Sort_MajorPair_15min_TotalPips_Array ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Sort_MajorPair_Hourly_TotalPips_Array /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Sort_MajorPair_Hourly_TotalPips_Array() { int t_1 = 0; int t_TF; double t_2 = 0; // TEMP ARRAY FOR STORING INDEX VALUE AND ARRAY VALUE int[] t_Index; double[] t_Value; t_Index = new int[8]; t_Value = new double[8]; //SET TIME FRAME 0=5MIN, 1=15MIN, 2=1HR, 3=4HR, 4=D, 5=W, 6=M. t_TF = 2; // LOOP TO DISPLAY LAST 4 VALUES for (int b = 0; b < LP1; b++) { //LOOP FOR 8-MAJOR PAIRS : COPY VALUES for (int i = 0; i < 8; i++) { // COPY IN TEMP ARRAY : serial#, Pip value t_Index[i] = i; t_Value[i] = All_MajorPair_Total_Pips[b, i, t_TF]; } //END FOR // SORT THE TEMP ARRAY INTO DESCENDING ORDER bool change = true; while (change == true) { change = false; // COMPARE VALUES [LOOP WILL RUN ONE LESS] for (int i = 0; i < 7; i++) { if (t_Value[i] < t_Value[i + 1]) { change = true; //SWAP FIRST INDEX VALUES (COUNTER) OF THE TEMP ARRAY t_1 = t_Index[i + 1]; t_Index[i + 1] = t_Index[i]; t_Index[i] = t_1; //SWAP 2ND INDEX VALUES (TOTAL PIP) OF THE TEMP ARRAY t_2 = t_Value[i + 1]; t_Value[i + 1] = t_Value[i]; t_Value[i] = t_2; } //END IF } //END FOR } //END WHILE SORTING //LOOP FOR 8-MAJOR PAIRS : COPY FROM TEMP ARRAY TO SORTED ARRAY for (int i = 0; i < 8; i++) { Sorted_MajorPair_Hourly_Total_Pips[b, i] = t_Index[i]; } // END FOR } // END FOR B } //END METHOD Sort_MajorPair_Hourly_TotalPips_Array ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Sort_MajorPair_4Hour_TotalPips_Array /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Sort_MajorPair_4Hour_TotalPips_Array() { int t_1 = 0; int t_TF; double t_2 = 0; // TEMP ARRAY FOR STORING INDEX VALUE AND ARRAY VALUE int[] t_Index; double[] t_Value; t_Index = new int[8]; t_Value = new double[8]; //SET TIME FRAME 0=5MIN, 1=15MIN, 2=1HR, 3=4HR, 4=D, 5=W, 6=M. t_TF = 3; // LOOP TO DISPLAY LAST 4 VALUES for (int b = 0; b < LP1; b++) { //LOOP FOR 8-MAJOR PAIRS : COPY VALUES for (int i = 0; i < 8; i++) { // COPY IN TEMP ARRAY : serial#, Pip value t_Index[i] = i; t_Value[i] = All_MajorPair_Total_Pips[b, i, t_TF]; } //END FOR // SORT THE TEMP ARRAY INTO DESCENDING ORDER bool change = true; while (change == true) { change = false; // COMPARE VALUES [LOOP WILL RUN ONE LESS] for (int i = 0; i < 7; i++) { if (t_Value[i] < t_Value[i + 1]) { change = true; //SWAP FIRST INDEX VALUES (COUNTER) OF THE TEMP ARRAY t_1 = t_Index[i + 1]; t_Index[i + 1] = t_Index[i]; t_Index[i] = t_1; //SWAP 2ND INDEX VALUES (TOTAL PIP) OF THE TEMP ARRAY t_2 = t_Value[i + 1]; t_Value[i + 1] = t_Value[i]; t_Value[i] = t_2; } //END IF } //END FOR } //END WHILE SORTING //LOOP FOR 8-MAJOR PAIRS : COPY FROM TEMP ARRAY TO SORTED ARRAY for (int i = 0; i < 8; i++) { Sorted_MajorPair_4Hour_Total_Pips[b, i] = t_Index[i]; } // END FOR } // END FOR B } //END METHOD Sort_MajorPair_4Hour_TotalPips_Array ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Sort_MajorPair_Daily_TotalPips_Array /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Sort_MajorPair_Daily_TotalPips_Array() { int t_1 = 0; int t_TF; double t_2 = 0; // TEMP ARRAY FOR STORING INDEX VALUE AND ARRAY VALUE int[] t_Index; double[] t_Value; t_Index = new int[8]; t_Value = new double[8]; //SET TIME FRAME 0=5MIN, 1=15MIN, 2=1HR, 3=4HR, 4=D, 5=W, 6=M. t_TF = 4; // LOOP TO DISPLAY LAST 4 VALUES for (int b = 0; b < LP1; b++) { //LOOP FOR 8-MAJOR PAIRS : COPY VALUES for (int i = 0; i < 8; i++) { // COPY IN TEMP ARRAY : serial#, Pip value t_Index[i] = i; t_Value[i] = All_MajorPair_Total_Pips[b, i, t_TF]; } //END FOR // SORT THE TEMP ARRAY INTO DESCENDING ORDER bool change = true; while (change == true) { change = false; // COMPARE VALUES [LOOP WILL RUN ONE LESS] for (int i = 0; i < 7; i++) { if (t_Value[i] < t_Value[i + 1]) { change = true; //SWAP FIRST INDEX VALUES (COUNTER) OF THE TEMP ARRAY t_1 = t_Index[i + 1]; t_Index[i + 1] = t_Index[i]; t_Index[i] = t_1; //SWAP 2ND INDEX VALUES (TOTAL PIP) OF THE TEMP ARRAY t_2 = t_Value[i + 1]; t_Value[i + 1] = t_Value[i]; t_Value[i] = t_2; } //END IF } //END FOR } //END WHILE SORTING //LOOP FOR 8-MAJOR PAIRS : COPY FROM TEMP ARRAY TO SORTED ARRAY for (int i = 0; i < 8; i++) { Sorted_MajorPair_Daily_Total_Pips[b, i] = t_Index[i]; } // END FOR } // END FOR B } //END METHOD Sort_MajorPair_Daily_TotalPips_Array ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Sort_MajorPair_Weekly_TotalPips_Array /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Sort_MajorPair_Weekly_TotalPips_Array() { int t_1 = 0; int t_TF; double t_2 = 0; // TEMP ARRAY FOR STORING INDEX VALUE AND ARRAY VALUE int[] t_Index; double[] t_Value; t_Index = new int[8]; t_Value = new double[8]; //SET TIME FRAME 0=5MIN, 1=15MIN, 2=1HR, 3=4HR, 4=D, 5=W, 6=M. t_TF = 5; // LOOP TO DISPLAY LAST 4 VALUES for (int b = 0; b < LP1; b++) { //LOOP FOR 8-MAJOR PAIRS : COPY VALUES for (int i = 0; i < 8; i++) { // COPY IN TEMP ARRAY : serial#, Pip value t_Index[i] = i; t_Value[i] = All_MajorPair_Total_Pips[b, i, t_TF]; } //END FOR // SORT THE TEMP ARRAY INTO DESCENDING ORDER bool change = true; while (change == true) { change = false; // COMPARE VALUES [LOOP WILL RUN ONE LESS] for (int i = 0; i < 7; i++) { if (t_Value[i] < t_Value[i + 1]) { change = true; //SWAP FIRST INDEX VALUES (COUNTER) OF THE TEMP ARRAY t_1 = t_Index[i + 1]; t_Index[i + 1] = t_Index[i]; t_Index[i] = t_1; //SWAP 2ND INDEX VALUES (TOTAL PIP) OF THE TEMP ARRAY t_2 = t_Value[i + 1]; t_Value[i + 1] = t_Value[i]; t_Value[i] = t_2; } //END IF } //END FOR } //END WHILE SORTING //LOOP FOR 8-MAJOR PAIRS : COPY FROM TEMP ARRAY TO SORTED ARRAY for (int i = 0; i < 8; i++) { Sorted_MajorPair_Weekly_Total_Pips[b, i] = t_Index[i]; } // END FOR } // END FOR B } //END METHOD Sort_MajorPair_Weekly_TotalPips_Array ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Sort_MajorPair_Monthly_TotalPips_Array /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Sort_MajorPair_Monthly_TotalPips_Array() { int t_1 = 0; int t_TF; double t_2 = 0; // TEMP ARRAY FOR STORING INDEX VALUE AND ARRAY VALUE int[] t_Index; double[] t_Value; t_Index = new int[8]; t_Value = new double[8]; //SET TIME FRAME 0=5MIN, 1=15MIN, 2=1HR, 3=4HR, 4=D, 5=W, 6=M. t_TF = 6; // LOOP TO DISPLAY LAST 4 VALUES for (int b = 0; b < LP1; b++) { //LOOP FOR 8-MAJOR PAIRS : COPY VALUES for (int i = 0; i < 8; i++) { // COPY IN TEMP ARRAY : serial#, Pip value t_Index[i] = i; t_Value[i] = All_MajorPair_Total_Pips[b, i, t_TF]; } //END FOR // SORT THE TEMP ARRAY INTO DESCENDING ORDER bool change = true; while (change == true) { change = false; // COMPARE VALUES [LOOP WILL RUN ONE LESS] for (int i = 0; i < 7; i++) { if (t_Value[i] < t_Value[i + 1]) { change = true; //SWAP FIRST INDEX VALUES (COUNTER) OF THE TEMP ARRAY t_1 = t_Index[i + 1]; t_Index[i + 1] = t_Index[i]; t_Index[i] = t_1; //SWAP 2ND INDEX VALUES (TOTAL PIP) OF THE TEMP ARRAY t_2 = t_Value[i + 1]; t_Value[i + 1] = t_Value[i]; t_Value[i] = t_2; } //END IF } //END FOR } //END WHILE SORTING //LOOP FOR 8-MAJOR PAIRS : COPY FROM TEMP ARRAY TO SORTED ARRAY for (int i = 0; i < 8; i++) { Sorted_MajorPair_Monthly_Total_Pips[b, i] = t_Index[i]; } // END FOR } // END FOR B } //END METHOD Sort_MajorPair_Monthly_TotalPips_Array ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Display_MajorPair_15min_Total_Pips /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Display_MajorPair_15min_Total_Pips(int t_Row, int t_Col) { int t_Line_no = 0, t_Col_no = 0, t_Offset = 0, t_1 = 0; double t_Total_Pip = 0, t_2 = 0; double t_ATR; int t_TF; string tstr_TPips, tstr_Symbol_Code, temp_1, tstr_TFrame, tstr_GrandTotal, tstr_ATR; Colors t_Clr; //SET TIME FRAME 0=5MIN, 1=15MIN, 2=1HR, 3=4HR, 4=D, 5=W, 6=M. t_TF = 1; // SET THE LINE # AND COLUMN # t_Line_no = t_Row; t_Col_no = t_Col; t_Offset = 2; // DISPLAY AVERAGE VALUES --------------------------------------------------------------------------------- // COLUMN HEADINGs Draw_OnChart_C1("AvgPips01", (t_Line_no - 2), (t_Col_no), "AVERAGE", Clr_Heading_1); Draw_OnChart_C1("AvgPips02", (t_Line_no - 1), (t_Col_no), "MAJOR PAIR", Clr_Heading_1); Draw_OnChart_C1("AvgPips03", (t_Line_no - 2), (t_Col_no + t_Offset), "15-min", Clr_Heading_1); Draw_OnChart_C1("AvgPips04", (t_Line_no - 1), (t_Col_no + t_Offset), "AVG-Pips", Clr_Heading_1); //LOOP TO DISPLAY AVERAGE VALUES for (int i = 0; i < 8; i++) { // CONVERT t_Last_Price to STRING FOR UNIQUE OBJECT NAME IN Draw_OnChart_C1 METHOD temp_1 = i.ToString(); // SORT AS PER THE CURRENT SORTED MAJOR PAIR VALUES t_1 = Sorted_MajorPair_15min_Total_Pips[0, i]; // GET SYMBOL CODE AS PER THE t_Index tstr_Symbol_Code = i.ToString("0") + ". " + MajorPair_Headings[t_1]; // GET WEEKLY TOTAL PIPS MOVED FROM OPEN AND CONVERT TO STRING t_Total_Pip = Avg_All_MajorPair_Total_Pips[t_1, t_TF]; tstr_TPips = t_Total_Pip.ToString("0"); // GET TOTAL PIP FOR COMPARISON WITH AVERAGE TO SET THE COLOR t_2 = Math.Abs(All_MajorPair_Total_Pips[0, t_1, t_TF]); // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_2 >= t_Total_Pip) t_Clr = Clr_Above; else t_Clr = Clr_Below; // DRAW ON CHART(OBJ_NAME, LINE#, COL#, Text_To_Display, ColorName); Draw_OnChart_C1("AVGPips05" + temp_1, t_Line_no, (t_Col_no), tstr_Symbol_Code, Clr_PairListing); Draw_OnChart_C1("AVGPips06" + temp_1, t_Line_no, (t_Col_no + t_Offset), tstr_TPips, t_Clr); // INC. THE LINE # t_Line_no += 1; // LEAVE A BLANK LINE if (i == 3) t_Line_no += 1; } //END FOR I // DISPLAY : AVERAGE OF 28 PAIRS TOTAL PIPS : CURRENT MONTH if (GTotal_28Pair_Total_Pips[0, t_TF] >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; tstr_GrandTotal = (GTotal_28Pair_Total_Pips[0, t_TF] / 28).ToString("0"); Draw_OnChart_C1("AvgPips07", t_Line_no, (t_Col_no), "Avg of 28-Pairs", t_Clr); Draw_OnChart_C1("AvgPips08", t_Line_no, (t_Col_no + t_Offset), tstr_GrandTotal, t_Clr); // DISPLAY TOTAL PIPS --------------------------------------------------------------------------------- // RESET ROW COL POSITION TO DISPLAY THE NEXT LOOP VALUES t_Line_no = t_Row; t_Col_no = t_Col_no + 4; // LOOP TO DISPLAY LAST x VALUES for (int l = 0; l < LP1; l++) { // CONVERT t_Last_Price to STRING FOR UNIQUE OBJECT NAME IN Draw_OnChart_C1 METHOD temp_1 = l.ToString(); // GET THE TIME FRAME NAME tstr_TFrame = LP1_TF_Name[l]; // COLUMN HEADINGs Draw_OnChart_C1("PrvMPips01" + temp_1, (t_Line_no - 2), (t_Col_no), tstr_TFrame, Clr_Heading_1); Draw_OnChart_C1("PrvMPips02" + temp_1, (t_Line_no - 1), (t_Col_no), "MAJOR PAIR", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips03" + temp_1, (t_Line_no - 2), (t_Col_no + t_Offset), "15-min", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips04" + temp_1, (t_Line_no - 1), (t_Col_no + t_Offset), "T-Pips", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips05" + temp_1, (t_Line_no - 2), (t_Col_no + t_Offset + 1), "15-min", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips06" + temp_1, (t_Line_no - 1), (t_Col_no + t_Offset + 1), "ATR", Clr_Heading_1); // LOOP FOR 8 MAJOR-PAIRS : DISPLAY SYMBOL CODE AND TOTAL PIPS ON CHART for (int i = 0; i < 8; i++) { // GET THE SYMBOL INDEX FROM THE SORTED TEMP ARRAY t_1 = Sorted_MajorPair_15min_Total_Pips[l, i]; // GET SYMBOL CODE AS PER THE t_Index tstr_Symbol_Code = i.ToString("0") + ". " + MajorPair_Headings[t_1]; // GET WEEKLY TOTAL PIPS MOVED FROM OPEN AND CONVERT TO STRING t_Total_Pip = All_MajorPair_Total_Pips[l, t_1, t_TF]; tstr_TPips = t_Total_Pip.ToString("0"); // GET ATR VALUE t_ATR = All_MajorPair_ATR_Value[l, t_1, t_TF]; tstr_ATR = t_ATR.ToString(); // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_Total_Pip >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_Total_Pip >= t_ATR) t_Clr = Clr_Above; // DRAW ON CHART(OBJ_NAME, LINE#, COL#, Text_To_Display, ColorName); Draw_OnChart_C1("PrvMPips07" + temp_1, t_Line_no, (t_Col_no), tstr_Symbol_Code, Clr_PairListing); Draw_OnChart_C1("PrvMPips08" + temp_1, t_Line_no, (t_Col_no + t_Offset), tstr_TPips, t_Clr); // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_Total_Pip >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; // DRAW ATR VALUES ON CHART Draw_OnChart_C1("PrvMPips10" + temp_1, t_Line_no, (t_Col_no + t_Offset + 1), tstr_ATR, t_Clr); // INC. THE LINE # t_Line_no += 1; // LEAVE A BLANK LINE if (i == 3) t_Line_no += 1; } //END FOR I // ---------------------------------------------------------------------------------------------------------- // ON THE LAST LINE DISPLAY THE GRAND TOTAL OF ALL 28PAIRS : DAILY // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (GTotal_28Pair_Total_Pips[l, t_TF] >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; // DISPLAY GRAND_TOTAL OF TOTAL_DAILY_PIPS tstr_GrandTotal = GTotal_28Pair_Total_Pips[l, t_TF].ToString("0"); tstr_ATR = GTotal_28Pair_ATR_Value[l, t_TF].ToString(""); Draw_OnChart_C1("PrvMPips11" + temp_1, t_Line_no, (t_Col_no), "Total 28-Pairs", t_Clr); Draw_OnChart_C1("PrvMPips12" + temp_1, t_Line_no, (t_Col_no + t_Offset), tstr_GrandTotal, t_Clr); Draw_OnChart_C1("PrvMPips13" + temp_1, t_Line_no, (t_Col_no + t_Offset + 1), tstr_ATR, t_Clr); // INCREASE THE LINE SPACE FOR NEXT SET OF TIMEFRAME VALUES t_Line_no = t_Row; t_Col_no = t_Col_no + 5; } // END FOR L } //END MEHTOD Display_MajorPair_15min_Total_Pips ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Display_MajorPair_Hourly_Total_Pips /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Display_MajorPair_Hourly_Total_Pips(int t_Row, int t_Col) { int t_Line_no = 0, t_Col_no = 0, t_Offset = 0, t_1 = 0; double t_Total_Pip = 0, t_2 = 0; double t_ATR; int t_TF; string tstr_TPips, tstr_Symbol_Code, temp_1, tstr_TFrame, tstr_GrandTotal, tstr_ATR; Colors t_Clr; //SET TIME FRAME 0=5MIN, 1=15MIN, 2=1HR, 3=4HR, 4=D, 5=W, 6=M. t_TF = 2; // SET THE LINE # AND COLUMN # t_Line_no = t_Row; t_Col_no = t_Col; t_Offset = 2; // DISPLAY AVERAGE VALUES --------------------------------------------------------------------------------- // COLUMN HEADINGs Draw_OnChart_C1("AvgPips01", (t_Line_no - 2), (t_Col_no), "AVERAGE", Clr_Heading_1); Draw_OnChart_C1("AvgPips02", (t_Line_no - 1), (t_Col_no), "MAJOR PAIR", Clr_Heading_1); Draw_OnChart_C1("AvgPips03", (t_Line_no - 2), (t_Col_no + t_Offset), "1-Hour", Clr_Heading_1); Draw_OnChart_C1("AvgPips04", (t_Line_no - 1), (t_Col_no + t_Offset), "AVG-Pips", Clr_Heading_1); //LOOP TO DISPLAY AVERAGE VALUES for (int i = 0; i < 8; i++) { // CONVERT t_Last_Price to STRING FOR UNIQUE OBJECT NAME IN Draw_OnChart_C1 METHOD temp_1 = i.ToString(); // SORT AS PER THE CURRENT SORTED MAJOR PAIR VALUES t_1 = Sorted_MajorPair_Hourly_Total_Pips[0, i]; // GET SYMBOL CODE AS PER THE t_Index tstr_Symbol_Code = i.ToString("0") + ". " + MajorPair_Headings[t_1]; // GET WEEKLY TOTAL PIPS MOVED FROM OPEN AND CONVERT TO STRING t_Total_Pip = Avg_All_MajorPair_Total_Pips[t_1, t_TF]; tstr_TPips = t_Total_Pip.ToString("0"); // GET TOTAL PIP FOR COMPARISON WITH AVERAGE TO SET THE COLOR t_2 = Math.Abs(All_MajorPair_Total_Pips[0, t_1, t_TF]); // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_2 >= t_Total_Pip) t_Clr = Clr_Above; else t_Clr = Clr_Below; // DRAW ON CHART(OBJ_NAME, LINE#, COL#, Text_To_Display, ColorName); Draw_OnChart_C1("AVGPips05" + temp_1, t_Line_no, (t_Col_no), tstr_Symbol_Code, Clr_PairListing); Draw_OnChart_C1("AVGPips06" + temp_1, t_Line_no, (t_Col_no + t_Offset), tstr_TPips, t_Clr); // INC. THE LINE # t_Line_no += 1; // LEAVE A BLANK LINE if (i == 3) t_Line_no += 1; } //END FOR I // DISPLAY : AVERAGE OF 28 PAIRS TOTAL PIPS : CURRENT MONTH if (GTotal_28Pair_Total_Pips[0, t_TF] >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; tstr_GrandTotal = (GTotal_28Pair_Total_Pips[0, t_TF] / 28).ToString("0"); Draw_OnChart_C1("AvgPips07", t_Line_no, (t_Col_no), "Avg of 28-Pairs", t_Clr); Draw_OnChart_C1("AvgPips08", t_Line_no, (t_Col_no + t_Offset), tstr_GrandTotal, t_Clr); // DISPLAY TOTAL PIPS --------------------------------------------------------------------------------- // RESET ROW COL POSITION TO DISPLAY THE NEXT LOOP VALUES t_Line_no = t_Row; t_Col_no = t_Col_no + 4; // LOOP TO DISPLAY LAST x VALUES for (int l = 0; l < LP1; l++) { // CONVERT t_Last_Price to STRING FOR UNIQUE OBJECT NAME IN Draw_OnChart_C1 METHOD temp_1 = l.ToString(); // GET THE TIME FRAME NAME tstr_TFrame = LP1_TF_Name[l]; // COLUMN HEADINGs Draw_OnChart_C1("PrvMPips01" + temp_1, (t_Line_no - 2), (t_Col_no), tstr_TFrame, Clr_Heading_1); Draw_OnChart_C1("PrvMPips02" + temp_1, (t_Line_no - 1), (t_Col_no), "MAJOR PAIR", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips03" + temp_1, (t_Line_no - 2), (t_Col_no + t_Offset), "1-Hour", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips04" + temp_1, (t_Line_no - 1), (t_Col_no + t_Offset), "T-Pips", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips05" + temp_1, (t_Line_no - 2), (t_Col_no + t_Offset + 1), "1-Hour", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips06" + temp_1, (t_Line_no - 1), (t_Col_no + t_Offset + 1), "ATR", Clr_Heading_1); // LOOP FOR 8 MAJOR-PAIRS : DISPLAY SYMBOL CODE AND TOTAL PIPS ON CHART for (int i = 0; i < 8; i++) { // GET THE SYMBOL INDEX FROM THE SORTED TEMP ARRAY t_1 = Sorted_MajorPair_Hourly_Total_Pips[l, i]; // GET SYMBOL CODE AS PER THE t_Index tstr_Symbol_Code = i.ToString("0") + ". " + MajorPair_Headings[t_1]; // GET WEEKLY TOTAL PIPS MOVED FROM OPEN AND CONVERT TO STRING t_Total_Pip = All_MajorPair_Total_Pips[l, t_1, t_TF]; tstr_TPips = t_Total_Pip.ToString("0"); // GET ATR VALUE t_ATR = All_MajorPair_ATR_Value[l, t_1, t_TF]; tstr_ATR = t_ATR.ToString(); // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_Total_Pip >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_Total_Pip >= t_ATR) t_Clr = Clr_Above; // DRAW ON CHART(OBJ_NAME, LINE#, COL#, Text_To_Display, ColorName); Draw_OnChart_C1("PrvMPips07" + temp_1, t_Line_no, (t_Col_no), tstr_Symbol_Code, Clr_PairListing); Draw_OnChart_C1("PrvMPips08" + temp_1, t_Line_no, (t_Col_no + t_Offset), tstr_TPips, t_Clr); // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_Total_Pip >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; // DRAW ATR VALUES ON CHART Draw_OnChart_C1("PrvMPips10" + temp_1, t_Line_no, (t_Col_no + t_Offset + 1), tstr_ATR, t_Clr); // INC. THE LINE # t_Line_no += 1; // LEAVE A BLANK LINE if (i == 3) t_Line_no += 1; } //END FOR I // ---------------------------------------------------------------------------------------------------------- // ON THE LAST LINE DISPLAY THE GRAND TOTAL OF ALL 28PAIRS : DAILY // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (GTotal_28Pair_Total_Pips[l, t_TF] >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; // DISPLAY GRAND_TOTAL OF TOTAL_DAILY_PIPS tstr_GrandTotal = GTotal_28Pair_Total_Pips[l, t_TF].ToString("0"); tstr_ATR = GTotal_28Pair_ATR_Value[l, t_TF].ToString(""); Draw_OnChart_C1("PrvMPips11" + temp_1, t_Line_no, (t_Col_no), "Total 28-Pairs", t_Clr); Draw_OnChart_C1("PrvMPips12" + temp_1, t_Line_no, (t_Col_no + t_Offset), tstr_GrandTotal, t_Clr); Draw_OnChart_C1("PrvMPips13" + temp_1, t_Line_no, (t_Col_no + t_Offset + 1), tstr_ATR, t_Clr); // INCREASE THE LINE SPACE FOR NEXT SET OF TIMEFRAME VALUES t_Line_no = t_Row; t_Col_no = t_Col_no + 5; } // END FOR L } //END MEHTOD Display_MajorPair_Hourly_Total_Pips ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Display_MajorPair_4Hour_Total_Pips /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Display_MajorPair_4Hour_Total_Pips(int t_Row, int t_Col) { int t_Line_no = 0, t_Col_no = 0, t_Offset = 0, t_1 = 0; double t_Total_Pip = 0, t_2 = 0; double t_ATR; int t_TF; string tstr_TPips, tstr_Symbol_Code, temp_1, tstr_TFrame, tstr_GrandTotal, tstr_ATR; Colors t_Clr; //SET TIME FRAME 0=5MIN, 1=15MIN, 2=1HR, 3=4HR, 4=D, 5=W, 6=M. t_TF = 3; // SET THE LINE # AND COLUMN # t_Line_no = t_Row; t_Col_no = t_Col; t_Offset = 2; // DISPLAY AVERAGE VALUES --------------------------------------------------------------------------------- // COLUMN HEADINGs Draw_OnChart_C1("AvgPips01", (t_Line_no - 2), (t_Col_no), "AVERAGE", Clr_Heading_1); Draw_OnChart_C1("AvgPips02", (t_Line_no - 1), (t_Col_no), "MAJOR PAIR", Clr_Heading_1); Draw_OnChart_C1("AvgPips03", (t_Line_no - 2), (t_Col_no + t_Offset), "4-Hour", Clr_Heading_1); Draw_OnChart_C1("AvgPips04", (t_Line_no - 1), (t_Col_no + t_Offset), "AVG-Pips", Clr_Heading_1); //LOOP TO DISPLAY AVERAGE VALUES for (int i = 0; i < 8; i++) { // CONVERT t_Last_Price to STRING FOR UNIQUE OBJECT NAME IN Draw_OnChart_C1 METHOD temp_1 = i.ToString(); // SORT AS PER THE CURRENT SORTED MAJOR PAIR VALUES t_1 = Sorted_MajorPair_4Hour_Total_Pips[0, i]; // GET SYMBOL CODE AS PER THE t_Index tstr_Symbol_Code = i.ToString("0") + ". " + MajorPair_Headings[t_1]; // GET WEEKLY TOTAL PIPS MOVED FROM OPEN AND CONVERT TO STRING t_Total_Pip = Avg_All_MajorPair_Total_Pips[t_1, t_TF]; tstr_TPips = t_Total_Pip.ToString("0"); // GET TOTAL PIP FOR COMPARISON WITH AVERAGE TO SET THE COLOR t_2 = Math.Abs(All_MajorPair_Total_Pips[0, t_1, t_TF]); // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_2 >= t_Total_Pip) t_Clr = Clr_Above; else t_Clr = Clr_Below; // DRAW ON CHART(OBJ_NAME, LINE#, COL#, Text_To_Display, ColorName); Draw_OnChart_C1("AVGPips05" + temp_1, t_Line_no, (t_Col_no), tstr_Symbol_Code, Clr_PairListing); Draw_OnChart_C1("AVGPips06" + temp_1, t_Line_no, (t_Col_no + t_Offset), tstr_TPips, t_Clr); // INC. THE LINE # t_Line_no += 1; // LEAVE A BLANK LINE if (i == 3) t_Line_no += 1; } //END FOR I // DISPLAY : AVERAGE OF 28 PAIRS TOTAL PIPS : CURRENT MONTH if (GTotal_28Pair_Total_Pips[0, t_TF] >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; tstr_GrandTotal = (GTotal_28Pair_Total_Pips[0, t_TF] / 28).ToString("0"); Draw_OnChart_C1("AvgPips07", t_Line_no, (t_Col_no), "Avg of 28-Pairs", t_Clr); Draw_OnChart_C1("AvgPips08", t_Line_no, (t_Col_no + t_Offset), tstr_GrandTotal, t_Clr); // DISPLAY TOTAL PIPS --------------------------------------------------------------------------------- // RESET ROW COL POSITION TO DISPLAY THE NEXT LOOP VALUES t_Line_no = t_Row; t_Col_no = t_Col_no + 4; // LOOP TO DISPLAY LAST x VALUES for (int l = 0; l < LP1; l++) { // CONVERT t_Last_Price to STRING FOR UNIQUE OBJECT NAME IN Draw_OnChart_C1 METHOD temp_1 = l.ToString(); // GET THE TIME FRAME NAME tstr_TFrame = LP1_TF_Name[l]; // COLUMN HEADINGs Draw_OnChart_C1("PrvMPips01" + temp_1, (t_Line_no - 2), (t_Col_no), tstr_TFrame, Clr_Heading_1); Draw_OnChart_C1("PrvMPips02" + temp_1, (t_Line_no - 1), (t_Col_no), "MAJOR PAIR", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips03" + temp_1, (t_Line_no - 2), (t_Col_no + t_Offset), "4-Hour", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips04" + temp_1, (t_Line_no - 1), (t_Col_no + t_Offset), "T-Pips", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips05" + temp_1, (t_Line_no - 2), (t_Col_no + t_Offset + 1), "4-Hour", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips06" + temp_1, (t_Line_no - 1), (t_Col_no + t_Offset + 1), "ATR", Clr_Heading_1); // LOOP FOR 8 MAJOR-PAIRS : DISPLAY SYMBOL CODE AND TOTAL PIPS ON CHART for (int i = 0; i < 8; i++) { // GET THE SYMBOL INDEX FROM THE SORTED TEMP ARRAY t_1 = Sorted_MajorPair_4Hour_Total_Pips[l, i]; // GET SYMBOL CODE AS PER THE t_Index tstr_Symbol_Code = i.ToString("0") + ". " + MajorPair_Headings[t_1]; // GET WEEKLY TOTAL PIPS MOVED FROM OPEN AND CONVERT TO STRING t_Total_Pip = All_MajorPair_Total_Pips[l, t_1, t_TF]; tstr_TPips = t_Total_Pip.ToString("0"); // GET ATR VALUE t_ATR = All_MajorPair_ATR_Value[l, t_1, t_TF]; tstr_ATR = t_ATR.ToString(); // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_Total_Pip >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_Total_Pip >= t_ATR) t_Clr = Clr_Above; // DRAW ON CHART(OBJ_NAME, LINE#, COL#, Text_To_Display, ColorName); Draw_OnChart_C1("PrvMPips07" + temp_1, t_Line_no, (t_Col_no), tstr_Symbol_Code, Clr_PairListing); Draw_OnChart_C1("PrvMPips08" + temp_1, t_Line_no, (t_Col_no + t_Offset), tstr_TPips, t_Clr); // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_Total_Pip >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; // DRAW ATR VALUES ON CHART Draw_OnChart_C1("PrvMPips10" + temp_1, t_Line_no, (t_Col_no + t_Offset + 1), tstr_ATR, t_Clr); // INC. THE LINE # t_Line_no += 1; // LEAVE A BLANK LINE if (i == 3) t_Line_no += 1; } //END FOR I // ---------------------------------------------------------------------------------------------------------- // ON THE LAST LINE DISPLAY THE GRAND TOTAL OF ALL 28PAIRS : DAILY // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (GTotal_28Pair_Total_Pips[l, t_TF] >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; // DISPLAY GRAND_TOTAL OF TOTAL_DAILY_PIPS tstr_GrandTotal = GTotal_28Pair_Total_Pips[l, t_TF].ToString("0"); tstr_ATR = GTotal_28Pair_ATR_Value[l, t_TF].ToString(""); Draw_OnChart_C1("PrvMPips11" + temp_1, t_Line_no, (t_Col_no), "Total 28-Pairs", t_Clr); Draw_OnChart_C1("PrvMPips12" + temp_1, t_Line_no, (t_Col_no + t_Offset), tstr_GrandTotal, t_Clr); Draw_OnChart_C1("PrvMPips13" + temp_1, t_Line_no, (t_Col_no + t_Offset + 1), tstr_ATR, t_Clr); // INCREASE THE LINE SPACE FOR NEXT SET OF TIMEFRAME VALUES t_Line_no = t_Row; t_Col_no = t_Col_no + 5; } // END FOR L } //END MEHTOD Display_MajorPair_4Hour_Total_Pips ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Display_MajorPair_Daily_Total_Pips /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Display_MajorPair_Daily_Total_Pips(int t_Row, int t_Col) { int t_Line_no = 0, t_Col_no = 0, t_Offset = 0, t_1 = 0; double t_Total_Pip = 0, t_2 = 0; double t_ATR; int t_TF; string tstr_TPips, tstr_Symbol_Code, temp_1, tstr_TFrame, tstr_GrandTotal, tstr_ATR; Colors t_Clr; //SET TIME FRAME 0=5MIN, 1=15MIN, 2=1HR, 3=4HR, 4=D, 5=W, 6=M. t_TF = 4; // SET THE LINE # AND COLUMN # t_Line_no = t_Row; t_Col_no = t_Col; t_Offset = 2; // DISPLAY AVERAGE VALUES --------------------------------------------------------------------------------- // COLUMN HEADINGs Draw_OnChart_C1("AvgPips01", (t_Line_no - 2), (t_Col_no), "AVERAGE", Clr_Heading_1); Draw_OnChart_C1("AvgPips02", (t_Line_no - 1), (t_Col_no), "MAJOR PAIR", Clr_Heading_1); Draw_OnChart_C1("AvgPips03", (t_Line_no - 2), (t_Col_no + t_Offset), "Daily", Clr_Heading_1); Draw_OnChart_C1("AvgPips04", (t_Line_no - 1), (t_Col_no + t_Offset), "AVG-Pips", Clr_Heading_1); //LOOP TO DISPLAY AVERAGE VALUES for (int i = 0; i < 8; i++) { // CONVERT t_Last_Price to STRING FOR UNIQUE OBJECT NAME IN Draw_OnChart_C1 METHOD temp_1 = i.ToString(); // SORT AS PER THE CURRENT SORTED MAJOR PAIR VALUES t_1 = Sorted_MajorPair_Daily_Total_Pips[0, i]; // GET SYMBOL CODE AS PER THE t_Index tstr_Symbol_Code = i.ToString("0") + ". " + MajorPair_Headings[t_1]; // GET WEEKLY TOTAL PIPS MOVED FROM OPEN AND CONVERT TO STRING t_Total_Pip = Avg_All_MajorPair_Total_Pips[t_1, t_TF]; tstr_TPips = t_Total_Pip.ToString("0"); // GET TOTAL PIP FOR COMPARISON WITH AVERAGE TO SET THE COLOR t_2 = Math.Abs(All_MajorPair_Total_Pips[0, t_1, t_TF]); // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_2 >= t_Total_Pip) t_Clr = Clr_Above; else t_Clr = Clr_Below; // DRAW ON CHART(OBJ_NAME, LINE#, COL#, Text_To_Display, ColorName); Draw_OnChart_C1("AVGPips05" + temp_1, t_Line_no, (t_Col_no), tstr_Symbol_Code, Clr_PairListing); Draw_OnChart_C1("AVGPips06" + temp_1, t_Line_no, (t_Col_no + t_Offset), tstr_TPips, t_Clr); // INC. THE LINE # t_Line_no += 1; // LEAVE A BLANK LINE if (i == 3) t_Line_no += 1; } //END FOR I // DISPLAY : AVERAGE OF 28 PAIRS TOTAL PIPS : CURRENT MONTH if (GTotal_28Pair_Total_Pips[0, t_TF] >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; tstr_GrandTotal = (GTotal_28Pair_Total_Pips[0, t_TF] / 28).ToString("0"); Draw_OnChart_C1("AvgPips07", t_Line_no, (t_Col_no), "Avg of 28-Pairs", t_Clr); Draw_OnChart_C1("AvgPips08", t_Line_no, (t_Col_no + t_Offset), tstr_GrandTotal, t_Clr); // DISPLAY TOTAL PIPS --------------------------------------------------------------------------------- // RESET ROW COL POSITION TO DISPLAY THE NEXT LOOP VALUES t_Line_no = t_Row; t_Col_no = t_Col_no + 4; // LOOP TO DISPLAY LAST x VALUES for (int l = 0; l < LP1; l++) { // CONVERT t_Last_Price to STRING FOR UNIQUE OBJECT NAME IN Draw_OnChart_C1 METHOD temp_1 = l.ToString(); // GET THE TIME FRAME NAME tstr_TFrame = LP1_TF_Name[l]; // COLUMN HEADINGs Draw_OnChart_C1("PrvMPips01" + temp_1, (t_Line_no - 2), (t_Col_no), tstr_TFrame, Clr_Heading_1); Draw_OnChart_C1("PrvMPips02" + temp_1, (t_Line_no - 1), (t_Col_no), "MAJOR PAIR", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips03" + temp_1, (t_Line_no - 2), (t_Col_no + t_Offset), "Daily", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips04" + temp_1, (t_Line_no - 1), (t_Col_no + t_Offset), "T-Pips", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips05" + temp_1, (t_Line_no - 2), (t_Col_no + t_Offset + 1), "Daily", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips06" + temp_1, (t_Line_no - 1), (t_Col_no + t_Offset + 1), "ATR", Clr_Heading_1); // LOOP FOR 8 MAJOR-PAIRS : DISPLAY SYMBOL CODE AND TOTAL PIPS ON CHART for (int i = 0; i < 8; i++) { // GET THE SYMBOL INDEX FROM THE SORTED TEMP ARRAY t_1 = Sorted_MajorPair_Daily_Total_Pips[l, i]; // GET SYMBOL CODE AS PER THE t_Index tstr_Symbol_Code = i.ToString("0") + ". " + MajorPair_Headings[t_1]; // GET WEEKLY TOTAL PIPS MOVED FROM OPEN AND CONVERT TO STRING t_Total_Pip = All_MajorPair_Total_Pips[l, t_1, t_TF]; tstr_TPips = t_Total_Pip.ToString("0"); // GET ATR VALUE t_ATR = All_MajorPair_ATR_Value[l, t_1, t_TF]; tstr_ATR = t_ATR.ToString(); // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_Total_Pip >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_Total_Pip >= t_ATR) t_Clr = Clr_Above; // DRAW ON CHART(OBJ_NAME, LINE#, COL#, Text_To_Display, ColorName); Draw_OnChart_C1("PrvMPips07" + temp_1, t_Line_no, (t_Col_no), tstr_Symbol_Code, Clr_PairListing); Draw_OnChart_C1("PrvMPips08" + temp_1, t_Line_no, (t_Col_no + t_Offset), tstr_TPips, t_Clr); // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_Total_Pip >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; // DRAW ATR VALUES ON CHART Draw_OnChart_C1("PrvMPips10" + temp_1, t_Line_no, (t_Col_no + t_Offset + 1), tstr_ATR, t_Clr); // INC. THE LINE # t_Line_no += 1; // LEAVE A BLANK LINE if (i == 3) t_Line_no += 1; } //END FOR I // ---------------------------------------------------------------------------------------------------------- // ON THE LAST LINE DISPLAY THE GRAND TOTAL OF ALL 28PAIRS : DAILY // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (GTotal_28Pair_Total_Pips[l, t_TF] >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; // DISPLAY GRAND_TOTAL OF TOTAL_DAILY_PIPS tstr_GrandTotal = GTotal_28Pair_Total_Pips[l, t_TF].ToString("0"); tstr_ATR = GTotal_28Pair_ATR_Value[l, t_TF].ToString(""); Draw_OnChart_C1("PrvMPips11" + temp_1, t_Line_no, (t_Col_no), "Total 28-Pairs", t_Clr); Draw_OnChart_C1("PrvMPips12" + temp_1, t_Line_no, (t_Col_no + t_Offset), tstr_GrandTotal, t_Clr); Draw_OnChart_C1("PrvMPips13" + temp_1, t_Line_no, (t_Col_no + t_Offset + 1), tstr_ATR, t_Clr); // INCREASE THE LINE SPACE FOR NEXT SET OF TIMEFRAME VALUES t_Line_no = t_Row; t_Col_no = t_Col_no + 5; } // END FOR L } //END MEHTOD Display_MajorPair_Daily_Total_Pips ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Display_MajorPair_Weekly_Total_Pips /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Display_MajorPair_Weekly_Total_Pips(int t_Row, int t_Col) { int t_Line_no = 0, t_Col_no = 0, t_Offset = 0, t_1 = 0; double t_Total_Pip = 0, t_2 = 0; double t_ATR; int t_TF; string tstr_TPips, tstr_Symbol_Code, temp_1, tstr_TFrame, tstr_GrandTotal, tstr_ATR; Colors t_Clr; //SET TIME FRAME 0=5MIN, 1=15MIN, 2=1HR, 3=4HR, 4=D, 5=W, 6=M. t_TF = 5; // SET THE LINE # AND COLUMN # t_Line_no = t_Row; t_Col_no = t_Col; t_Offset = 2; // DISPLAY AVERAGE VALUES --------------------------------------------------------------------------------- // COLUMN HEADINGs Draw_OnChart_C1("AvgPips01", (t_Line_no - 2), (t_Col_no), "AVERAGE", Clr_Heading_1); Draw_OnChart_C1("AvgPips02", (t_Line_no - 1), (t_Col_no), "MAJOR PAIR", Clr_Heading_1); Draw_OnChart_C1("AvgPips03", (t_Line_no - 2), (t_Col_no + t_Offset), "Weekly", Clr_Heading_1); Draw_OnChart_C1("AvgPips04", (t_Line_no - 1), (t_Col_no + t_Offset), "AVG-Pips", Clr_Heading_1); //LOOP TO DISPLAY AVERAGE VALUES for (int i = 0; i < 8; i++) { // CONVERT t_Last_Price to STRING FOR UNIQUE OBJECT NAME IN Draw_OnChart_C1 METHOD temp_1 = i.ToString(); // SORT AS PER THE CURRENT SORTED MAJOR PAIR VALUES t_1 = Sorted_MajorPair_Weekly_Total_Pips[0, i]; // GET SYMBOL CODE AS PER THE t_Index tstr_Symbol_Code = i.ToString("0") + ". " + MajorPair_Headings[t_1]; // GET WEEKLY TOTAL PIPS MOVED FROM OPEN AND CONVERT TO STRING t_Total_Pip = Avg_All_MajorPair_Total_Pips[t_1, t_TF]; tstr_TPips = t_Total_Pip.ToString("0"); // GET TOTAL PIP FOR COMPARISON WITH AVERAGE TO SET THE COLOR t_2 = Math.Abs(All_MajorPair_Total_Pips[0, t_1, t_TF]); // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_2 >= t_Total_Pip) t_Clr = Clr_Above; else t_Clr = Clr_Below; // DRAW ON CHART(OBJ_NAME, LINE#, COL#, Text_To_Display, ColorName); Draw_OnChart_C1("AVGPips05" + temp_1, t_Line_no, (t_Col_no), tstr_Symbol_Code, Clr_PairListing); Draw_OnChart_C1("AVGPips06" + temp_1, t_Line_no, (t_Col_no + t_Offset), tstr_TPips, t_Clr); // INC. THE LINE # t_Line_no += 1; // LEAVE A BLANK LINE if (i == 3) t_Line_no += 1; } //END FOR I // DISPLAY : AVERAGE OF 28 PAIRS TOTAL PIPS : CURRENT MONTH if (GTotal_28Pair_Total_Pips[0, t_TF] >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; tstr_GrandTotal = (GTotal_28Pair_Total_Pips[0, t_TF] / 28).ToString("0"); Draw_OnChart_C1("AvgPips07", t_Line_no, (t_Col_no), "Avg of 28-Pairs", t_Clr); Draw_OnChart_C1("AvgPips08", t_Line_no, (t_Col_no + t_Offset), tstr_GrandTotal, t_Clr); // DISPLAY TOTAL PIPS --------------------------------------------------------------------------------- // RESET ROW COL POSITION TO DISPLAY THE NEXT LOOP VALUES t_Line_no = t_Row; t_Col_no = t_Col_no + 4; // LOOP TO DISPLAY LAST x VALUES for (int l = 0; l < LP1; l++) { // CONVERT t_Last_Price to STRING FOR UNIQUE OBJECT NAME IN Draw_OnChart_C1 METHOD temp_1 = l.ToString(); // GET THE TIME FRAME NAME tstr_TFrame = LP1_TF_Name[l]; // COLUMN HEADINGs Draw_OnChart_C1("PrvMPips01" + temp_1, (t_Line_no - 2), (t_Col_no), tstr_TFrame, Clr_Heading_1); Draw_OnChart_C1("PrvMPips02" + temp_1, (t_Line_no - 1), (t_Col_no), "MAJOR PAIR", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips03" + temp_1, (t_Line_no - 2), (t_Col_no + t_Offset), "Week", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips04" + temp_1, (t_Line_no - 1), (t_Col_no + t_Offset), "T-Pips", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips05" + temp_1, (t_Line_no - 2), (t_Col_no + t_Offset + 1), "Week", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips06" + temp_1, (t_Line_no - 1), (t_Col_no + t_Offset + 1), "ATR", Clr_Heading_1); // LOOP FOR 8 MAJOR-PAIRS : DISPLAY SYMBOL CODE AND TOTAL PIPS ON CHART for (int i = 0; i < 8; i++) { // GET THE SYMBOL INDEX FROM THE SORTED TEMP ARRAY t_1 = Sorted_MajorPair_Weekly_Total_Pips[l, i]; // GET SYMBOL CODE AS PER THE t_Index tstr_Symbol_Code = i.ToString("0") + ". " + MajorPair_Headings[t_1]; // GET WEEKLY TOTAL PIPS MOVED FROM OPEN AND CONVERT TO STRING t_Total_Pip = All_MajorPair_Total_Pips[l, t_1, t_TF]; tstr_TPips = t_Total_Pip.ToString("0"); // GET ATR VALUE t_ATR = All_MajorPair_ATR_Value[l, t_1, t_TF]; tstr_ATR = t_ATR.ToString(); // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_Total_Pip >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_Total_Pip >= t_ATR) t_Clr = Clr_Above; // DRAW ON CHART(OBJ_NAME, LINE#, COL#, Text_To_Display, ColorName); Draw_OnChart_C1("PrvMPips07" + temp_1, t_Line_no, (t_Col_no), tstr_Symbol_Code, Clr_PairListing); Draw_OnChart_C1("PrvMPips08" + temp_1, t_Line_no, (t_Col_no + t_Offset), tstr_TPips, t_Clr); // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_Total_Pip >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; // DRAW ATR VALUES ON CHART Draw_OnChart_C1("PrvMPips10" + temp_1, t_Line_no, (t_Col_no + t_Offset + 1), tstr_ATR, t_Clr); // INC. THE LINE # t_Line_no += 1; // LEAVE A BLANK LINE if (i == 3) t_Line_no += 1; } //END FOR I // ---------------------------------------------------------------------------------------------------------- // ON THE LAST LINE DISPLAY THE GRAND TOTAL OF ALL 28PAIRS : DAILY // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (GTotal_28Pair_Total_Pips[l, t_TF] >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; // DISPLAY GRAND_TOTAL OF TOTAL_DAILY_PIPS tstr_GrandTotal = GTotal_28Pair_Total_Pips[l, t_TF].ToString("0"); tstr_ATR = GTotal_28Pair_ATR_Value[l, t_TF].ToString(""); Draw_OnChart_C1("PrvMPips11" + temp_1, t_Line_no, (t_Col_no), "Total 28-Pairs", t_Clr); Draw_OnChart_C1("PrvMPips12" + temp_1, t_Line_no, (t_Col_no + t_Offset), tstr_GrandTotal, t_Clr); Draw_OnChart_C1("PrvMPips13" + temp_1, t_Line_no, (t_Col_no + t_Offset + 1), tstr_ATR, t_Clr); // INCREASE THE LINE SPACE FOR NEXT SET OF TIMEFRAME VALUES t_Line_no = t_Row; t_Col_no = t_Col_no + 5; } // END FOR L } //END MEHTOD Display_MajorPair_Weekly_Total_Pips ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Display_MajorPair_Monthly_Total_Pips /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Display_MajorPair_Monthly_Total_Pips(int t_Row, int t_Col) { int t_Line_no = 0, t_Col_no = 0, t_Offset = 0, t_1 = 0; double t_Total_Pip = 0, t_2 = 0; double t_ATR; int t_TF; string tstr_TPips, tstr_Symbol_Code, temp_1, tstr_TFrame, tstr_GrandTotal, tstr_ATR; Colors t_Clr; //SET TIME FRAME 0=5MIN, 1=15MIN, 2=1HR, 3=4HR, 4=D, 5=W, 6=M. t_TF = 6; // SET THE LINE # AND COLUMN # t_Line_no = t_Row; t_Col_no = t_Col; t_Offset = 2; // DISPLAY AVERAGE VALUES --------------------------------------------------------------------------------- // COLUMN HEADINGs Draw_OnChart_C1("AvgPips01", (t_Line_no - 2), (t_Col_no), "AVERAGE", Clr_Heading_1); Draw_OnChart_C1("AvgPips02", (t_Line_no - 1), (t_Col_no), "MAJOR PAIR", Clr_Heading_1); Draw_OnChart_C1("AvgPips03", (t_Line_no - 2), (t_Col_no + t_Offset), "Month", Clr_Heading_1); Draw_OnChart_C1("AvgPips04", (t_Line_no - 1), (t_Col_no + t_Offset), "AVG-Pips", Clr_Heading_1); //LOOP TO DISPLAY AVERAGE VALUES for (int i = 0; i < 8; i++) { // CONVERT t_Last_Price to STRING FOR UNIQUE OBJECT NAME IN Draw_OnChart_C1 METHOD temp_1 = i.ToString(); // SORT AS PER THE CURRENT SORTED MAJOR PAIR VALUES t_1 = Sorted_MajorPair_Monthly_Total_Pips[0, i]; // GET SYMBOL CODE AS PER THE t_Index tstr_Symbol_Code = i.ToString("0") + ". " + MajorPair_Headings[t_1]; // GET WEEKLY TOTAL PIPS MOVED FROM OPEN AND CONVERT TO STRING t_Total_Pip = Avg_All_MajorPair_Total_Pips[t_1, t_TF]; tstr_TPips = t_Total_Pip.ToString("0"); // GET TOTAL PIP FOR COMPARISON WITH AVERAGE TO SET THE COLOR t_2 = Math.Abs(All_MajorPair_Total_Pips[0, t_1, t_TF]); // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_2 >= t_Total_Pip) t_Clr = Clr_Above; else t_Clr = Clr_Below; // DRAW ON CHART(OBJ_NAME, LINE#, COL#, Text_To_Display, ColorName); Draw_OnChart_C1("AVGPips05" + temp_1, t_Line_no, (t_Col_no), tstr_Symbol_Code, Clr_PairListing); Draw_OnChart_C1("AVGPips06" + temp_1, t_Line_no, (t_Col_no + t_Offset), tstr_TPips, t_Clr); // INC. THE LINE # t_Line_no += 1; // LEAVE A BLANK LINE if (i == 3) t_Line_no += 1; } //END FOR I // DISPLAY : AVERAGE OF 28 PAIRS TOTAL PIPS : CURRENT MONTH if (GTotal_28Pair_Total_Pips[0, t_TF] >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; tstr_GrandTotal = (GTotal_28Pair_Total_Pips[0, t_TF] / 28).ToString("0"); Draw_OnChart_C1("AvgPips07", t_Line_no, (t_Col_no), "Avg of 28-Pairs", t_Clr); Draw_OnChart_C1("AvgPips08", t_Line_no, (t_Col_no + t_Offset), tstr_GrandTotal, t_Clr); // DISPLAY TOTAL PIPS --------------------------------------------------------------------------------- // RESET ROW COL POSITION TO DISPLAY THE NEXT LOOP VALUES t_Line_no = t_Row; t_Col_no = t_Col_no + 4; // LOOP TO DISPLAY LAST x VALUES for (int l = 0; l < LP1; l++) { // CONVERT t_Last_Price to STRING FOR UNIQUE OBJECT NAME IN Draw_OnChart_C1 METHOD temp_1 = l.ToString(); // GET THE TIME FRAME NAME tstr_TFrame = LP1_TF_Name[l]; // COLUMN HEADINGs Draw_OnChart_C1("PrvMPips01" + temp_1, (t_Line_no - 2), (t_Col_no), tstr_TFrame, Clr_Heading_1); Draw_OnChart_C1("PrvMPips02" + temp_1, (t_Line_no - 1), (t_Col_no), "MAJOR PAIR", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips03" + temp_1, (t_Line_no - 2), (t_Col_no + t_Offset), "Month", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips04" + temp_1, (t_Line_no - 1), (t_Col_no + t_Offset), "T-Pips", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips05" + temp_1, (t_Line_no - 2), (t_Col_no + t_Offset + 1), "Month", Clr_Heading_1); Draw_OnChart_C1("PrvPMPips06" + temp_1, (t_Line_no - 1), (t_Col_no + t_Offset + 1), "ATR", Clr_Heading_1); // LOOP FOR 8 MAJOR-PAIRS : DISPLAY SYMBOL CODE AND TOTAL PIPS ON CHART for (int i = 0; i < 8; i++) { // GET THE SYMBOL INDEX FROM THE SORTED TEMP ARRAY t_1 = Sorted_MajorPair_Monthly_Total_Pips[l, i]; // GET SYMBOL CODE AS PER THE t_Index tstr_Symbol_Code = i.ToString("0") + ". " + MajorPair_Headings[t_1]; // GET WEEKLY TOTAL PIPS MOVED FROM OPEN AND CONVERT TO STRING t_Total_Pip = All_MajorPair_Total_Pips[l, t_1, t_TF]; tstr_TPips = t_Total_Pip.ToString("0"); // GET ATR VALUE t_ATR = All_MajorPair_ATR_Value[l, t_1, t_TF]; tstr_ATR = t_ATR.ToString(); // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_Total_Pip >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_Total_Pip >= t_ATR) t_Clr = Clr_Above; // DRAW ON CHART(OBJ_NAME, LINE#, COL#, Text_To_Display, ColorName); Draw_OnChart_C1("PrvMPips07" + temp_1, t_Line_no, (t_Col_no), tstr_Symbol_Code, Clr_PairListing); Draw_OnChart_C1("PrvMPips08" + temp_1, t_Line_no, (t_Col_no + t_Offset), tstr_TPips, t_Clr); // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (t_Total_Pip >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; // DRAW ATR VALUES ON CHART Draw_OnChart_C1("PrvMPips10" + temp_1, t_Line_no, (t_Col_no + t_Offset + 1), tstr_ATR, t_Clr); // INC. THE LINE # t_Line_no += 1; // LEAVE A BLANK LINE if (i == 3) t_Line_no += 1; } //END FOR I // ---------------------------------------------------------------------------------------------------------- // ON THE LAST LINE DISPLAY THE GRAND TOTAL OF ALL 28PAIRS : DAILY // SET COLOR NAME ON POSITIVE OR NEGATIVE TOTAL PIP FROM OPEN if (GTotal_28Pair_Total_Pips[l, t_TF] >= 0) t_Clr = Clr_Positive; else t_Clr = Clr_Negative; // DISPLAY GRAND_TOTAL OF TOTAL_DAILY_PIPS tstr_GrandTotal = GTotal_28Pair_Total_Pips[l, t_TF].ToString("0"); tstr_ATR = GTotal_28Pair_ATR_Value[l, t_TF].ToString(""); Draw_OnChart_C1("PrvMPips11" + temp_1, t_Line_no, (t_Col_no), "Total 28-Pairs", t_Clr); Draw_OnChart_C1("PrvMPips12" + temp_1, t_Line_no, (t_Col_no + t_Offset), tstr_GrandTotal, t_Clr); Draw_OnChart_C1("PrvMPips13" + temp_1, t_Line_no, (t_Col_no + t_Offset + 1), tstr_ATR, t_Clr); // INCREASE THE LINE SPACE FOR NEXT SET OF TIMEFRAME VALUES t_Line_no = t_Row; t_Col_no = t_Col_no + 5; } // END FOR L } //END MEHTOD Display_MajorPair_Monthly_Total_Pips ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Get_MajorPair_Total_Pips /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Get_MajorPair_Total_Pips() { string tstr_s1; int t_index; double t_Total = 0, t_GrandTotal = 0; // LOOP FOR PREVIOUS PRICES : LP IS A GLOBAL VARIABLE TO SET THE LOOP LIMIT for (int l = 0; l < LP1; l++) { // FOR : 5MIN, 15MIN, 1HOUR, 4HOUR, DAILY, WEEKLY, MONTHLY for (int k = 0; k < 7; k++) { // 8 - MAJOR PAIR for (int i = 0; i < 8; i++) { // 7 - SUB PAIR for (int j = 0; j < 7; j++) { tstr_s1 = MajorPair_Combo[i, j]; // MEHTOD CALL t_index = Return_Pair_Index_Position(tstr_s1); // GET 15-MINS TOTAL PIPS t_Total += (All_28Pair_Total_Pips[l, t_index, k] * Base_Currency[i, j]); All_MajorPair_Total_Pips[l, i, k] = t_Total; } //END FOR j //RESET t_Total = 0; // GRAND TOTAL OF ALL VALUES t_GrandTotal += All_MajorPair_Total_Pips[l, i, k]; GTotal_MajorPair_Total_Pips[l, k] = t_GrandTotal; } //END FOR i //RESET t_GrandTotal = 0; } //END FOR k } // END FOR l } //END MEHTOD Get_MajorPair_Total_Pips ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Get_MajorPair_ATR_Values /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Get_MajorPair_ATR_Values() { string tstr_s1; int t_index; double t_Total = 0, t_GrandTotal = 0; // LOOP FOR PREVIOUS PRICES : LP IS A GLOBAL VARIABLE TO SET THE LOOP LIMIT for (int l = 0; l < LP1; l++) { // FOR : 5MIN, 15MIN, 1HOUR, 4HOUR, DAILY, WEEKLY, MONTHLY for (int k = 0; k < 7; k++) { // 8 - MAJOR PAIR for (int i = 0; i < 8; i++) { // 7 - SUB PAIR for (int j = 0; j < 7; j++) { tstr_s1 = MajorPair_Combo[i, j]; // MEHTOD CALL t_index = Return_Pair_Index_Position(tstr_s1); // GET 15-MINS TOTAL PIPS t_Total += (All_28Pair_ATR_Value[l, t_index, k]); All_MajorPair_ATR_Value[l, i, k] = t_Total; } //END FOR j //RESET t_Total = 0; // GRAND TOTAL OF ALL VALUES t_GrandTotal += All_MajorPair_ATR_Value[l, i, k]; GTotal_MajorPair_ATR_Value[l, k] = t_GrandTotal; } //END FOR i //RESET t_GrandTotal = 0; } //END FOR k } // END FOR l } //END MEHTOD Get_MajorPair_ATR_Values ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Load_28Pair_ATR_Values /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Load_28Pair_ATR_Values() { double t_PipSize; double t_0 = 0, t_1 = 0, t_2 = 0, t_3 = 0, t_4 = 0, t_5 = 0, t_6 = 0; Symbol t_Symbol; string tstr_Symbol_Code; int t_ind; // LOOP FOR PREVIOUS PRICES : LP IS A GLOBAL VARIABLE TO SET THE LOOP LIMIT for (int l = 0; l < LP1; l++) { t_ind = LP1_Array_Open[l]; //LOOP FOR 28 PAIRS for (int i = 0; i < 28; i++) { // GET SYMBOL t_Symbol = Get_28Pair_Symbol(i); tstr_Symbol_Code = t_Symbol.Code.ToString(); t_PipSize = t_Symbol.PipSize; //GET A TEMP VARIABLE FOR MARKETDATA FOR THE SYMBOL AND TIME FRAME SPECIFIED BY USER // 5-MIN var temp_1 = MarketData.GetSeries(tstr_Symbol_Code, TF_5min); ATR_Indicator_1 = Indicators.AverageTrueRange(temp_1, ATR_P_5min, p_ATR_MA_Type); // 15-MIN var temp_2 = MarketData.GetSeries(tstr_Symbol_Code, TF_15min); ATR_Indicator_2 = Indicators.AverageTrueRange(temp_2, ATR_P_15min, p_ATR_MA_Type); // 1-HOUR var temp_3 = MarketData.GetSeries(tstr_Symbol_Code, TF_1Hr); ATR_Indicator_3 = Indicators.AverageTrueRange(temp_3, ATR_P_1Hr, p_ATR_MA_Type); // 4-HOUR var temp_4 = MarketData.GetSeries(tstr_Symbol_Code, TF_4Hr); ATR_Indicator_4 = Indicators.AverageTrueRange(temp_4, ATR_P_4Hr, p_ATR_MA_Type); // Daily var temp_5 = MarketData.GetSeries(tstr_Symbol_Code, TF_D); ATR_Indicator_5 = Indicators.AverageTrueRange(temp_5, ATR_P_D, p_ATR_MA_Type); // Weekly var temp_6 = MarketData.GetSeries(tstr_Symbol_Code, TF_Wk); ATR_Indicator_6 = Indicators.AverageTrueRange(temp_6, ATR_P_Wk, p_ATR_MA_Type); // Monthly var temp_7 = MarketData.GetSeries(tstr_Symbol_Code, TF_Mt); ATR_Indicator_7 = Indicators.AverageTrueRange(temp_7, ATR_P_Mt, p_ATR_MA_Type); //STORE ATR VALUE IN THE ARRAY. ARRAY STARTS FROM 0 INDEX // 5-MIN All_28Pair_ATR_Value[l, i, 0] = Math.Round(ATR_Indicator_1.Result.Last(t_ind) / t_PipSize, 0); t_0 += All_28Pair_ATR_Value[l, i, 0]; // 15-MIN All_28Pair_ATR_Value[l, i, 1] = Math.Round(ATR_Indicator_2.Result.Last(t_ind) / t_PipSize, 0); t_1 += All_28Pair_ATR_Value[l, i, 1]; // 1-HOUR All_28Pair_ATR_Value[l, i, 2] = Math.Round(ATR_Indicator_3.Result.Last(t_ind) / t_PipSize, 0); t_2 += All_28Pair_ATR_Value[l, i, 2]; // 4-HOUR All_28Pair_ATR_Value[l, i, 3] = Math.Round(ATR_Indicator_4.Result.Last(t_ind) / t_PipSize, 0); t_3 += All_28Pair_ATR_Value[l, i, 3]; // DAILY All_28Pair_ATR_Value[l, i, 4] = Math.Round(ATR_Indicator_5.Result.Last(t_ind) / t_PipSize, 0); t_4 += All_28Pair_ATR_Value[l, i, 4]; // WEEKLY All_28Pair_ATR_Value[l, i, 5] = Math.Round(ATR_Indicator_6.Result.Last(t_ind) / t_PipSize, 0); t_5 += All_28Pair_ATR_Value[l, i, 5]; // MONTHLY All_28Pair_ATR_Value[l, i, 6] = Math.Round(ATR_Indicator_7.Result.Last(t_ind) / t_PipSize, 0); t_6 += All_28Pair_ATR_Value[l, i, 6]; } //END FOR i //UPDATE THE GRANDTOTAL OF "TOTAL ATR VALUE" GTotal_28Pair_ATR_Value[l, 0] = t_0; GTotal_28Pair_ATR_Value[l, 1] = t_1; GTotal_28Pair_ATR_Value[l, 2] = t_2; GTotal_28Pair_ATR_Value[l, 3] = t_3; GTotal_28Pair_ATR_Value[l, 4] = t_4; GTotal_28Pair_ATR_Value[l, 5] = t_5; GTotal_28Pair_ATR_Value[l, 6] = t_6; //RESET t_0 = 0; t_1 = 0; t_2 = 0; t_3 = 0; t_4 = 0; t_5 = 0; t_6 = 0; } // END FOR l } //END MEHTOD Load_28Pair_ATR_Values ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Get_28Pair_TOTAL_Pips_from_Open /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Get_28Pair_TOTAL_Pips_from_Open() { //Print("Inside : TOTAL_Pips_from_Open"); double t_PipSize; double t_0 = 0, t_1 = 0, t_2 = 0, t_3 = 0, t_4 = 0, t_5 = 0, t_6 = 0; double t_Close_P1, t_Close_P2, t_Close_P3, t_Close_P4, t_Close_P5, t_Close_P6, t_Close_P7; double t_Open_P1, t_Open_P2, t_Open_P3, t_Open_P4, t_Open_P5, t_Open_P6, t_Open_P7; // LOOP FOR PREVIOUS PRICES : LP IS A GLOBAL VARIABLE TO SET THE LOOP LIMIT for (int l = 0; l < LP1; l++) { //LOOP FOR 28 PAIRS for (int i = 0; i < 28; i++) { // LOAD PIP SIZE t_PipSize = All_28Pair_Pip_Size[i]; // ---------- LOAD CLOSE PRICE : ALL TIME FRAMES t_Close_P1 = All_28Pair_Close_Price[l, i, 0]; t_Close_P2 = All_28Pair_Close_Price[l, i, 1]; t_Close_P3 = All_28Pair_Close_Price[l, i, 2]; t_Close_P4 = All_28Pair_Close_Price[l, i, 3]; t_Close_P5 = All_28Pair_Close_Price[l, i, 4]; t_Close_P6 = All_28Pair_Close_Price[l, i, 5]; t_Close_P7 = All_28Pair_Close_Price[l, i, 6]; // ---------- LOAD OPEN PRICES : ALL TRIME FRAMES t_Open_P1 = All_28Pair_Open_Price[l, i, 0]; t_Open_P2 = All_28Pair_Open_Price[l, i, 1]; t_Open_P3 = All_28Pair_Open_Price[l, i, 2]; t_Open_P4 = All_28Pair_Open_Price[l, i, 3]; t_Open_P5 = All_28Pair_Open_Price[l, i, 4]; t_Open_P6 = All_28Pair_Open_Price[l, i, 5]; t_Open_P7 = All_28Pair_Open_Price[l, i, 6]; //STORE THE OPEN.LAST VALUE IN THE ARRAY. ARRAY STARTS FROM 0 INDEX // 5-MIN All_28Pair_Total_Pips[l, i, 0] = Math.Round(((t_Close_P1 - t_Open_P1) / t_PipSize), 0); t_0 += All_28Pair_Total_Pips[l, i, 0]; // 15-MIN All_28Pair_Total_Pips[l, i, 1] = Math.Round(((t_Close_P2 - t_Open_P2) / t_PipSize), 0); t_1 += All_28Pair_Total_Pips[l, i, 1]; // 1-HOUR All_28Pair_Total_Pips[l, i, 2] = Math.Round(((t_Close_P3 - t_Open_P3) / t_PipSize), 0); t_2 += All_28Pair_Total_Pips[l, i, 2]; // 4-HOUR All_28Pair_Total_Pips[l, i, 3] = Math.Round(((t_Close_P4 - t_Open_P4) / t_PipSize), 0); t_3 += All_28Pair_Total_Pips[l, i, 3]; // DAILY All_28Pair_Total_Pips[l, i, 4] = Math.Round(((t_Close_P5 - t_Open_P5) / t_PipSize), 0); t_4 += All_28Pair_Total_Pips[l, i, 4]; // WEEKLY All_28Pair_Total_Pips[l, i, 5] = Math.Round(((t_Close_P6 - t_Open_P6) / t_PipSize), 0); t_5 += All_28Pair_Total_Pips[l, i, 5]; // MONTHLY All_28Pair_Total_Pips[l, i, 6] = Math.Round(((t_Close_P7 - t_Open_P7) / t_PipSize), 0); t_6 += All_28Pair_Total_Pips[l, i, 6]; //UPDATE THE GRANDTOTAL OF "TOTAL PIPS" MOVED FROM OPEN PRICES : DAILY, WEEKLY, MONTHLY GTotal_28Pair_Total_Pips[l, 0] = t_0; GTotal_28Pair_Total_Pips[l, 1] = t_1; GTotal_28Pair_Total_Pips[l, 2] = t_2; GTotal_28Pair_Total_Pips[l, 3] = t_3; GTotal_28Pair_Total_Pips[l, 4] = t_4; GTotal_28Pair_Total_Pips[l, 5] = t_5; GTotal_28Pair_Total_Pips[l, 6] = t_6; } //END FOR i //RESET t_0 = 0; t_1 = 0; t_2 = 0; t_3 = 0; t_4 = 0; t_5 = 0; t_6 = 0; } // END FOR L } //END MEHTOD Get_28Pair_TOTAL_Pips_from_Open ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Load_28Pair_HiLo_Prices /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Load_28Pair_HiLo_Prices() { //Print("Inside : -PREVIOUS- : Close AND HiLo Prices"); //double t_1; Symbol t_Symbol; string tstr_Symbol_Code; int t_ind; // LOOP FOR PREVIOUS PRICES : LP IS A GLOBAL VARIABLE TO SET THE LOOP LIMIT for (int l = 0; l < LP1; l++) { t_ind = LP1_Array_Close[l]; //LOOP FOR 28 PAIRS for (int i = 0; i < 28; i++) { // GET SYMBOL t_Symbol = Get_28Pair_Symbol(i); tstr_Symbol_Code = t_Symbol.Code.ToString(); //GET 5-MIN OPEN PRICES FOR THE SYMBOL var temp_1 = MarketData.GetSeries(tstr_Symbol_Code, TF_5min); //GET 15-MIN OPEN PRICES FOR THE SYMBOL var temp_2 = MarketData.GetSeries(tstr_Symbol_Code, TF_15min); //GET 1-HOUR OPEN PRICES FOR THE SYMBOL var temp_3 = MarketData.GetSeries(tstr_Symbol_Code, TF_1Hr); //GET 4-hOUR OPEN PRICES FOR THE SYMBOL var temp_4 = MarketData.GetSeries(tstr_Symbol_Code, TF_4Hr); //GET DAILY OPEN PRICES FOR THE SYMBOL var temp_5 = MarketData.GetSeries(tstr_Symbol_Code, TF_D); //GET Weekly OPEN PRICES FOR THE SYMBOL var temp_6 = MarketData.GetSeries(tstr_Symbol_Code, TF_Wk); //GET Monthly OPEN PRICES FOR THE SYMBOL var temp_7 = MarketData.GetSeries(tstr_Symbol_Code, TF_Mt); // ------------ HI-LO PRICES // 5-MIN All_28Pair_HiLo_Price[l, i, 0] = temp_1.High.Last(t_ind); All_28Pair_HiLo_Price[l, i, 1] = temp_1.Low.Last(t_ind); // 15-MIN All_28Pair_HiLo_Price[l, i, 2] = temp_2.High.Last(t_ind); All_28Pair_HiLo_Price[l, i, 3] = temp_2.Low.Last(t_ind); // 1-HOUR All_28Pair_HiLo_Price[l, i, 4] = temp_3.High.Last(t_ind); All_28Pair_HiLo_Price[l, i, 5] = temp_3.Low.Last(t_ind); // 4-HOUR All_28Pair_HiLo_Price[l, i, 6] = temp_4.High.Last(t_ind); All_28Pair_HiLo_Price[l, i, 7] = temp_4.Low.Last(t_ind); // DAILY All_28Pair_HiLo_Price[l, i, 8] = temp_5.High.Last(t_ind); All_28Pair_HiLo_Price[l, i, 9] = temp_5.Low.Last(t_ind); // WEEKLY All_28Pair_HiLo_Price[l, i, 10] = temp_6.High.Last(t_ind); All_28Pair_HiLo_Price[l, i, 11] = temp_6.Low.Last(t_ind); // MONTHLY All_28Pair_HiLo_Price[l, i, 12] = temp_7.High.Last(t_ind); All_28Pair_HiLo_Price[l, i, 13] = temp_7.Low.Last(t_ind); } //END FOR i } // END FOR l } //END METHOD Load_28Pair_HiLo_Prices ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Load_28Pair_Close_Prices /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Load_28Pair_Close_Prices() { //Print("Inside : -PREVIOUS- : Close AND HiLo Prices"); //double t_1; Symbol t_Symbol; string tstr_Symbol_Code; int t_ind; // LOOP FOR PREVIOUS PRICES : LP IS A GLOBAL VARIABLE TO SET THE LOOP LIMIT for (int l = 0; l < LP1; l++) { t_ind = LP1_Array_Close[l]; //LOOP FOR 28 PAIRS for (int i = 0; i < 28; i++) { // GET SYMBOL t_Symbol = Get_28Pair_Symbol(i); tstr_Symbol_Code = t_Symbol.Code.ToString(); //GET 5-MIN OPEN PRICES FOR THE SYMBOL var temp_1 = MarketData.GetSeries(tstr_Symbol_Code, TF_5min); //GET 15-MIN OPEN PRICES FOR THE SYMBOL var temp_2 = MarketData.GetSeries(tstr_Symbol_Code, TF_15min); //GET 1-HOUR OPEN PRICES FOR THE SYMBOL var temp_3 = MarketData.GetSeries(tstr_Symbol_Code, TF_1Hr); //GET 4-hOUR OPEN PRICES FOR THE SYMBOL var temp_4 = MarketData.GetSeries(tstr_Symbol_Code, TF_4Hr); //GET DAILY OPEN PRICES FOR THE SYMBOL var temp_5 = MarketData.GetSeries(tstr_Symbol_Code, TF_D); //GET Weekly OPEN PRICES FOR THE SYMBOL var temp_6 = MarketData.GetSeries(tstr_Symbol_Code, TF_Wk); //GET Monthly OPEN PRICES FOR THE SYMBOL var temp_7 = MarketData.GetSeries(tstr_Symbol_Code, TF_Mt); // ----------- CLOSE PRICES // 5-MIN All_28Pair_Close_Price[l, i, 0] = temp_1.Close.Last(t_ind); // 15-MIN All_28Pair_Close_Price[l, i, 1] = temp_2.Close.Last(t_ind); // 1-HOUR All_28Pair_Close_Price[l, i, 2] = temp_3.Close.Last(t_ind); // 4-HOUR All_28Pair_Close_Price[l, i, 3] = temp_4.Close.Last(t_ind); // DAILY All_28Pair_Close_Price[l, i, 4] = temp_5.Close.Last(t_ind); // WEEKLY All_28Pair_Close_Price[l, i, 5] = temp_6.Close.Last(t_ind); // MONTHLY All_28Pair_Close_Price[l, i, 6] = temp_7.Close.Last(t_ind); } //END FOR i } // END FOR l } //END METHOD Load_28Pair_Close_Prices ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Load_28Pair_Open_Prices /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Load_28Pair_Open_Prices() { //Print("Inside : CURRENT : Load 28Pair Open Prices"); Symbol t_Symbol; string tstr_Symbol_Code; int t_ind; // LOOP FOR PREVIOUS PRICES : LP IS A GLOBAL VARIABLE TO SET THE LOOP LIMIT for (int l = 0; l < LP1; l++) { t_ind = LP1_Array_Open[l]; for (int i = 0; i < 28; i++) { // GET SYMBOL t_Symbol = Get_28Pair_Symbol(i); tstr_Symbol_Code = t_Symbol.Code.ToString(); //GET 5-MIN OPEN PRICES FOR THE SYMBOL var temp_1 = MarketData.GetSeries(tstr_Symbol_Code, TF_5min); //GET 15-MIN OPEN PRICES FOR THE SYMBOL var temp_2 = MarketData.GetSeries(tstr_Symbol_Code, TF_15min); //GET 1-HOUR OPEN PRICES FOR THE SYMBOL var temp_3 = MarketData.GetSeries(tstr_Symbol_Code, TF_1Hr); //GET 4-hOUR OPEN PRICES FOR THE SYMBOL var temp_4 = MarketData.GetSeries(tstr_Symbol_Code, TF_4Hr); //GET DAILY OPEN PRICES FOR THE SYMBOL var temp_5 = MarketData.GetSeries(tstr_Symbol_Code, TF_D); //GET Weekly OPEN PRICES FOR THE SYMBOL var temp_6 = MarketData.GetSeries(tstr_Symbol_Code, TF_Wk); //GET Monthly OPEN PRICES FOR THE SYMBOL var temp_7 = MarketData.GetSeries(tstr_Symbol_Code, TF_Mt); /// ----------- OPEN PRICES // 5-MIN All_28Pair_Open_Price[l, i, 0] = temp_1.Open.Last(t_ind); // 15-MIN All_28Pair_Open_Price[l, i, 1] = temp_2.Open.Last(t_ind); // 1-HOUR All_28Pair_Open_Price[l, i, 2] = temp_3.Open.Last(t_ind); // 4-HOUR All_28Pair_Open_Price[l, i, 3] = temp_4.Open.Last(t_ind); // DAILY All_28Pair_Open_Price[l, i, 4] = temp_5.Open.Last(t_ind); // WEEKLY All_28Pair_Open_Price[l, i, 5] = temp_6.Open.Last(t_ind); // MONTHLY All_28Pair_Open_Price[l, i, 6] = temp_7.Open.Last(t_ind); } //END FOR i //Print("LP1 INDEX VALUE = " + t_ind); } // END FOR l } //END METHOD Load_28Pair_Open_Prices ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// OnSTART_Load_28Pair_Open_Prices /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void OnSTART_Load_28Pair_Open_Prices() { Print("Inside : FIRST TIME ONLY : GET 28-PAIR OPEN PRICES ON START"); Symbol t_Symbol; string tstr_Symbol_Code; double t_1; // GET 5 PAIRS OPEN PRICES for (int i = 0; i < 28; i++) { // GET SYMBOL t_Symbol = Get_28Pair_Symbol(i); tstr_Symbol_Code = t_Symbol.Code.ToString(); //GET 5-MIN OPEN PRICES FOR THE SYMBOL var temp_1 = MarketData.GetSeries(tstr_Symbol_Code, TF_5min); //GET 15-MIN OPEN PRICES FOR THE SYMBOL var temp_2 = MarketData.GetSeries(tstr_Symbol_Code, TF_15min); //GET 1-HOUR OPEN PRICES FOR THE SYMBOL var temp_3 = MarketData.GetSeries(tstr_Symbol_Code, TF_1Hr); //GET 4-hOUR OPEN PRICES FOR THE SYMBOL var temp_4 = MarketData.GetSeries(tstr_Symbol_Code, TF_4Hr); //GET DAILY OPEN PRICES FOR THE SYMBOL var temp_5 = MarketData.GetSeries(tstr_Symbol_Code, TF_D); //GET Weekly OPEN PRICES FOR THE SYMBOL var temp_6 = MarketData.GetSeries(tstr_Symbol_Code, TF_Wk); //GET Monthly OPEN PRICES FOR THE SYMBOL var temp_7 = MarketData.GetSeries(tstr_Symbol_Code, TF_Mt); /// ----------- OPEN PRICES // 5-MIN t_1 = temp_1.Open.LastValue; // 15-MIN t_1 = temp_2.Open.LastValue; // 1-HOUR t_1 = temp_3.Open.LastValue; // 4-HOUR t_1 = temp_4.Open.LastValue; // DAILY t_1 = temp_5.Open.LastValue; // WEEKLY t_1 = temp_6.Open.LastValue; // MONTHLY t_1 = temp_7.Open.LastValue; Print(i + ". " + tstr_Symbol_Code + " = " + t_1); } //END FOR i } //END METHOD OnSTART_Load_28Pair_Open_Prices ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Load_28Pair_PipSize /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Load_28Pair_PipSize() { Print("Inside : Load 28Pair Pip-Size"); Symbol t_Symbol; // LOOP FOR 28 PAIRS for (int i = 0; i < 28; i++) { // GET SYMBOL t_Symbol = Get_28Pair_Symbol(i); All_28Pair_Pip_Size[i] = t_Symbol.PipSize; } //END FOR } //END METHOD Load_28Pair_PipSize ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Load_28Pair_SymbolCode /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Load_28Pair_SymbolCode() { Print("Inside : Load 28Pair Symbol-Code"); string tstr_Symbol_Code; Symbol t_Symbol; // LOOP FOR 28 PAIRS for (int i = 0; i < 28; i++) { // GET SYMBOL t_Symbol = Get_28Pair_Symbol(i); tstr_Symbol_Code = t_Symbol.Code.ToString(); All_28Pair_Symbol_Code[i] = tstr_Symbol_Code; } //END FOR } //END METHOD Load_28Pair_SymbolCode ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// CLOSE ALL PENDING ORDERS /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //CLOSE-ALL PENDING-ORDERS OF THE LABEL DEFINED IN (t_Label) private void CloseAll_PendingOrders(string t_Label) { //Print Message and SERVER Date Time to Log files string tempText1 = string.Format("{0:ddd-d-MMM-y,h:mm tt}", Server.Time); //Print("Close-Selected ''Pending-Orders''. Server Date & Time = " + tempText1 + ",----> P-Order Label : " + t_Label); foreach (var pen in PendingOrders) { if (pen.Label == t_Label) { CancelPendingOrder(pen); } //END IF } //END FOR_EACH } //END METHOD CLOSE_ALL_Pending_Orders //////////////////////////////////////////////////////////////////////////////////////////// //CLOSE-ALL PENDING-ORDERS IRRESPECTIVE OF THE LABEL private void CloseAll_PendingOrders() { foreach (var pen in PendingOrders) { CancelPendingOrderAsync(pen); } //END FOR-EACH } //END METHOD CloseAll_PendingOrders ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// CLOSE ALL POSITIONS /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //CLOSE-ALL TRADES OF THE LABEL DEFINED IN (t_Label) private void CloseAll_Positions(string t_Label) { //Print Message and Date Time to Log files string tempText1 = string.Format("{0:ddd-d-MMM-y,h:mm tt}", Server.Time); //Print("Close-Selected ''Running-Positions''. Server Date & Time = " + tempText1 + ",----> Running Position Label : " + t_Label); foreach (var pos in Positions) { if (pos.Label == t_Label) { ClosePosition(pos); } //END IF } //END FOR_EACH } //END METHOD CLOSE_ALL_Open_Position //////////////////////////////////////////////////////////////////////////////////////////// //CLOSE-ALL POSITIVE OR NEGATIVE TRADES IRRESPECTIVE OF THE LABEL private void CloseAll_Positions(bool Flag_Profit_Loss) { foreach (var pen in Positions) { //CLOSE ALL PROFITABLE TRADE if (Flag_Profit_Loss) if (pen.NetProfit >= 0) ClosePositionAsync(pen); //CLOSE ALL LOSS TRADE if (!Flag_Profit_Loss) if (pen.NetProfit <= 0) ClosePositionAsync(pen); } //END FOR-EACH } //END METHOD CloseAll_Positions //////////////////////////////////////////////////////////////////////////////////////////// //CLOSE PROFITABLE OR NEGATIVE TRADE THAT ARE ABOVE/BELOW THE TARGET VALUE (t_Target) private void CloseAll_Positions(int t_Target) { foreach (var pen in Positions) { //IF POSITIVE VALUE : CLOSE ALL GREATER THEN TARGET PRICE if (t_Target >= 0) if (pen.NetProfit >= t_Target) ClosePositionAsync(pen); //IF NEGATIVE VALUE : CLOSE ALL LESS THEN THE TARGET PRICE if (t_Target < 0) if (pen.NetProfit <= t_Target) ClosePositionAsync(pen); } //END FOR-EACH } //END METHOD CloseAll_Positions //////////////////////////////////////////////////////////////////////////////////////////// //CLOSE TRADE WITH DEFINED LABEL (t_str1) AND THOSE THAT ARE ABOVE/BELOW THE TARGET VALUE (t_Target ) private void CloseAll_Positions(string t_str1, int t_Target) { foreach (var pen in Positions) { //IF POSITIVE VALUE if (t_Target >= 0) if ((pen.Label == t_str1) && (pen.NetProfit >= t_Target)) ClosePositionAsync(pen); //IF NEGATIVE VALUE if (t_Target < 0) if ((pen.Label == t_str1) && (pen.NetProfit <= t_Target)) ClosePositionAsync(pen); } //END FOR-EACH } //END METHOD CloseAll_Positions ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// WRITE CANDLE DATA TO CSV FILE /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Write_To_CSV_File() { //>>>>>>>>>>>>>>>>>>>>>> //THIS FUNCTION WILL WRITE ALL THE DATA TO CSV FILE //>>>>>>>>>>>>>>>>>>>>>> //////////////////////////////////////// /// WRITE DATA TO CSV FILE /////// //////////////////////////////////////// if (p_Flag_Create_CSV_File) { //WRITE CURRENT DATA File_Writer.WriteLine(Concate_With_Comma()); } //END IF } //End METHOD Write_To_CSV_File ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// ADD COMMA TO THE STRING FUNCITON ////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private string Concate_With_Comma(params object[] parameters) { return string.Join(",", parameters.Select(p => p.ToString())); } //End METHOD CONCAT_WITH_COMMA ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// CREATE CSV FILE /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected void Create_CSV_File() { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; //Server Time Recod string str_temp1 = string.Format("{0:ddd-d-MMM-y}", Server.Time); //Desktop Folder PATH and NAME str_DesktopFolder = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); str_FolderPath = Path.Combine(str_DesktopFolder, p_str_Folder_Name); //Create Directory and make the file name Directory.CreateDirectory(str_FolderPath); str_FileName = Path.Combine(str_FolderPath, Symbol.Code + " " + TimeFrame + " " + str_temp1 + ".csv"); //Print("File Path : " + str_FilePath); //Create or OVER RIDE Existing FILE and then Close it which is a must. File_Stream = File.Create(str_FileName); File_Stream.Close(); //Open File to prevent .NET from locking it and preventing access by other processes File_Stream = File.Open(str_FileName, FileMode.Open, FileAccess.Write, FileShare.ReadWrite); //Seek End of File to write File_Stream.Seek(0, SeekOrigin.End); //File Writer Stream to be created. File_Writer = new System.IO.StreamWriter(File_Stream, System.Text.Encoding.UTF8, 1); //Auto Flush to improve IO performance File_Writer.AutoFlush = true; } //End METHOD Create_CSV_File ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// ON STOP /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected override void OnStop() { string temp_Text = string.Format("{0:ddd-d-MMM-y,h:mm tt}", Server.Time); Print("cBOT ''onStop'' Stop Date & time : " + temp_Text); //////////////////////////////////////// /// WRITE DATA TO CSV FILE /////// //////////////////////////////////////// if (p_Flag_Create_CSV_File) { File_Writer.WriteLine(Concate_With_Comma()); } //END IF //BLANK LINE Print(""); } //END METHOD On_STOP ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Get_28Pair_Symbol /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private Symbol Get_28Pair_Symbol(int t_Pair) { switch (t_Pair) { ////////////////////////////////////////////// /// JPY PAIRS x 7 ////////////////////////////////////////////// case 0: return MarketData.GetSymbol("GBPJPY"); break; case 1: return MarketData.GetSymbol("USDJPY"); break; case 2: return MarketData.GetSymbol("CADJPY"); break; case 3: return MarketData.GetSymbol("AUDJPY"); break; case 4: return MarketData.GetSymbol("NZDJPY"); break; case 5: return MarketData.GetSymbol("EURJPY"); break; case 6: return MarketData.GetSymbol("CHFJPY"); break; ////////////////////////////////////////////// /// EUR PAIRS x 6 ////////////////////////////////////////////// case 7: return MarketData.GetSymbol("EURNZD"); break; case 8: return MarketData.GetSymbol("EURCAD"); break; case 9: return MarketData.GetSymbol("EURAUD"); break; case 10: return MarketData.GetSymbol("EURUSD"); break; case 11: return MarketData.GetSymbol("EURGBP"); break; case 12: return MarketData.GetSymbol("EURCHF"); break; ////////////////////////////////////////////// /// GBP PAIRS x 5 ////////////////////////////////////////////// case 13: return MarketData.GetSymbol("GBPNZD"); break; case 14: return MarketData.GetSymbol("GBPAUD"); break; case 15: return MarketData.GetSymbol("GBPCAD"); break; case 16: return MarketData.GetSymbol("GBPCHF"); break; case 17: return MarketData.GetSymbol("GBPUSD"); break; ////////////////////////////////////////////// /// AUD PAIRS x 4 ////////////////////////////////////////////// case 18: return MarketData.GetSymbol("AUDUSD"); break; case 19: return MarketData.GetSymbol("AUDCHF"); break; case 20: return MarketData.GetSymbol("AUDNZD"); break; case 21: return MarketData.GetSymbol("AUDCAD"); break; ////////////////////////////////////////////// /// NZD PAIRS x 5 ////////////////////////////////////////////// case 22: return MarketData.GetSymbol("NZDCHF"); break; case 23: return MarketData.GetSymbol("NZDUSD"); break; case 24: return MarketData.GetSymbol("NZDCAD"); break; ////////////////////////////////////////////// /// USD PAIRS x 2 ////////////////////////////////////////////// case 25: return MarketData.GetSymbol("USDCAD"); break; case 26: return MarketData.GetSymbol("USDCHF"); break; ////////////////////////////////////////////// /// CAD PAIRS x 1 ////////////////////////////////////////////// case 27: return MarketData.GetSymbol("CADCHF"); break; } //SWITCH return Symbol; } //END METHOD Get_Pair_Symbol ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Set the Count Bar Value for Market Series Function ////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Set_Count_Bar_Value() { Count_Bar = MarketSeries.Close.Count - 1; //Daily_Count_Bar = 1; //Print("Count_Bar Value = " + Count_Bar + ", Daily_Count_Bar = " + Daily_Count_Bar); //Print(""); } //End METHOD Set_Count_Bar_Value //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// SET TEXT, TAB AND NEXT LINE SETTING /////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Draw_OnChart_C1(string t_PreFix, int Line_No, int Tab_Pos, string t_text, Colors Draw_Color) { //CREATE A UNIQUE OBJECT NAME FOR THE METHOD ChartObjects.DrawText string tstr_1 = ""; tstr_1 = t_PreFix + Line_No.ToString() + Tab_Pos.ToString(); ChartObjects.DrawText(tstr_1, my_NL(Line_No) + my_Tabs(Tab_Pos) + t_text, StaticPosition.TopLeft, Draw_Color); } //END METHOD //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// static string my_Tabs(int n) { return new String('\t', n); } //END METHOD my_Tabs //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// static string my_NL(int n) { return new String('\n', n); } //END METHOD my_NL //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Create_Fixed_Display_1() { //int c1 = 0, c2 = 0; // c3 = 0, c4 = 0, c5 = 0, c6 = 0, c7 = 0, c8 = 0, c9 = 0; //int r1 = 0; // r2 = 0, r3 = 0, r4 = 0, r5 = 0, r6 = 0, r7 = 0, r8 = 0, r9 = 0; //Heading # 1 //r1 = 1; //c1 = 3; //ChartObjects.DrawText("a00", my_NL(r1 + 0) + my_Tabs(c1) + "Line 1", StaticPosition.TopLeft, Colors.Yellow); //Heading # 2 //c2 = c1 + 1; //ChartObjects.DrawText("b00", my_NL(r1 + 0) + my_Tabs(c2) + "Line 1", StaticPosition.TopLeft, Colors.Yellow); } //END METHOD Create_Fixed_Display_1 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Create_Fixed_Display_2() { //int c1 = 0, c2 = 0, c3 = 0, c4 = 0, c5 = 0, c6 = 0, c7 = 0, c8 = 0, c9 = 0; //int r1 = 0, r2 = 0, r3 = 0, r4 = 0, r5 = 0, r6 = 0, r7 = 0, r8 = 0, r9 = 0; } //END METHOD Create_Fixed_Display_2 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Create_Display_RowColumn() { //int r1, c1; string t_text = ""; // DISPLAY LINE # for (int i = 0; i <= 80; i++) { t_text = i.ToString(); Draw_OnChart_C1("Line", i, 0, t_text, Clr_Bk_1); } //END FOR // DISPLAY LINE # for (int i = 0; i <= 50; i++) { t_text = "C#"; t_text = t_text + "." + i.ToString(); Draw_OnChart_C1("Line", 0, (i), t_text, Clr_Bk_1); } //END FOR } //END METHOD Create_Display_RowColumn ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Display_Vertical_Lines(int t_Start_Line, int t_Stop_Line, int t_Col) { //FIRST LOOP for (int i = t_Start_Line; i < t_Stop_Line; i++) { Draw_OnChart_C1("VL" + i.ToString(), i, t_Col, " ||", Clr_Border); } //END FOR } //END FUNCTION Display_Major_Flag_Values ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Display_Horizontal_Lines(int t_Line, int t_Start_Col, int t_Stop_Col) { //FIRST LOOP for (int i = t_Start_Col; i < t_Stop_Col; i++) { Draw_OnChart_C1("VL" + i.ToString(), t_Line, i, "=======", Clr_Border); } //END FOR } //END FUNCTION Display_Major_Flag_Values ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Declare_All_Arrays /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Declare_All_Arrays() { // ATR VALUES (IN PIPS) ---------------------------------- All_28Pair_ATR_Value = new double[LP1, 28, 7]; GTotal_28Pair_ATR_Value = new double[LP1, 7]; All_MajorPair_ATR_Value = new double[LP1, 8, 7]; GTotal_MajorPair_ATR_Value = new double[LP1, 7]; // 28-PAIRS ---------------------------------------------- All_28Pair_Pip_Size = new double[28]; All_28Pair_Symbol_Code = new string[28]; // 8-MAJOR PAIRS ----------------------------------------- // MAJOR PAIR RELATED VARIABLES MajorPair_Headings = new string[8]; MajorPair_Combo = new string[8, 7]; Base_Currency = new int[8, 7]; // CURRENT PRICES ---------------------------------------- // LP1 IS THE HISTORY OF PREVIOUS PRICES. // 28 PAirs, 7 TimeFrames (5min, 15min, .....) All_28Pair_Open_Price = new double[LP1, 28, 7]; All_28Pair_Close_Price = new double[LP1, 28, 7]; All_28Pair_HiLo_Price = new double[LP1, 28, 14]; // TOTAL PIPS -------------------------------------------- All_28Pair_Total_Pips = new double[LP1, 28, 7]; GTotal_28Pair_Total_Pips = new double[LP1, 7]; All_MajorPair_Total_Pips = new double[LP1, 8, 7]; GTotal_MajorPair_Total_Pips = new double[LP1, 7]; Sorted_MajorPair_Monthly_Total_Pips = new int[LP1, 8]; Sorted_MajorPair_Weekly_Total_Pips = new int[LP1, 8]; Sorted_MajorPair_Daily_Total_Pips = new int[LP1, 8]; Sorted_MajorPair_4Hour_Total_Pips = new int[LP1, 8]; Sorted_MajorPair_Hourly_Total_Pips = new int[LP1, 8]; Sorted_MajorPair_15min_Total_Pips = new int[LP1, 8]; // NAMES OF THE MONTH Month_Name = new string[12]; // CONTAINS THE INDEX VALUES TO ACCESS PRICES // CURRENT YEAR LP1_Array_Open = new int[LP1]; LP1_Array_Close = new int[LP1]; LP1_TF_Name = new string[LP1]; // AVERAGE PIPS -------------------------------------------- Avg_All_28Pair_Total_Pips = new double[28, 7]; Avg_All_MajorPair_Total_Pips = new double[8, 7]; // KEEP TRACK OF 8-MAJOR PAIR, IF TOTAL PIPS HAVE // CROSSED AVG.PIPS, IN ALL 7 TIME FRAMES Flag_TotalPips_Greater_AvgPips = new int[8]; DateTime_TotalPips_Greater_AvgPips = new string[8]; } //END METHOD Declare_All_Arrays ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //// Initialize_Array_OnStart_Only /////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void Initialize_Array_OnStart_Only() { //INITIALIZATION OF MAJOR PAIR NAMES MajorPair_Headings[0] = "EUR-PAIRS"; MajorPair_Headings[1] = "GBP-PAIRS"; MajorPair_Headings[2] = "USD-PAIRS"; MajorPair_Headings[3] = "JPY-PAIRS"; MajorPair_Headings[4] = "CHF-PAIRS"; MajorPair_Headings[5] = "CAD-PAIRS"; MajorPair_Headings[6] = "AUD-PAIRS"; MajorPair_Headings[7] = "NZD-PAIRS"; // 0-EURO PAIRS MajorPair_Combo[0, 0] = "EURUSD"; MajorPair_Combo[0, 1] = "EURJPY"; MajorPair_Combo[0, 2] = "EURGBP"; MajorPair_Combo[0, 3] = "EURAUD"; MajorPair_Combo[0, 4] = "EURNZD"; MajorPair_Combo[0, 5] = "EURCHF"; MajorPair_Combo[0, 6] = "EURCAD"; Base_Currency[0, 0] = 1; Base_Currency[0, 1] = 1; Base_Currency[0, 2] = 1; Base_Currency[0, 3] = 1; Base_Currency[0, 4] = 1; Base_Currency[0, 5] = 1; Base_Currency[0, 6] = 1; // 1-GBP PAIRS MajorPair_Combo[1, 0] = "GBPUSD"; MajorPair_Combo[1, 1] = "GBPJPY"; MajorPair_Combo[1, 2] = "EURGBP"; MajorPair_Combo[1, 3] = "GBPAUD"; MajorPair_Combo[1, 4] = "GBPNZD"; MajorPair_Combo[1, 5] = "GBPCHF"; MajorPair_Combo[1, 6] = "GBPCAD"; Base_Currency[1, 0] = 1; Base_Currency[1, 1] = 1; Base_Currency[1, 2] = -1; Base_Currency[1, 3] = 1; Base_Currency[1, 4] = 1; Base_Currency[1, 5] = 1; Base_Currency[1, 6] = 1; // 2-USD PAIRS MajorPair_Combo[2, 0] = "EURUSD"; MajorPair_Combo[2, 1] = "GBPUSD"; MajorPair_Combo[2, 2] = "AUDUSD"; MajorPair_Combo[2, 3] = "NZDUSD"; MajorPair_Combo[2, 4] = "USDJPY"; MajorPair_Combo[2, 5] = "USDCHF"; MajorPair_Combo[2, 6] = "USDCAD"; Base_Currency[2, 0] = -1; Base_Currency[2, 1] = -1; Base_Currency[2, 2] = -1; Base_Currency[2, 3] = -1; Base_Currency[2, 4] = 1; Base_Currency[2, 5] = 1; Base_Currency[2, 6] = 1; // 3-JPY PAIRS MajorPair_Combo[3, 0] = "EURJPY"; MajorPair_Combo[3, 1] = "USDJPY"; MajorPair_Combo[3, 2] = "GBPJPY"; MajorPair_Combo[3, 3] = "AUDJPY"; MajorPair_Combo[3, 4] = "NZDJPY"; MajorPair_Combo[3, 5] = "CHFJPY"; MajorPair_Combo[3, 6] = "CADJPY"; Base_Currency[3, 0] = -1; Base_Currency[3, 1] = -1; Base_Currency[3, 2] = -1; Base_Currency[3, 3] = -1; Base_Currency[3, 4] = -1; Base_Currency[3, 5] = -1; Base_Currency[3, 6] = -1; // 4-CHF PAIRS MajorPair_Combo[4, 0] = "EURCHF"; MajorPair_Combo[4, 1] = "USDCHF"; MajorPair_Combo[4, 2] = "GBPCHF"; MajorPair_Combo[4, 3] = "AUDCHF"; MajorPair_Combo[4, 4] = "NZDCHF"; MajorPair_Combo[4, 5] = "CADCHF"; MajorPair_Combo[4, 6] = "CHFJPY"; Base_Currency[4, 0] = -1; Base_Currency[4, 1] = -1; Base_Currency[4, 2] = -1; Base_Currency[4, 3] = -1; Base_Currency[4, 4] = -1; Base_Currency[4, 5] = -1; Base_Currency[4, 6] = 1; // 5-CAD PAIRS MajorPair_Combo[5, 0] = "EURCAD"; MajorPair_Combo[5, 1] = "USDCAD"; MajorPair_Combo[5, 2] = "GBPCAD"; MajorPair_Combo[5, 3] = "AUDCAD"; MajorPair_Combo[5, 4] = "NZDCAD"; MajorPair_Combo[5, 5] = "CADCHF"; MajorPair_Combo[5, 6] = "CADJPY"; Base_Currency[5, 0] = -1; Base_Currency[5, 1] = -1; Base_Currency[5, 2] = -1; Base_Currency[5, 3] = -1; Base_Currency[5, 4] = -1; Base_Currency[5, 5] = 1; Base_Currency[5, 6] = 1; // 6-AUD PAIRS MajorPair_Combo[6, 0] = "EURAUD"; MajorPair_Combo[6, 1] = "GBPAUD"; MajorPair_Combo[6, 2] = "AUDUSD"; MajorPair_Combo[6, 3] = "AUDJPY"; MajorPair_Combo[6, 4] = "AUDNZD"; MajorPair_Combo[6, 5] = "AUDCHF"; MajorPair_Combo[6, 6] = "AUDCAD"; Base_Currency[6, 0] = -1; Base_Currency[6, 1] = -1; Base_Currency[6, 2] = 1; Base_Currency[6, 3] = 1; Base_Currency[6, 4] = 1; Base_Currency[6, 5] = 1; Base_Currency[6, 6] = 1; // 7-NZD PAIRS MajorPair_Combo[7, 0] = "EURNZD"; MajorPair_Combo[7, 1] = "GBPNZD"; MajorPair_Combo[7, 2] = "AUDNZD"; MajorPair_Combo[7, 3] = "NZDUSD"; MajorPair_Combo[7, 4] = "NZDJPY"; MajorPair_Combo[7, 5] = "NZDCHF"; MajorPair_Combo[7, 6] = "NZDCAD"; Base_Currency[7, 0] = -1; Base_Currency[7, 1] = -1; Base_Currency[7, 2] = -1; Base_Currency[7, 3] = 1; Base_Currency[7, 4] = 1; Base_Currency[7, 5] = 1; Base_Currency[7, 6] = 1; // NAME OF THE MONTHS Month_Name[0] = "1.Jan"; Month_Name[1] = "2.Feb"; Month_Name[2] = "3.Mar"; Month_Name[3] = "4.Apr"; Month_Name[4] = "5.May"; Month_Name[5] = "6.June"; Month_Name[6] = "7.Jul"; Month_Name[7] = "8.Aug"; Month_Name[8] = "9.Sep"; Month_Name[9] = "10.Oct"; Month_Name[10] = "11.Nov"; Month_Name[11] = "12.Dec"; //--------------------------------------------------- // CURRENT MONTH : OPEN AND CLOSE PRICES LP1_Array_Open[0] = 0; LP1_Array_Close[0] = 0; // INITIALIZE THE INDEX FOR ACCESSING PRICES for (int i = 1; i < LP1; i++) { LP1_Array_Open[i] = i; } //END FOR for (int i = 1; i < LP1; i++) { LP1_Array_Close[i] = i; } //END FOR LP1_TF_Name[0] = "Current"; for (int i = 1; i < LP1; i++) { LP1_TF_Name[i] = "Prev-" + i.ToString(); } //END FOR //--------------------------------------------------- } //END METHOD Initialize_Array_OnStart_Only } //END OF MAIN PUBLIC CLASS } //END OF MAIN cALGO ROBOT  
27 Feb 2017
Downloads
953
Comments
3
Rating
5
Download
Howdy!   Sharing one of my simple Grid trading systems. This can be used as it is but I strongly encourage you to add your own entry signal :)    Buy:Allow Buy orders Sell:Allow Sell orders PipStep: Grid base on these pip difference FirstVolume:What Volume to start with (0.01Lot) Max Spread: Max spread for girdtrade AvarageTP: Pips away for profit   Available Settings Backtesting(14/12-2016-->16/2-2017) with Stupid Entry Signal: Grid systems are dangerous to use so keep monitoring your positions.
16 Feb 2017
Downloads
290
Comments
0
Rating
0
Download
News Robot Enhanced (NRE) André Karlsson   <andre@sess.se> Download@ GitHub (Algo with source) (Direct link to repository is: https://github.com/joyider/nre ) Version: Pre-Production(Working) Will place news trades based on data downloaded from dailyFX.com  Place orders based on High/Meedium/Low news importance  Show historical news events onscreen  One Cancle Other or One DON'T Cancel Other  Trailing stop as an option (places SL at half of takeprofit when reached) This Cbot Isbased on the News Robot Cbot and the News - DailyFx Economic Calendar Indicator To set the Time zone you have to change the following: [Robot(TimeZone = TimeZones.WEuropeStandardTime, AccessRights = AccessRights.FullAccess)] and add YOUR time zone according to http://ctdn.com/api/reference/timezones. For Eastern Standard Time it shoudl be: [Robot(TimeZone = TimeZones.EasternStandardTime, AccessRights = AccessRights.FullAccess)] I've added some trailing stop and Error handeling to manage empty News lists to make it more versatile and to keep it running during weekends. Due to the nature on ths Cbot you can NOT backtest it. To try it run it a few weeks on a demo account... or monitor you trades manually in the begining. This robot will place one or two (depening on settings) pending orders (Buy and Sell) based on the next news event, and will only place a new order (based on next news event) when the first is finished. If you find any bugs/issues, please let me know. Or if you have any ideas on more enhancement set me an email or write a comment.   I Recommend you to only use news with HIGH importance in order to take advantage of the volatility. The Algo file is unfortunately too big to upload here :( so you have to install the CSV reader your self. Source code can be found @: GitHub
10 Feb 2017
Downloads
312
Comments
0
Rating
0
Download
Execute trades example using LinqToExcel and LINQ to easily read an Excel or CSV file into your Automated Trading Robot. Download Source Code Here Please note that this is an example and not a working robot. I found this very useful tool for working with Microsoft Excel data that I would like to share with you. If you need to get data out of Excel, which can be done using ADO.NET. However using LINQ to Excel makes this very easy for people who are not experienced programmers. DATA - ANALYSIS - TRADE This robot is an example to demonstrate the power you can have at your fingertips using cTrader, cAlgo and C#, this robot reads trades from an excel file and executes them in real time with the robot, you can dynamically modify the trade results with user defined parameters from the robots user interface or from within the code. Watch uTube video about LinqToExcel to find out more... https://www.youtube.com/embed/t3BEUP0OTFM THE SIMPLEST WAY OF READING DATA FROM EXCEL The example shows a list of trades for the day that have been entered onto a spreadsheet with separate sheets for different instruments, it does not matter if this would not be useful in real life, it is just to show what can be accomplished and possibilities. The image below shows information for opening new positions when the price reaches the entry price, the expiry date and time allows you to filter these out using LINQ from within your robot. You will notice in the source code that there is a class called DailyTrade, this class is the data container which will automatically be populated with data from the spreadsheet.  As you can see the class name is the same as the spreadsheet name dailyTrades.xls and each property has an attribute [ExcelColumn], this maps to the name of columns in the spreadsheet, so the property name does not have to be the same as the property name and you can have spaces in the column name. The code that injects all the data into the class is a collection of DataTrade objects, so you will end up with a list of daily trades which you can iterate through to open the trades. You will be able to access the data in a clean and readable manner like; trade.EntryPrice or trade.ExpiryDate. Download Source Code Here Phone: 0044 20 3289 6573 * All international calls are local rates (low cost) www.ClickAlgo.com Creative Trading with Technology            
31 Jan 2017
Downloads
855
Comments
16
Rating
5
Download