//+--------------------------------------------------------------------+ //| Copyright: (C) Forex Software Ltd. | //| Website: http://forexsb.com/ | //| Support: http://forexsb.com/forum/ | //| License: Proprietary under the following circumstances: | //| | //| This code is a part of Forex Strategy Builder. It is free for | //| use as an integral part of Forex Strategy Builder. | //| One can modify it in order to improve the code or to fit it for | //| personal use. This code or any part of it cannot be used in | //| other applications without a permission. | //| The contact information cannot be changed. | //| | //| NO LIABILITY FOR CONSEQUENTIAL DAMAGES | //| | //| In no event shall the author be liable for any damages whatsoever | //| (including, without limitation, incidental, direct, indirect and | //| consequential damages, damages for loss of business profits, | //| business interruption, loss of business information, or other | //| pecuniary loss) arising out of the use or inability to use this | //| product, even if advised of the possibility of such damages. | //+--------------------------------------------------------------------+ #property copyright "Copyright (C) Forex Software Ltd." #property link "http://forexsb.com" #property version "1.00" #property strict #include #include //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ class ExitTime : public Indicator { public: ExitTime(SlotTypes slotType) { SlotType=slotType; IndicatorName="Exit Time"; WarningMessage="The indicator rises a signal when the bar Close time is equal to the specified time."+"\n"+ "The strategy time frame has to allow closing at the specified time."; IsAllowLTF = false; ExecTime = ExecutionTime_AtBarClosing; IsSeparateChart = false; IsDiscreteValues = false; IsDeafultGroupAll = true; } virtual void Calculate(DataSet &dataSet); }; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void ExitTime::Calculate(DataSet &dataSet) { Data=GetPointer(dataSet); // Reading the parameters int hour=(int) NumParam[0].Value; int minute=(int) NumParam[1].Value; // Calculation const int firstBar=2; double signal[]; ArrayResize(signal,Data.Bars); ArrayInitialize(signal,0); // Calculation of the logic for(int bar=firstBar; bar