Home > Absence of Jurisdiction, Abuse of Process of Court, Art of Counter-CyberForensics, Bifurcation Theory, Blog, Bose-Chaudhuri-Hocquenghem Codes, Breach of Expert Duties, Breach of Natural Justice, Breach of Prosecution's Duties, Brute-Force Attack, Case Law Studies, Chain of Custody, Chain of Evidence, Chaos Theory, Code Breakers, Conspiracy Theory, Control, Credibility of Expert Witness, Criminal & Civil Liability of Expert Witness, Criminal Behavioral Studies, Criminal Justice, Criminal Procedures Code (Act 593) - Malayan Law, Criminology, Cryptanalysis, Cryptography, Custody, Cyber Forensics & Investigations, Damages, Data Analyses, Definition of Possession in Law, Domain Names, E-mail, Electronic Evidence, Error-Correcting Codes, Evidence Act 1950 (Malayan Law), Evidence Not Marked As Exhibit, Expert At Crime Scene, Expert Evidence, Expert Witness, Failure of Gaussian Hypothesis, Federal Constitutions, Fibonacci Numbers, First Information Report (FIR), Fluid Dynamics, Forensics Standards, FOREX THEORY, Fractal Market Analysis, Fractal Market Hypothesis, Fractal Time Series, Freedom and Privacy, Freedom of Thought, Fundamental Human Rights, Fuzzy Sets, Game Theory, Gaussian and Non-Gaussian, Gazetted Expert Witness, Geological Forensics Science, Human Rights, Marriage & Privacy, Illegally Obtained Evidence, Information, Intellectual Properties & Copyrights, Invasion of Privacy, Jurisdictions of Syariah Courts, Knowledge, Laminar Flow, Law of Tort, Limitation of Immunity of Judge in Lower Court, Limitations to The Immunity Rule, Lyapunov Exponent, Malicious Prosecution, Manner in which lack of competency may rise, Marriage Rights, Mathematical Chess Strategies, Mathematical Theory of Nothing, MD5, Measures of Central Tendency, Measures of Determinism, Measures of Dispersion, Measures of Fuzziness, Measures of Nothingness, Measures of Stochasticity, Meteorological Sciences and Analyses, My Young Padawans on The Moves, Natural Justice, Networking and Internet, Neural Fuzzy, Noisy Chaos vs R/S Analysis, Null Set Theory, Number Theory, One-Way Hash Functions, Padawan, Penal Codes, Perturbation Theory, Power and Privacy, Private Property, Private Spaces, Prosecution, Qualitative Analysis, Quantitative Analysis, Reed-Solomon Codes, Retrospective of Privacy, S 120 Parties to Civil Suits and Wives and Husbands, S1 Evidence Act 1950, S10 Evidence Act 1950, S11 Evidence Act 1950, S12 Evidence Act 1950, S122 Evidence Act (Communication During Marriage), S13 Evidence Act 1950, S14 Evidence Act 1950, S15 Evidence Act 1950, S16 Evidence Act 1950, S17 Evidence Act 1950, S2 Evidence Act 1950, S3 Evidence Act 1950, S4 Evidence Act 1950, S44 Fraud or Collusion in Obtaining Judgement or Incompetency of Court May Be Rise, S45 Evidence Act 1950, S5 Evidence Act 1950, S56 Fact Judicially Noticeable Need To Be Proved, S57 Facts of Which Court Must Take Judicial Notice, S6 Evidence Act 1950, S65 Evidence Act 1950, S65(1)(c) Evidence Act 1950, S7 Evidence Act 1950, S8 Evidence Act 1950, S9 Evidence Act 1950, S93 Exclusion of Evidence To Explain or Amend Ambigious Document, Scientific Evidence and Law, Secret of The Bodies, Secure Communications, Self-Perturbation, Self-Perturbed Prime Numbers, SHA-1, Solar and Lunar Calculations, Territories of Selfness, The Algorithms, The Daubert Test, The Dyas Test, The Frye Test, The Hurst Processes, The Jacobetz Refinement, The Kelly-Frye Test, The Kumho Gloss, The Non-linear Algorithms, The Post-Daubert Decisions, The Source Codes, The Spiral of Archimedes, The Spiral of Fibonacci, The Theory of Pure Democracy, The Williams Departure, Trial Within Trial, True Definition of Natural Justice, Turbulence, Vicarious Liability, Websites, Without Search Warrant > CodeGenius V7.0.13 Neural Fuzzy of The Fuzziness: Jimmy Choronology In Da Middle… of Disco Party? – Hey! Jimmy In Da Club – Mere Zindagi Mere Hindustani = Jimmy… Jimmy… Jimmy… (Echoing), Aadja… Aadja… Aadja… (Echoing) – Zindagi Mera Gana…

CodeGenius V7.0.13 Neural Fuzzy of The Fuzziness: Jimmy Choronology In Da Middle… of Disco Party? – Hey! Jimmy In Da Club – Mere Zindagi Mere Hindustani = Jimmy… Jimmy… Jimmy… (Echoing), Aadja… Aadja… Aadja… (Echoing) – Zindagi Mera Gana…

I am running several tests on Instaforex demo accounts:

Please download Instaforex multiterminal or Instaforex MT4 trading software to view the results in real-time.

http://www.instaforex.com/downloads.php

Special Words of Thanx to Mr. John Bollinger for his very useful Bollinger Bands:

____________________________________________________________________

//+—————————————————————————————-+
//|                                                                   CodeGenius V7.0.1 June 23 2013 .mq4 |
//|               Copyright © 2013, MOHAMAD IZAHAM BIN MOHAMED YATIM |
//|                                                                                    http://www.qassimbaba.com |
//+—————————————————————————————-+

#property copyright “Copyright © 2013, MOHAMAD IZAHAM BIN MOHAMED YATIM”
#property link      “http://www.qassimbaba.com”

#include <stdlib.mqh>
#include <stderror.mqh>
#include <WinUser32.mqh>

//********************************************************************************************************************
// Settings and Parameters
//********************************************************************************************************************

extern bool DynamicLotSize = false;
extern double EquityPercent = 1.0;
extern int MagicNumber = 313;
extern int Slippage = 3;
double TakeProfit = 0.00;
double StopLoss = 0.00;
extern double MaxSpread = 4;
extern int NumbersOfPairs = 8;
extern double MaxEquity = 13000000;

//********************************************************************************************************************

//********************************************************************************************************************
double MinAmount = 0;
double MarginLevel = 50;
int TradeUpPoint = 17;
double MinEquityStopLossPercentage = 30;
//********************************************************************************************************************

//********************************************************************************************************************
//—- Input Initialized Parameters
//********************************************************************************************************************

int x1 = 120;
int x2 = 172;
int x3 = 39;
int x4 = 172;

color pivotColor = Blue;
color pivotlevelColor = Blue;
int ChannelPeriod = 24;
int EMAPeriod = 120;
int StartEMAShift = 6;
int EndEMAShift = 0;
double AngleTreshold = 0.32;
string note1=”Change font colors automatically? True = Yes”;
bool   Bid_Ask_Colors=True;
string note2=”Default Price Font Color”;
color  FontColorPrice=Black;
string note3=”Font Size”;
int    FontSizePrice=26;
string note4=”Font Type”;
string FontType=”Rockwell”;
int Corner=1;
color CandleTimeColor = Blue;

int XDistance=1;
int YDistance=5;
double        Old_Price;
int signalcondition = 0;
int signalcondition2 = 0;
int CrossTime;
double CrossPrice;
string dbl2str;
string str_concat;
double UpperLine[];
double LowerLine[];
double MidLine[];
double BuyBuffer[];
double SellBuffer[];
double s1[];
bool BuySignal = FALSE;
bool SellSignal = FALSE;
bool BuySignal2 = FALSE;
bool SellSignal2 = FALSE;
bool CloseBuySignal = FALSE;
bool CloseSellSignal = FALSE;

//+——————————————————————+
//| External variables                                                                      |
//+——————————————————————+

double Slw = 8;
double Pds = 13;
double Slwsignal = 9;
int    Barcount = 2000;

//+——————————————————————+
//| Special Conversion Functions                                                 |
//+——————————————————————+

int LastTradeTime;
double ExtHistoBuffer[];
double ExtHistoBuffer2[];
bool BuyAlert=false, SellAlert=false;
bool BuyAlert2=false, SellAlert2=false;
bool BuyAlert3=false, SellAlert3=false;

void SetLoopCount(int loops)
{
}

void SetIndexValue(int shift, double value)
{
ExtHistoBuffer[shift] = value;
//  Print (“ExtHistoBuffer :” ,value);    // green
}

void SetIndexValue2(int shift, double value)
{
ExtHistoBuffer2[shift] = value;
//  Print (“ExtHistoBuffer2 :” ,value);    // green
}

double GetIndexValue(int shift)
{
return(ExtHistoBuffer[shift]);
}

double GetIndexValue2(int shift)
{
return(ExtHistoBuffer2[shift]);
}

// local variables
double PipValue=1;    // this variable is here to support 5-digit brokers
bool Terminated = false;
string LF = “\n”;  // use this in custom or utility blocks where you need line feeds
int NDigits = 4;   // used mostly for NormalizeDouble in Flex type blocks
int ObjCount = 0;  // count of all objects created on the chart, allows creation of objects with unique names
int current = 0;

int Count13 = 0;

int LastTradeUpTicket48 = -1;
int LastTradeUpTicket53 = -1;

int init()
{
NDigits = Digits;

if (false) ObjectsDeleteAll();      // clear the chart

Comment(“”);    // clear the chart
}

// Expert start
int start()
{

//********************************************************************************************************************
PlaySound(“tick.wav”);
//********************************************************************************************************************

//********************************************************************************************************************
double UsePoint;
int UseSlippage;
UsePoint = PipPoint(Symbol());
UseSlippage = GetSlippage(Symbol(),Slippage);
//********************************************************************************************************************

/********************************************************************************************************************

double barvalue[1][6];
double close;
double high;
double low;
int start;
double fEndMA;
double fStartMA;
double fAngle;
int digits;
double k;
int m,s,l;

ArrayCopyRates(barvalue, Symbol(), PERIOD_D1);
if (DayOfWeek() == 1) {
if (TimeDayOfWeek(iTime(Symbol(), PERIOD_D1, 1)) == 5) {
close = barvalue[1][4];
high = barvalue[1][3];
low = barvalue[1][2];
} else {
for (int j = 5; j >= 0; j–) {
if (TimeDayOfWeek(iTime(Symbol(), PERIOD_D1, j)) == 5) {
close = barvalue[j][4];
high = barvalue[j][3];
low = barvalue[j][2];
}
}
}
} else {
close = barvalue[1][4];
high = barvalue[1][3];
low = barvalue[1][2];
}
double rangehl = high – low;
double pivot = (high + low + close) / 3.0;
double R3 = pivot + 1.0 * rangehl;
double R2 = pivot + 0.618 * rangehl;
double R1 = pivot + rangehl / 2.0;
double S1 = pivot – rangehl / 2.0;
double S2 = pivot – 0.618 * rangehl;
double S3 = pivot – 1.0 * rangehl;

int counted_indicators = IndicatorCounted();
if (Bars <= ChannelPeriod) return (0);
if (counted_indicators >= ChannelPeriod) start = Bars – counted_indicators – 1;
else start = Bars – ChannelPeriod – 1;
BuyBuffer[0] = 0;
SellBuffer[0] = 0;
for (int i = start; i >= 0; i–) {

double AA = 0;
double bb = 0;
double aa1 = 0;
double cnt1 = 0;
int shift = 0;
double cnt = 0;
double loopbegin = 0;
double loopbegin2 = 0;
double loopbegin3 = 0;
bool first = True;
double prevbars = 0;
double sum = 0;
double smconst = 0;
double smconst1 = 0;
double prev = 0;
double prev1 = 0;
double prev2 = 0;
double prev3 = 0;
double weight = 0;
double linear = 0;
double MAValue = 0;
double MAValue2 = 0;
double mavalue3 = 0;
string MAstring = “”;
double MyHigh = 0;
double MyLow = 0;
int counter = 0;
double Price = 0;
double Price1 = 0;
double tmpDevAA = 0;

SetLoopCount(0);
smconst = 2 / (1+Slw);
smconst1 = 2 / (1+Slwsignal);

loopbegin = loopbegin+1;
for(shift =Barcount;shift >=0 ;shift –)
{
prev = GetIndexValue2(shift+1);

// Yousky 15/05/2006 – Change to avoid Zero divide exception.
AA = 0;
// —

MAValue2 = smconst * (AA-prev) + prev;

SetIndexValue2(shift,MAValue2);

loopbegin = loopbegin-1;

}

loopbegin2 = loopbegin2+1;
for(shift =Barcount-Pds;shift >=0 ;shift –){
MyHigh = -999999;
MyLow = 99999999;
for(counter =shift;counter <=Pds + shift ;counter ++){
Price= GetIndexValue2(counter);
if( Price > MyHigh )
MyHigh = Price;
if( Pds <= 0 )
MyHigh = Price;
if( Price < MyLow )
MyLow = Price;
if( Pds <= 0 )
MyLow = Price;
}

prev1 = GetIndexValue(shift+1);
aa1=GetIndexValue2(shift);

// Yousky 15/05/2006 – Change to avoid Zero divide exception.
bb= 0;
if ((MyHigh-MyLow) != 0)
bb=100*(aa1-MyLow)/(MyHigh-MyLow);
// —

MAValue = smconst * (bb-prev1) + prev1;

SetIndexValue(shift,MAValue);

loopbegin2 = loopbegin2-1;
}

//Print (MAValue);  // green

loopbegin3 = loopbegin3+1;
for(shift =Barcount;shift >=0 ;shift –){
prev2=GetIndexValue2(shift+1);
prev3=GetIndexValue(shift);
mavalue3= smconst1 * (prev3-prev2) +prev2;

SetIndexValue2(shift,mavalue3);
loopbegin3 = loopbegin3-1;

}

//+——————————————————————————————————————+
// BEGIN OF GENERALIZED DECISION FUNCTIONS
//+——————————————————————————————————————+

//+——————————————————————————————————————+
// END OF GENERALIZED DECISION FUNCTIONS
//+——————————————————————————————————————+

if (Bars < 10)
{
Comment(“Not enough bars”);
return (0);
}
if (Terminated == true)
{
Comment(“EA Terminated.”);
return (0);
}

OnEveryTick28();

}

void OnEveryTick28()
{
if (true == false && true) PipValue = 10;
if (true && (NDigits == 3 || NDigits == 5)) PipValue = 10;

SpreadFilter39();
PrintInfoToChart43();
PrintToLog44();
CheckEquity46();
IfOrderExists26();
IfOrderExists25();
SpreadFilter35();
CheckMarginLevel57();
CheckEquity55();
TechnicalAnalysis56();
TechnicalAnalysis72();

}

//ANY TIMEFRAME
//+——————————————————————————————————————+
//|                                                                                                                  |
//+——————————————————————————————————————+
double ACC()
{
double ACc = iAC(NULL, 0, 1);
return(ACc);
}
//+——————————————————————————————————————+

//+——————————————————————————————————————+
//|                                                                                                                  |
//+——————————————————————————————————————+
double RSI()
{
double rsi_sig = iRSI(NULL, 0, 14, PRICE_CLOSE, 0);
return(rsi_sig);
}
//+——————————————————————————————————————+

//+——————————————————————————————————————+
//|                                                                                                                  |
//+——————————————————————————————————————+
double CCI()
{
double CCI_SIG = iCCI(NULL, 0, 14, PRICE_CLOSE, 0);
return(CCI_SIG);
}
//+——————————————————————————————————————+
//|                                                                                                                  |
//+——————————————————————————————————————+
double WPR()
{
double WPR_SIG = iWPR(NULL, 0, 14, 0);
return(WPR_SIG);
}
//+——————————————————————————————————————+
//|                                                                                                                  |
//+——————————————————————————————————————+
double ATR()
{
double WPR_SIG = iATR(NULL, 0, 14, 0);
return(WPR_SIG);
}
//+——————————————————————————————————————+
//|  The EMA50 – a function                                                                                          |
//+——————————————————————————————————————+
double EMA50()
{
double EMA50CLOSEPRICE = iMA(NULL,0,50,0,MODE_SMMA,PRICE_CLOSE,0);
return(EMA50CLOSEPRICE);
}
//+——————————————————————————————————————+
//|  The Close Price – a function                                                                                    |
//+——————————————————————————————————————+
double CLOSE()
{
double CLOSEPRICE = double iClose(NULL, 0, 0);
return(CLOSEPRICE);
}
//+——————————————————————————————————————+

//+——————————————————————————————————————+
//|  The Open Price – a function                                                                                     |
//+——————————————————————————————————————+
double OPEN()
{
double OPENPRICE = double iOpen(NULL, 0, 0);
return(OPENPRICE);
}
//+——————————————————————————————————————+
//|                                                                                                                  |
//+——————————————————————————————————————+
double DeMarker()
{
double val=iDeMarker(NULL, 0, 14, 1);
return(val);
}
//+——————————————————————————————————————+

//+——————————————————————————————————————+
//|                                                                                                                  |
//+——————————————————————————————————————+
double ADX()
{
double adxer = iADX(NULL,0,14,PRICE_HIGH,MODE_MAIN,0) –
iADX(NULL,0,14,PRICE_HIGH,MODE_PLUSDI,0);
return(adxer);
}
//+——————————————————————————————————————+

//+——————————————————————————————————————+
//|                                                                                                                  |
//+——————————————————————————————————————+
double OsMA()
{
double Osama = (iOsMA(NULL,0,12,26,14,PRICE_OPEN,1)) –
(iOsMA(NULL,0,12,26,14,PRICE_OPEN,0));
return(Osama);
}
//+——————————————————————————————————————+

//+——————————————————————————————————————+
//|                                                                                                                  |
//+——————————————————————————————————————+
double FORCE()
{
double val2=(iForce(NULL, 0, 13,MODE_SMA,PRICE_CLOSE,0));
return(val2);
}
//+——————————————————————————————————————+

//+——————————————————————————————————————+
//|                                                                                                                  |
//+——————————————————————————————————————+
double MOM()
{
double MOMENT = (iMomentum(NULL,0,12,PRICE_CLOSE,0) –
iMomentum(NULL,0,20,PRICE_CLOSE,0));
return(MOMENT);
}
//+——————————————————————————————————————+
//|                                                                                                                  |
//+——————————————————————————————————————+
double volume()
{
int i = 0;
double val5 = (iVolume(Symbol(),0,i));
return(val5);
i++;
}

//+——————————————————————————————————————+
double PSAR()
{
double psar = (Close[0] – iSAR(NULL,0,0.02,0.2,0));
return(psar);
}
//+——————————————————————————————————————+
double MACD()
{
double macd = (iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0) –
iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,0));
return (macd);
}
//
//+——————————————————————————————————————+
double MACDMAIN()
{
double macdmain = (iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0));
return (macdmain);
}
//
//+——————————————————————————————————————+
double MACDSIGNAL()
{
double macdsignal = (iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,0));
return (macdsignal);
}
//
//+——————————————————————————————————————+
double highest()
{
int bar = WindowFirstVisibleBar();
double val6 = High[iHighest(NULL,0,MODE_HIGH, bar-1, 1)];
return(val6);
}
//+——————————————————————————————————————+
//
//+——————————————————————————————————————+
double lowest()
{
int bar = WindowFirstVisibleBar();
double val7 = Low[iLowest(NULL,0,MODE_LOW, bar-1, 1)];
return(val7);
}
//+——————————————————————————————————————+
//
//+——————————————————————————————————————+
double range()
{
double ranger = MathAbs((highest() – lowest()));
return(ranger);
}
//+——————————————————————————————————————+

//+——————————————————————————————————————+
//|                                                                                                                  |
//+——————————————————————————————————————+
double ackohonen()
{
double w1 = x1 – 100.0;
double w2 = x2 – 100.0;
double w3 = x3 – 100.0;
double w4 = x4 – 100.0;
double a1 = iAC(Symbol(), 0, 0);
double a2 = iAC(Symbol(), 0, 7);
double a3 = iAC(Symbol(), 0, 14);
double a4 = iAC(Symbol(), 0, 21);
double ackohonensqrt = (w1 * a1 + w2 * a2 + w3 * a3 + w4 * a4);
return (ackohonensqrt);
}
//+——————————————————————————————————————+

//+——————————————————————————————————————+
//|                                                                                                                  |
//+——————————————————————————————————————+
double achebbian()
{
double w11 = x1 – 100.0;
double w12 = x2 – 100.0;
double w13 = x3 – 100.0;
double w14 = x4 – 100.0;
double a11 = iAC(Symbol(), 0, 0);
double a12 = iAC(Symbol(), 0, 7);
double a13 = iAC(Symbol(), 0, 14);
double a14 = iAC(Symbol(), 0, 21);
double achebbiansqrt = (w11 * a11 + w12 * a12 + w13 * a13 + w14 * a14);
double achebbiansqr = ((achebbiansqrt*achebbiansqrt)/2);
return (achebbiansqr);
}
//+——————————————————————————————————————+

//+——————————————————————————————————————+
//|                                                                                                                  |
//+——————————————————————————————————————+
double macdkohonen()
{
double wmacdk1 = x1 – 100.0;
double wmacdk2 = x2 – 100.0;
double wmacdk3 = x3 – 100.0;
double wmacdk4 = x4 – 100.0;
double amacdk1 = iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0) – iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,0);
double amacdk2 = iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,7) – iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,7);
double amacdk3 = iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,14) – iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,14);
double amacdk4 = iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,21) – iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,21);
double macdkohonensqrt = (wmacdk1 * amacdk1 + wmacdk2 * amacdk2 + wmacdk3 * amacdk3 + wmacdk4 * amacdk4);
return (macdkohonensqrt);
}
//+——————————————————————————————————————+

//+——————————————————————————————————————+
//|                                                                                                                  |
//+——————————————————————————————————————+
double macdhebbian()
{
double wmacdh11 = x1 – 100.0;
double wmacdh12 = x2 – 100.0;
double wmacdh13 = x3 – 100.0;
double wmacdh14 = x4 – 100.0;
double amacdh11 = iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0) – iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,0);
double amacdh12 = iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,7) – iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,7);
double amacdh13 = iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,14) – iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,14);
double amacdh14 = iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,21) – iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,21);
double macdhebbiansqrt = (wmacdh11 * amacdh11 + wmacdh12 * amacdh12 + wmacdh13 * amacdh13 + wmacdh14 * amacdh14);
double macdhebbiansqr = ((macdhebbiansqrt*macdhebbiansqrt)/2);
return (macdhebbiansqr);
}
//+——————————————————————————————————————+

//+——————————————————————————————————————+

//+——————————————————————————————————————+
//|                                                                                                                  |
//+——————————————————————————————————————+
double bearkohonen()
{
double wbek1 = x1 – 100.0;
double wbek2 = x2 – 100.0;
double wbek3 = x3 – 100.0;
double wbek4 = x4 – 100.0;
double abek1 = iBearsPower(NULL, 0, 13,PRICE_CLOSE,0);
double abek2 = iBearsPower(NULL, 0, 13,PRICE_CLOSE,7);
double abek3 = iBearsPower(NULL, 0, 13,PRICE_CLOSE,14);
double abek4 = iBearsPower(NULL, 0, 13,PRICE_CLOSE,21);
double bearkohonensqrt = (-1)*(wbek1 * abek1 + wbek2 * abek2 + wbek3 * abek3 + wbek4 * abek4);
return (bearkohonensqrt);
}
//+——————————————————————————————————————+

//+——————————————————————————————————————+
//|                                                                                                                  |
//+——————————————————————————————————————+
double bearhebbian()
{
double wbeh11 = x1 – 100.0;
double wbeh12 = x2 – 100.0;
double wbeh13 = x3 – 100.0;
double wbeh14 = x4 – 100.0;
double abeh11 = iBearsPower(NULL, 0, 13,PRICE_CLOSE,0);
double abeh12 = iBearsPower(NULL, 0, 13,PRICE_CLOSE,7);
double abeh13 = iBearsPower(NULL, 0, 13,PRICE_CLOSE,14);
double abeh14 = iBearsPower(NULL, 0, 13,PRICE_CLOSE,21);
double bearhebbiansqrt = (wbeh11 * abeh11 + wbeh12 * abeh12 + wbeh13 * abeh13 + wbeh14 * abeh14);
double bearhebbiansqr = ((bearhebbiansqrt*bearhebbiansqrt)/2);
return (bearhebbiansqr);
}
//+——————————————————————————————————————+

//+——————————————————————————————————————+
//|                                                                                                                  |
//+——————————————————————————————————————+
double bullkohonen()
{
double wbuk1 = x1 – 100.0;
double wbuk2 = x2 – 100.0;
double wbuk3 = x3 – 100.0;
double wbuk4 = x4 – 100.0;
double abuk1 = iBullsPower(NULL, 0, 13,PRICE_CLOSE,0);
double abuk2 = iBullsPower(NULL, 0, 13,PRICE_CLOSE,7);
double abuk3 = iBullsPower(NULL, 0, 13,PRICE_CLOSE,14);
double abuk4 = iBullsPower(NULL, 0, 13,PRICE_CLOSE,21);
double bullkohonensqrt = (wbuk1 * abuk1 + wbuk2 * abuk2 + abuk3 * abuk3 + wbuk4 * abuk4);
return (bullkohonensqrt);
}
//+——————————————————————————————————————+

//+——————————————————————————————————————+
//|                                                                                                                  |
//+——————————————————————————————————————+
double bullhebbian()
{
double wbuh11 = x1 – 100.0;
double wbuh12 = x2 – 100.0;
double wbuh13 = x3 – 100.0;
double wbuh14 = x4 – 100.0;
double abuh11 = iBullsPower(NULL, 0, 13,PRICE_CLOSE,0);
double abuh12 = iBullsPower(NULL, 0, 13,PRICE_CLOSE,7);
double abuh13 = iBullsPower(NULL, 0, 13,PRICE_CLOSE,14);
double abuh14 = iBullsPower(NULL, 0, 13,PRICE_CLOSE,21);
double bullhebbiansqrt = (wbuh11 * abuh11 + wbuh12 * abuh12 + wbuh13 * abuh13 + wbuh14 * abuh14);
double bullhebbiansqr = ((bullhebbiansqrt*bullhebbiansqrt)/2);
return (bullhebbiansqr);
}
//+——————————————————————————————————————+

//+——————————————————————————————————————+
//|  The Slippage Function and PipPoint                                                                              |
//+——————————————————————————————————————+
// Pip Point Function
double PipPoint(string Currency)
{
int CalcDigits = MarketInfo(Currency,MODE_DIGITS);
if(CalcDigits == 2 || CalcDigits == 3) double CalcPoint = 0.01;
else if(CalcDigits == 4 || CalcDigits == 5) CalcPoint = 0.0001;
return(CalcPoint);
}

// Get Slippage Function
int GetSlippage(string Currency, int SlippagePips)
{
int CalcDigits = MarketInfo(Currency,MODE_DIGITS);
if(CalcDigits == 2 || CalcDigits == 4) double CalcSlippage = SlippagePips;
else if(CalcDigits == 3 || CalcDigits == 5) CalcSlippage = SlippagePips * 10;
return(CalcSlippage);
}
//+——————————————————————————————————————+

void SpreadFilter39()//SPREAD FILTER BUY ORDER
{
if (MarketInfo(Symbol(), MODE_SPREAD)/PipValue < MaxSpread)
{
IfOrderDoesNotExist38();

}
}

void IfOrderDoesNotExist38()
{
bool exists = false;
for (int i=OrdersTotal()-1; i >= 0; i–)
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
{
if (OrderType() == OP_BUY && OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber)
{
exists = true;
}
}
else
{
Print(“OrderSelect() error – “, ErrorDescription(GetLastError()));
}

if (exists == false)
{
TechnicalAnalysis2xOr37();

}
}

void TechnicalAnalysis2xOr37()// TECHNICAL ANALYSIS OPEN BUY ORDER
{
if ((0 > 0) || (0 > 0))
{
BuyOrder36();

}
}

void BuyOrder36()
{

//+——————————————————————————————————————+
// Begin of LotSize Calculation
//+——————————————————————————————————————+
if(DynamicLotSize == true)
{
double RiskAmount = AccountEquity() * (EquityPercent / 100);
double TickValue = MarketInfo(Symbol(),MODE_TICKVALUE);
if(Point == 0.001 || Point == 0.00001) TickValue *= 10;
double CalcLots = (RiskAmount / StopLoss) / TickValue;
double LotSize = CalcLots;
}
else LotSize = LotSizeOnEquity;

// Lot size verification
if(LotSize < MarketInfo(Symbol(),MODE_MINLOT))
{
LotSize = MarketInfo(Symbol(),MODE_MINLOT);
}
else if(LotSize > MarketInfo(Symbol(),MODE_MAXLOT))
{
LotSize = MarketInfo(Symbol(),MODE_MAXLOT);
}

if(MarketInfo(Symbol(),MODE_LOTSTEP) == 0.1)
{
LotSize = NormalizeDouble(LotSize,1);
}
else LotSize = NormalizeDouble(LotSize,2);
//+——————————————————————————————————————+
// End of LotSize Calculation
//+——————————————————————————————————————+

double SL = Ask – StopLoss*PipValue*Point;
if (StopLoss == 0) SL = 0;
double TP = Ask + TakeProfit*PipValue*Point;
if (TakeProfit == 0) TP = 0;
int ticket = -1;
if (true)
ticket = OrderSend(Symbol(), OP_BUY, LotSize, Ask, Slippage, 0, 0, “CodeGenius™ V7.0 IfGap”, MagicNumber, 0, Blue);
else
ticket = OrderSend(Symbol(), OP_BUY, LotSize, Ask, Slippage, SL, TP, “CodeGenius™ V7.0 IfGap”, MagicNumber, 0, Blue);
if (ticket > -1)
{
if (true)
{
OrderSelect(ticket, SELECT_BY_TICKET);
bool ret = OrderModify(OrderTicket(), OrderOpenPrice(), SL, TP, 0, Blue);
if (ret == false)
Print(“OrderModify() error – “, ErrorDescription(GetLastError()));
}
PrintToLog40();

}
else
{
Print(“OrderSend() error – “, ErrorDescription(GetLastError()));
}
}

void PrintToLog40()
{
Print(“Open Buy”);

}

void PrintInfoToChart43()
{
string temp = “Mohamad Izaham Bin Mohamed Yatim – Copyright © 1990 – 2013, CodeGenius™ (United Kingdom) Limited\nCodeGenius™ V7.0 : Executed : ” + Count13 + “, SPREAD : ” + DoubleToStr(MarketInfo(Symbol(), MODE_SPREAD)/PipValue, 2) +
+ “————————————————————————————————————————————————————————-\n”
+ “TECHNICAL ANALYSES:\n”
+ “\n”
+ “RSI (14) : ” + DoubleToStr(RSI(), 4)+ “, CCI (14) : ” + DoubleToStr(CCI(), 4)+ “, WPR (14) : ” + DoubleToStr(WPR(), 4)+ “, ATR (14) : ” + DoubleToStr(ATR(), 4)+ “, ADX (14) : ” + DoubleToStr(ADX(), 4)+ “, AC ( ) : ” + DoubleToStr(ACC(), 4)+ “\n”
+ “EMA50 : ” + DoubleToStr(EMA50(), 4)+ “, MACD (12,26,9) : ” + DoubleToStr(MACD(), 4)+ “, OPEN PRICE : ” + DoubleToStr(OPEN(), 4)+ “, CLOSE PRICE : ” + DoubleToStr(CLOSE(), 4)+ “, CLOSE – OPEN : ” + DoubleToStr(CLOSE() – OPEN(), 4)+ “\n”
+ “MARKET STABILITY : ” + Symbol() + “, CLOSE PRICE – PSAR (0.02,0.2) : ” + DoubleToStr(PSAR(), 4)+ “, CLOSE PRICE – EMA(50) : ” + DoubleToStr(CLOSE() – EMA50(), 4)+ “\n”
+ “STOCHASTIC (5,3,3) : ” + DoubleToStr(Stochastic(), 4)+ “, STOCHASTICMAIN(5,3,3) : ” + DoubleToStr(StochasticMain(), 4)+ “, STOCHASTICSIGNAL(5,3,3) : ” + DoubleToStr(StochasticSignal(), 4)+ “\n”
+ “MACD (12,26,9) : ” + DoubleToStr(MACD(), 4)+ “, MACDMAIN (12,26,9) : ” + DoubleToStr(MACDMAIN(), 4)+ “, MACDSIGNAL (12,26,9) : ” + DoubleToStr(MACDSIGNAL(), 4)+ “, FORCE (14) : ” + DoubleToStr(FORCE(), 4)+ “\n”
+ “DeMarker (14) : ” + DoubleToStr(DeMarker(), 4)+ “, OsMA (14) : ” + DoubleToStr(OsMA(), 4)+ “, Volume : ” + DoubleToStr(volume(), 0)+ “, MOMENTUM (14) : ” + DoubleToStr(MOM(), 4)+ “, Equity / Balance : ” + DoubleToStr(AccountEquity()/AccountBalance(), 2) + “\n”
+ “————————————————————————————————————————————————————————-\n”
+ “NEURAL FUZZY NETS AND CHAOS THEORETICAL ANALYSES:\n”
+ “\n”
+ “Node 01      AC Kohonen :    ” + DoubleToStr(ackohonen(), 4)+ ”   Node 05 BEAR Kohonen :     ” + DoubleToStr(bearkohonen(), 4)+ “\n”
+ “Node 02       AC Hebbian :    ” + DoubleToStr(achebbian(), 4)+ ”   Node 06 BEAR Hebbian :      ” + DoubleToStr(bearhebbian(), 4)+ “\n”
+ “Node 03 MACD Kohonen :    ” + DoubleToStr(macdkohonen(), 4)+ ”   Node 07 BULL Kohonen :      ” + DoubleToStr(bullkohonen(), 4)+ “\n”
+ “Node 04 MACD Hebbian :     ” + DoubleToStr(macdhebbian(), 4)+ ”   Node 08 BULL Hebbian :       ” + DoubleToStr(bullhebbian(), 4)+ “\n”
+ “————————————————————————————————————————————————————————-\n”
/*  + “FIBONACCI ANALYSES:\n”
+ “\n”
+ “Fibonacci 0.00 R %    : ” + DoubleToStr(Retrace000, 4)+ “, Fibonacci 23.6 R %  : ” + DoubleToStr(Retrace236, 4)+ “\n”
+ “Fibonacci 38.2 R %    : ” + DoubleToStr(Retrace382, 4)+ “, Fibonacci 50.0 R %  : ” + DoubleToStr(Retrace50, 4)+ “\n”
+ “Fibonacci 61.8 R %    : ” + DoubleToStr(Retrace618, 4)+ “, Fibonacci 100.0 R % : ” + DoubleToStr(Retrace1000, 4)+ “\n”
+ “Fibonacci 61.8.0 E %  : ” + DoubleToStr(Extend618, 4)+ “, Fibonacci 100.0 E % : ” + DoubleToStr(Extend1000, 4)+ “\n”
+ “Fibonacci 138.2 E %  : ” + DoubleToStr(Extend1382, 4)+ “, Fibonacci 161.8 E % : ” + DoubleToStr(Extend1618, 4)+ “\n”
+ “Fibonacci 261.8 E % : ” + DoubleToStr(Extend2618, 4)+ “, Fibonacci 423.6 E %  : ” + DoubleToStr(Extend4236, 4)+ “\n”
*/  + “Lowest Peak: ” + DoubleToStr(lowest(), 4)+ “, Highest Peak: ” + DoubleToStr(highest(), 4)+ “, Range: ” + DoubleToStr(range(), 4)+ “\n”
+ “————————————————————————————————————————————————————————-\n”
+ “ACCOUNT INFORMATIONS:\n”
+ “\n”
+ “Account Name:     ” + AccountName()+ “\n”
+ “Account Leverage:     ” + DoubleToStr(AccountLeverage(), 0)+ “\n”
+ “Account Balance:     ” + DoubleToStr(AccountBalance(), 2)+ “\n”
+ “Account Equity:     ” + DoubleToStr(AccountEquity(), 2)+ “\n”
+ “Free Margin:     ” + DoubleToStr(AccountFreeMargin(), 2)+ “\n”
+ “Used Margin:     ” + DoubleToStr(AccountMargin(), 2)+ “\n”
+ “Profit/Loss:      ” + DoubleToStr(AccountProfit(), 2)+ “\n”
+ “Floatings %:      ” + DoubleToStr(AccountProfit()/AccountBalance()*100, 2)+” %”+”\n”
+ “————————————————————————————————————————————————————————-\n”;
Comment(temp);
Count13++;
}

void PrintToLog44()
{
Print(“I am Thinking Honey…”);

}

void CheckEquity46()//CHECK EQUITY TO CLOSE ORDERS WHEN REACHES 13,000,000.00
{

if (AccountEquity() > MaxEquity)
{
CloseOrderIf41();
CloseOrderIf42();

}
}

void CloseOrderIf41()
{
int orderstotal = OrdersTotal();
int orders = 0;
int ordticket[30][2];
for (int i = 0; i < orderstotal; i++)
{
OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
if (OrderType() != OP_SELL || OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber)
{
continue;
}
if (OrderProfit() > MinAmount)
{
ordticket[orders][0] = OrderOpenTime();
ordticket[orders][1] = OrderTicket();
orders++;
}
}
if (orders > 1)
{
ArrayResize(ordticket,orders);
ArraySort(ordticket);
}
for (i = 0; i < orders; i++)
{
if (OrderSelect(ordticket[i][1], SELECT_BY_TICKET) == true)
{
bool ret = OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), Slippage, Red);
if (ret == false)
Print(“OrderClose() error – “, ErrorDescription(GetLastError()));
}
}
PrintToLog29();

}

void PrintToLog29()
{
Print(“Close Sell “);

}

void CloseOrderIf42()
{
int orderstotal = OrdersTotal();
int orders = 0;
int ordticket[30][2];
for (int i = 0; i < orderstotal; i++)
{
OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
if (OrderType() != OP_BUY || OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber)
{
continue;
}
if (OrderProfit() > MinAmount)
{
ordticket[orders][0] = OrderOpenTime();
ordticket[orders][1] = OrderTicket();
orders++;
}
}
if (orders > 1)
{
ArrayResize(ordticket,orders);
ArraySort(ordticket);
}
for (i = 0; i < orders; i++)
{
if (OrderSelect(ordticket[i][1], SELECT_BY_TICKET) == true)
{
bool ret = OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), Slippage, Red);
if (ret == false)
Print(“OrderClose() error – “, ErrorDescription(GetLastError()));
}
}
PrintToLog30();

}

void PrintToLog30()
{
Print(“Close Buy”);

}

void IfOrderExists26()
{
bool exists = false;
for (int i=OrdersTotal()-1; i >= 0; i–)
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
{
if (OrderType() == OP_SELL && OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber)
{
exists = true;
}
}
else
{
Print(“OrderSelect() error – “, ErrorDescription(GetLastError()));
}

if (exists)
{
TechnicalAnalysis24();
TechnicalAnalysis47();

}
}

void TechnicalAnalysis24()// TECHNICAL ANALYSIS CLOSE ORDER?
{
if (0 > 0)
{
CloseOrderIf41();

}
}

void TechnicalAnalysis47()// TECHNICAL ANALYSIS TRADE UP OPEN  ORDER
{
if (0 > 0)
{
TradeUp48();

}
}

void TradeUp48()
{

//+——————————————————————————————————————+
// Begin of LotSize Calculation
//+——————————————————————————————————————+
if(DynamicLotSize == true)
{
double RiskAmount = AccountEquity() * (EquityPercent / 100);
double TickValue = MarketInfo(Symbol(),MODE_TICKVALUE);
if(Point == 0.001 || Point == 0.00001) TickValue *= 10;
double CalcLots = (RiskAmount / StopLoss) / TickValue;
double LotSize = CalcLots;
}
else LotSize = LotSizeOnEquity;

// Lot size verification
if(LotSize < MarketInfo(Symbol(),MODE_MINLOT))
{
LotSize = MarketInfo(Symbol(),MODE_MINLOT);
}
else if(LotSize > MarketInfo(Symbol(),MODE_MAXLOT))
{
LotSize = MarketInfo(Symbol(),MODE_MAXLOT);
}

if(MarketInfo(Symbol(),MODE_LOTSTEP) == 0.1)
{
LotSize = NormalizeDouble(LotSize,1);
}
else LotSize = NormalizeDouble(LotSize,2);
//+——————————————————————————————————————+
// End of LotSize Calculation
//+——————————————————————————————————————+

bool exists = false;
if (LastTradeUpTicket48 != -1)
{
for (int j=OrdersTotal()-1; j >= 0; j–)
if (OrderSelect(j, SELECT_BY_POS, MODE_TRADES))
{
if (OrderTicket() == LastTradeUpTicket48)
{
exists = true;
}
}
else
{
Print(“OrderSelect() error – “, ErrorDescription(GetLastError()));
}
}
if (exists == false) LastTradeUpTicket48 = -1;  // reset Ticket Id so trade-up would be possible

double takeprofit = 0;
double stoploss = 0;
for (int i=OrdersTotal()-1; i >= 0; i–)
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
{
if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber && LastTradeUpTicket48 == -1)
{

if (OrderType() == OP_BUY && Ask – OrderOpenPrice() > TradeUpPoint*PipValue*Point)
{
takeprofit = Ask+TakeProfit*PipValue*Point;
if (TakeProfit == 0) takeprofit = OrderTakeProfit();
stoploss = Ask-StopLoss*PipValue*Point;
if (StopLoss == 0) stoploss = OrderStopLoss();

LastTradeUpTicket48 = OrderTicket();

int ticket = -1;
if (true)
ticket = OrderSend(Symbol(), OP_BUY, LotSize, Ask, Slippage, 0, 0, “CodeGenius™ V7.0 IfGap”, MagicNumber, 0, White);
else
ticket = OrderSend(Symbol(), OP_BUY, LotSize, Ask, Slippage, stoploss, takeprofit, “CodeGenius™ V7.0 IfGap”, MagicNumber, 0, White);
if (ticket > -1)
{
if (true)
{
OrderSelect(ticket, SELECT_BY_TICKET);
bool ret = OrderModify(OrderTicket(), OrderOpenPrice(), stoploss, takeprofit, 0, White);
if (ret == false)
Print(“OrderModify() error – “, ErrorDescription(GetLastError()));
}

}

}
if (OrderType() == OP_SELL && OrderOpenPrice() – Bid > TradeUpPoint*PipValue*Point)
{

takeprofit = Bid – TakeProfit*PipValue*Point;
if (TakeProfit == 0) takeprofit = OrderTakeProfit();
stoploss = Bid+StopLoss*PipValue*Point;
if (StopLoss == 0) stoploss = OrderStopLoss();

LastTradeUpTicket48 = OrderTicket();

int ticket2 = -1;
if (true)
ticket2 = OrderSend(Symbol(), OP_SELL, LotSize, Bid, Slippage, 0, 0, “CodeGenius™ V7.0 IfGap”, MagicNumber, 0, White);
else
ticket2 = OrderSend(Symbol(), OP_SELL, LotSize, Bid, Slippage, stoploss, takeprofit, “CodeGenius™ V7.0 IfGap”, MagicNumber, 0, White);
if (ticket2 > -1)
{
if (true)
{
OrderSelect(ticket2, SELECT_BY_TICKET);
bool ret4 = OrderModify(OrderTicket(), OrderOpenPrice(), stoploss, takeprofit, 0, White);
if (ret4 == false)
Print(“OrderModify() error – “, ErrorDescription(GetLastError()));
}

}

}

}
}
else
Print(“OrderSelect() error – “, ErrorDescription(GetLastError()));

}

void IfOrderExists25()
{
bool exists = false;
for (int i=OrdersTotal()-1; i >= 0; i–)
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
{
if (OrderType() == OP_BUY && OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber)
{
exists = true;
}
}
else
{
Print(“OrderSelect() error – “, ErrorDescription(GetLastError()));
}

if (exists)
{
TechnicalAnalysis27();
TechnicalAnalysis51();

}
}

void TechnicalAnalysis27()// TECHNICAL ANALYSIS CLOSE ORDER?
{
if (0 > 0)
{
CloseOrderIf42();

}
}

void TechnicalAnalysis51()// TECHNICAL ANALYSIS TRADE UP OPEN ORDER?
{
if (0 > 0)
{
TradeUp53();

}
}

void TradeUp53()
{

//+——————————————————————————————————————+
// Begin of LotSize Calculation
//+——————————————————————————————————————+
if(DynamicLotSize == true)
{
double RiskAmount = AccountEquity() * (EquityPercent / 100);
double TickValue = MarketInfo(Symbol(),MODE_TICKVALUE);
if(Point == 0.001 || Point == 0.00001) TickValue *= 10;
double CalcLots = (RiskAmount / StopLoss) / TickValue;
double LotSize = CalcLots;
}
else LotSize = LotSizeOnEquity;

// Lot size verification
if(LotSize < MarketInfo(Symbol(),MODE_MINLOT))
{
LotSize = MarketInfo(Symbol(),MODE_MINLOT);
}
else if(LotSize > MarketInfo(Symbol(),MODE_MAXLOT))
{
LotSize = MarketInfo(Symbol(),MODE_MAXLOT);
}

if(MarketInfo(Symbol(),MODE_LOTSTEP) == 0.1)
{
LotSize = NormalizeDouble(LotSize,1);
}
else LotSize = NormalizeDouble(LotSize,2);
//+——————————————————————————————————————+
// End of LotSize Calculation
//+——————————————————————————————————————+

bool exists = false;
if (LastTradeUpTicket53 != -1)
{
for (int j=OrdersTotal()-1; j >= 0; j–)
if (OrderSelect(j, SELECT_BY_POS, MODE_TRADES))
{
if (OrderTicket() == LastTradeUpTicket53)
{
exists = true;
}
}
else
{
Print(“OrderSelect() error – “, ErrorDescription(GetLastError()));
}
}
if (exists == false) LastTradeUpTicket53 = -1;  // reset Ticket Id so trade-up would be possible

double takeprofit = 0;
double stoploss = 0;
for (int i=OrdersTotal()-1; i >= 0; i–)
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
{
if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber && LastTradeUpTicket53 == -1)
{

if (OrderType() == OP_BUY && Ask – OrderOpenPrice() > TradeUpPoint*PipValue*Point)
{
takeprofit = Ask + TakeProfit*PipValue*Point;
if (TakeProfit == 0) takeprofit = OrderTakeProfit();
stoploss = Ask-StopLoss*PipValue*Point;
if (StopLoss == 0) stoploss = OrderStopLoss();

LastTradeUpTicket53 = OrderTicket();

int ticket = -1;
if (true)
ticket = OrderSend(Symbol(), OP_BUY, LotSize, Ask, Slippage, 0, 0, “CodeGenius™ V7.0 IfGap”, MagicNumber, 0, White);
else
ticket = OrderSend(Symbol(), OP_BUY, LotSize, Ask, Slippage, stoploss, takeprofit, “CodeGenius™ V7.0 IfGap”, MagicNumber, 0, White);
if (ticket > -1)
{
if (true)
{
OrderSelect(ticket, SELECT_BY_TICKET);
bool ret = OrderModify(OrderTicket(), OrderOpenPrice(), stoploss, takeprofit, 0, White);
if (ret == false)
Print(“OrderModify() error – “, ErrorDescription(GetLastError()));
}

}

}
if (OrderType() == OP_SELL && OrderOpenPrice() – Bid > TradeUpPoint*PipValue*Point)
{

takeprofit = Bid – TakeProfit*PipValue*Point;
if (TakeProfit == 0) takeprofit = OrderTakeProfit();
stoploss = Bid+StopLoss*PipValue*Point;
if (StopLoss == 0) stoploss = OrderStopLoss();

LastTradeUpTicket53 = OrderTicket();

int ticket2 = -1;
if (true)
ticket2 = OrderSend(Symbol(), OP_SELL, LotSize, Bid, Slippage, 0, 0, “CodeGenius™ V7.0 IfGap”, MagicNumber, 0, White);
else
ticket2 = OrderSend(Symbol(), OP_SELL, LotSize, Bid, Slippage, stoploss, takeprofit, “CodeGenius™ V7.0 IfGap”, MagicNumber, 0, White);
if (ticket2 > -1)
{
if (true)
{
OrderSelect(ticket2, SELECT_BY_TICKET);
bool ret4 = OrderModify(OrderTicket(), OrderOpenPrice(), stoploss, takeprofit, 0, White);
if (ret4 == false)
Print(“OrderModify() error – “, ErrorDescription(GetLastError()));
}

}

}

}
}
else
Print(“OrderSelect() error – “, ErrorDescription(GetLastError()));

}

void SpreadFilter35()//SPREAD FILTER SELL ORDER
{
if (MarketInfo(Symbol(), MODE_SPREAD)/PipValue < MaxSpread)
{
IfOrderDoesNotExist34();

}
}

void IfOrderDoesNotExist34()
{
bool exists = false;
for (int i=OrdersTotal()-1; i >= 0; i–)
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
{
if (OrderType() == OP_SELL && OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber)
{
exists = true;
}
}
else
{
Print(“OrderSelect() error – “, ErrorDescription(GetLastError()));
}

if (exists == false)
{
TechnicalAnalysis2xOr33();

}
}

void TechnicalAnalysis2xOr33()// TECHNICAL ANALYSIS OPEN SELL ORDER
{
if ((0 > 0) || (0 > 0))
{
SellOrder32();

}
}

void SellOrder32()
{

//+——————————————————————————————————————+
// Begin of LotSize Calculation
//+——————————————————————————————————————+
if(DynamicLotSize == true)
{
double RiskAmount = AccountEquity() * (EquityPercent / 100);
double TickValue = MarketInfo(Symbol(),MODE_TICKVALUE);
if(Point == 0.001 || Point == 0.00001) TickValue *= 10;
double CalcLots = (RiskAmount / StopLoss) / TickValue;
double LotSize = CalcLots;
}
else LotSize = LotSizeOnEquity;

// Lot size verification
if(LotSize < MarketInfo(Symbol(),MODE_MINLOT))
{
LotSize = MarketInfo(Symbol(),MODE_MINLOT);
}
else if(LotSize > MarketInfo(Symbol(),MODE_MAXLOT))
{
LotSize = MarketInfo(Symbol(),MODE_MAXLOT);
}

if(MarketInfo(Symbol(),MODE_LOTSTEP) == 0.1)
{
LotSize = NormalizeDouble(LotSize,1);
}
else LotSize = NormalizeDouble(LotSize,2);
//+——————————————————————————————————————+
// End of LotSize Calculation
//+——————————————————————————————————————+

double SL = Bid + StopLoss*PipValue*Point;
if (StopLoss == 0) SL = 0;
double TP = Bid – TakeProfit*PipValue*Point;
if (TakeProfit == 0) TP = 0;
int ticket = -1;
if (true)
ticket = OrderSend(Symbol(), OP_SELL, LotSize, Bid, Slippage, 0, 0, “CodeGenius™ V7.0 IfGap”, MagicNumber, 0, Red);
else
ticket = OrderSend(Symbol(), OP_SELL, LotSize, Bid, Slippage, SL, TP, “CodeGenius™ V7.0 IfGap”, MagicNumber, 0, Red);
if (ticket > -1)
{
if (true)
{
OrderSelect(ticket, SELECT_BY_TICKET);
bool ret = OrderModify(OrderTicket(), OrderOpenPrice(), SL, TP, 0, Red);
if (ret == false)
Print(“OrderModify() error – “, ErrorDescription(GetLastError()));
}
PrintToLog31();

}
else
{
Print(“OrderSend() error – “, ErrorDescription(GetLastError()));
}
}

void PrintToLog31()
{
Print(“Open Sell”);

}

void CheckMarginLevel57()// TECHNICAL ANALYSIS CHECK MARGIN LEVEL
{

if ((AccountEquity() / AccountMargin()) * 100 > MarginLevel)
{

}
}

void CheckEquity55()// TECHNICAL ANALYSIS CHECK MINEQUITYSTOPLOSS
{

if (AccountEquity() < (MinEquityStopLossPercentage/100)*AccountBalance())
{
CloseOrder64();
CloseOrder63();

}
}

void CloseOrder64()
{
int orderstotal = OrdersTotal();
int orders = 0;
int ordticket[30][2];
for (int i = 0; i < orderstotal; i++)
{
OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
if (OrderType() != OP_BUY || OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber)
{
continue;
}
ordticket[orders][0] = OrderOpenTime();
ordticket[orders][1] = OrderTicket();
orders++;
}
if (orders > 1)
{
ArrayResize(ordticket,orders);
ArraySort(ordticket);
}
for (i = 0; i < orders; i++)
{
if (OrderSelect(ordticket[i][1], SELECT_BY_TICKET) == true)
{
bool ret = OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), Slippage, Red);
if (ret == false)
Print(“OrderClose() error – “, ErrorDescription(GetLastError()));
}
}
PrintToLog67();

}

void PrintToLog67()
{
Print(“Close All Orders”);

}

void CloseOrder63()
{
int orderstotal = OrdersTotal();
int orders = 0;
int ordticket[30][2];
for (int i = 0; i < orderstotal; i++)
{
OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
if (OrderType() != OP_SELL || OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber)
{
continue;
}
ordticket[orders][0] = OrderOpenTime();
ordticket[orders][1] = OrderTicket();
orders++;
}
if (orders > 1)
{
ArrayResize(ordticket,orders);
ArraySort(ordticket);
}
for (i = 0; i < orders; i++)
{
if (OrderSelect(ordticket[i][1], SELECT_BY_TICKET) == true)
{
bool ret = OrderClose(OrderTicket(), OrderLots(), OrderClosePrice(), Slippage, Red);
if (ret == false)
Print(“OrderClose() error – “, ErrorDescription(GetLastError()));
}
}
PrintToLog67();

}

void TechnicalAnalysis56()// TECHNICAL ANALYSIS CUSTOM 1
{
if (0 > 0)
{
CustomCode60();

}
}

void CustomCode60()
{
//——————————————
// Neural Fuzzy Algorithm 1 Source Codes
//——————————————
//
//
//
//
//
//
//
//——————————————
PrintToLog70();

}

void PrintToLog70()
{
Print(“Custom 1”);

}

void TechnicalAnalysis72()// TECHNICAL ANALYSIS CUSTOM 2
{
if (0 > 0)
{
CustomCode74();

}
}

void CustomCode74()
{
//——————————————
// Neural Fuzzy Algorithm 2 Source Codes
//——————————————
//
//
//
//
//
//
//
//——————————————
PrintToLog76();

}

void PrintToLog76()
{
Print(“Custom 2”);

}

int deinit()
{

if (false) ObjectsDeleteAll();

}

instaforex135

Categories: Absence of Jurisdiction, Abuse of Process of Court, Art of Counter-CyberForensics, Bifurcation Theory, Blog, Bose-Chaudhuri-Hocquenghem Codes, Breach of Expert Duties, Breach of Natural Justice, Breach of Prosecution's Duties, Brute-Force Attack, Case Law Studies, Chain of Custody, Chain of Evidence, Chaos Theory, Code Breakers, Conspiracy Theory, Control, Credibility of Expert Witness, Criminal & Civil Liability of Expert Witness, Criminal Behavioral Studies, Criminal Justice, Criminal Procedures Code (Act 593) - Malayan Law, Criminology, Cryptanalysis, Cryptography, Custody, Cyber Forensics & Investigations, Damages, Data Analyses, Definition of Possession in Law, Domain Names, E-mail, Electronic Evidence, Error-Correcting Codes, Evidence Act 1950 (Malayan Law), Evidence Not Marked As Exhibit, Expert At Crime Scene, Expert Evidence, Expert Witness, Failure of Gaussian Hypothesis, Federal Constitutions, Fibonacci Numbers, First Information Report (FIR), Fluid Dynamics, Forensics Standards, FOREX THEORY, Fractal Market Analysis, Fractal Market Hypothesis, Fractal Time Series, Freedom and Privacy, Freedom of Thought, Fundamental Human Rights, Fuzzy Sets, Game Theory, Gaussian and Non-Gaussian, Gazetted Expert Witness, Geological Forensics Science, Human Rights, Marriage & Privacy, Illegally Obtained Evidence, Information, Intellectual Properties & Copyrights, Invasion of Privacy, Jurisdictions of Syariah Courts, Knowledge, Laminar Flow, Law of Tort, Limitation of Immunity of Judge in Lower Court, Limitations to The Immunity Rule, Lyapunov Exponent, Malicious Prosecution, Manner in which lack of competency may rise, Marriage Rights, Mathematical Chess Strategies, Mathematical Theory of Nothing, MD5, Measures of Central Tendency, Measures of Determinism, Measures of Dispersion, Measures of Fuzziness, Measures of Nothingness, Measures of Stochasticity, Meteorological Sciences and Analyses, My Young Padawans on The Moves, Natural Justice, Networking and Internet, Neural Fuzzy, Noisy Chaos vs R/S Analysis, Null Set Theory, Number Theory, One-Way Hash Functions, Padawan, Penal Codes, Perturbation Theory, Power and Privacy, Private Property, Private Spaces, Prosecution, Qualitative Analysis, Quantitative Analysis, Reed-Solomon Codes, Retrospective of Privacy, S 120 Parties to Civil Suits and Wives and Husbands, S1 Evidence Act 1950, S10 Evidence Act 1950, S11 Evidence Act 1950, S12 Evidence Act 1950, S122 Evidence Act (Communication During Marriage), S13 Evidence Act 1950, S14 Evidence Act 1950, S15 Evidence Act 1950, S16 Evidence Act 1950, S17 Evidence Act 1950, S2 Evidence Act 1950, S3 Evidence Act 1950, S4 Evidence Act 1950, S44 Fraud or Collusion in Obtaining Judgement or Incompetency of Court May Be Rise, S45 Evidence Act 1950, S5 Evidence Act 1950, S56 Fact Judicially Noticeable Need To Be Proved, S57 Facts of Which Court Must Take Judicial Notice, S6 Evidence Act 1950, S65 Evidence Act 1950, S65(1)(c) Evidence Act 1950, S7 Evidence Act 1950, S8 Evidence Act 1950, S9 Evidence Act 1950, S93 Exclusion of Evidence To Explain or Amend Ambigious Document, Scientific Evidence and Law, Secret of The Bodies, Secure Communications, Self-Perturbation, Self-Perturbed Prime Numbers, SHA-1, Solar and Lunar Calculations, Territories of Selfness, The Algorithms, The Daubert Test, The Dyas Test, The Frye Test, The Hurst Processes, The Jacobetz Refinement, The Kelly-Frye Test, The Kumho Gloss, The Non-linear Algorithms, The Post-Daubert Decisions, The Source Codes, The Spiral of Archimedes, The Spiral of Fibonacci, The Theory of Pure Democracy, The Williams Departure, Trial Within Trial, True Definition of Natural Justice, Turbulence, Vicarious Liability, Websites, Without Search Warrant
  1. yIAptWnJFE6z
    June 22, 2013 at 8:45 am

    136560 12367Hi there! I could have sworn Ive been to this internet site before but soon after reading by way of some with the post I realized it is new to me. Anyhow, Im surely glad I identified it and Ill be book-marking and checking back often! 685202

  1. June 22, 2013 at 6:09 am
    URL
  2. March 27, 2014 at 6:20 am
    kansas city ford car dealer
  3. March 28, 2014 at 4:59 am
    kansas city ford used car dealers
  4. March 28, 2014 at 9:15 am
    auto finance
  5. March 30, 2014 at 7:49 pm
    academic preparation
  6. May 7, 2014 at 12:47 am
    pet meds
  7. May 7, 2014 at 2:01 am
    alcoholism causes
  8. May 7, 2014 at 3:21 am
    round table companies
  9. May 7, 2014 at 4:48 am
    round table companies
  10. May 7, 2014 at 4:52 am
    http://charlotte.forddeal.net/
  11. May 7, 2014 at 6:15 am
    search engine optimisation companies in perth
  12. May 7, 2014 at 8:32 am
    perthseod.com/
  13. May 7, 2014 at 8:53 am
    serviciosdeseo.net
  14. May 7, 2014 at 12:26 pm
    certified
  15. May 7, 2014 at 12:53 pm
    creator a forever recovery
  16. May 7, 2014 at 2:01 pm
    alcoholism causes
  17. May 7, 2014 at 2:06 pm
    aforeverrecovery.com
  18. May 7, 2014 at 2:13 pm
    theclevergroup.com/
  19. May 7, 2014 at 4:13 pm
    forever recovery drug addict
  20. May 7, 2014 at 5:55 pm
    keyword relevancy
  21. May 8, 2014 at 3:15 am
    inflamed joints
  22. May 8, 2014 at 8:38 am
    posicionamiento en google
  23. May 8, 2014 at 9:28 am
    life insurance policies
  24. May 8, 2014 at 10:18 am
    2014 ford focus
  25. May 8, 2014 at 11:48 am
    http://www.care2.com/c2c/people/profile.html?pid=242183714
  26. May 8, 2014 at 11:51 am
    no exam life insurance
  27. May 8, 2014 at 12:31 pm
    dog arthritis treatments
  28. May 8, 2014 at 3:53 pm
    seo professional perth
  29. May 8, 2014 at 7:38 pm
    forever recovery
  30. May 8, 2014 at 7:40 pm
    Rosland Capital gold ira specialist
  31. May 8, 2014 at 8:39 pm
    2014 ford fiesta
  32. May 8, 2014 at 11:03 pm
    visit rigoberto's homepage
  33. May 9, 2014 at 1:48 am
    life insurance suicide
  34. May 9, 2014 at 3:38 am
    web site promotion services to market websites
  35. May 9, 2014 at 3:39 am
    http://disqus.com/learcapitalrating/
  36. May 9, 2014 at 6:09 pm
    posicionamiento orgánico
  37. May 9, 2014 at 6:25 pm
    posicionamiento organico
  38. May 9, 2014 at 8:30 pm
    glucosamine
  39. May 9, 2014 at 9:37 pm
    http://hummingbirdseoservices.com
  40. May 9, 2014 at 10:19 pm
    seo web site
  41. May 9, 2014 at 11:47 pm
    video seo
  42. May 10, 2014 at 3:03 am
    seo rocks
  43. May 10, 2014 at 2:09 pm
    no medical life insurance
  44. May 10, 2014 at 7:28 pm
    locate ford dealer
  45. May 10, 2014 at 9:02 pm
    arthritis dogs
  46. May 10, 2014 at 10:22 pm
    http://www.perthseod.com/
  47. May 11, 2014 at 12:49 am
    seo companies
  48. May 11, 2014 at 9:19 am
    agencia de marketing
  49. May 11, 2014 at 5:14 pm
    outsource seo services
  50. May 11, 2014 at 8:45 pm
    perth search engine optimisation professional
  51. May 12, 2014 at 1:42 am
    life insurance company
  52. May 12, 2014 at 5:10 am
    life insurance rates
  53. May 13, 2014 at 6:00 am
    seo services usa
  54. May 13, 2014 at 6:14 am
    posicionamiento web
  55. May 13, 2014 at 7:27 am
    search engine optimisation services
  56. May 13, 2014 at 9:25 am
    professional seo
  57. May 13, 2014 at 12:49 pm
    sem services
  58. May 13, 2014 at 9:54 pm
    search ranking agency
  59. May 14, 2014 at 12:44 pm
    combined life insurance
  60. May 14, 2014 at 1:27 pm
    posicionamiento seo
  61. May 15, 2014 at 6:28 am
    www.youtube.com
  62. May 15, 2014 at 8:03 am
    life insurance for senior citizens
  63. May 15, 2014 at 9:34 am
    seo packages
  64. May 15, 2014 at 10:49 am
    Quirk Volkswagen NH
  65. May 15, 2014 at 3:01 pm
    local seo expert
  66. May 15, 2014 at 4:08 pm
    serviciosdeseo.net/
  67. May 15, 2014 at 7:30 pm
    Quirk Manchester VW
  68. May 16, 2014 at 2:00 am
    www.youtube.com/
  69. May 16, 2014 at 7:43 am
    Jim Glover Chevrolet
  70. May 16, 2014 at 8:19 am
    Cerame Kia
  71. May 16, 2014 at 9:28 am
    Cerame Kia
  72. May 16, 2014 at 6:21 pm
    http://www.youtube.com/
  73. May 17, 2014 at 1:40 am
    http://www.youtube.com/watch?v=-_B2kSrrY0E
  74. May 20, 2014 at 10:33 pm
    employment policies
  75. July 7, 2014 at 12:17 pm
    St Louis Kia
  76. July 7, 2014 at 9:20 pm
    http://www.idesignac.com/
  77. July 10, 2014 at 11:57 pm
    new & Used Kia
  78. July 12, 2014 at 2:44 am
    http://www.idesignac.com
  79. July 14, 2014 at 9:06 am
    air conditioning tucson
  80. July 15, 2014 at 2:15 am
    Home Inspection
  81. November 22, 2014 at 6:24 am
    builers Stalbridge
  82. November 23, 2014 at 7:16 pm
    http://bit.ly/
  83. December 2, 2014 at 1:02 pm
    gay chat
  84. December 4, 2014 at 6:36 am
    music search
  85. December 11, 2014 at 3:48 am
    Tukang Listrik bandung
  86. December 11, 2014 at 10:06 pm
    get redirected here
  87. March 31, 2015 at 12:44 am
    builers Hatfield Peverel
  88. July 14, 2015 at 10:35 am
    Little Waltham builers
  89. October 10, 2015 at 7:56 pm
    CR4 edwardian conservatories

Leave a comment