Archive

Archive for July, 2011

CodeGenius v3.0 “Monte Carlo Forex”: The Most Sophisticated Robot I Ever Designed is to be released soon…

Complete with Semi-Martingale and Martingale that based on Higher Dimensions of Topological Spaces and Methodology that implements Chaos Theory, Turbulence and Markov Chain on Monte Carlo Algorithm in FOREX.

//+——————————————————————————–+
//|          Neural Kohonen-Hebbian Self-Learning Networks                        |
//|  Copyright © 2011, Mohamad Izaham Bin Mohamed Yatim              |
//|                                      http://www.omnifarm.biz                                            |
//|    COMPLETE VERSION 2.66 FINAL WITH CORRECT FUNCTIONS     |
//+——————————————————————————–+
#property copyright “Copyright © 2011, Mohamad Izaham Bin Mohamed Yatim”
#property link      “http://www.omnifarm.biz”
#include <stdlib.mqh>
#include <WinUser32.mqh>
// exported variables
extern double Amount32 = 0;
extern double BuyLots46 = 0.1;
extern double Amount51 = 0;
extern double SellLots40 = 0.1;

// 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 Count19 = 0;

int init()
{
NDigits = Digits;

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

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

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

OnEveryTick53();

}

//————————————————————–
// Put Your Mathematical Functions In Here!
//————————————————————–
//
//
//
//
//————————————————————–

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

PrintToLog25();
IfDemo26();
PrintInfoToChart19();
IfOrderExists34();
IfOrderDoesNotExist52();
IfOrderExists49();
IfTesting28();
IfOrderDoesNotExist42();

}

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

}

void IfDemo26()
{
if (IsDemo())
{
Terminate27();

}
}

void Terminate27()
{
Print(“EA Terminated.”);
Terminated = true;

}

void PrintInfoToChart19()
{
string temp = “Some Text\nExecuted : ” + Count19 + “\n”
+ “Spread: ” + DoubleToStr(MarketInfo(Symbol(), MODE_SPREAD)/PipValue, 2)+ “\n”
+ “————————————————\n”
+ “ACCOUNT INFORMATION:\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”
+ “————————————————\n”;
Comment(temp);
Count19++;

}

void IfOrderExists34()
{
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() == 1)
{
exists = true;
}
}
else
{
Print(“OrderSelect() error – “, ErrorDescription(GetLastError()));
}

if (exists)
{
TechnicalAnalysis3xOr33();
CloseOrderIf32();

}
}

void TechnicalAnalysis3xOr33()
{
if ((0 > 0) || (0 > 0) || (0 > 0))
{
BuyOrderModifyFlex31();

}
}

void BuyOrderModifyFlex31()
{
for (int i=OrdersTotal()-1; i >= 0; i–)
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
{
if (OrderType() == OP_BUY && OrderSymbol() == Symbol() && OrderMagicNumber() == 1)
{
double SL = NormalizeDouble(Low[1], NDigits);
double TP = NormalizeDouble(High[1], NDigits);
bool ret = OrderModify(OrderTicket(), OrderOpenPrice(), SL, TP, 0, White);
if (ret == false)
Print(“OrderModify() error – “, ErrorDescription(GetLastError()));
}
}
PrintToLog30();

}

void PrintToLog30()
{
Print(“Buy Order Modify Flexy”);

}

void CloseOrderIf32()
{
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() != 1)
{
continue;
}
if (OrderProfit() > Amount32)
{
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(), 4, Red);
if (ret == false)
Print(“OrderClose() error – “, ErrorDescription(GetLastError()));
}
}
PrintToLog29();

}

void PrintToLog29()
{
Print(“Buy Order Close If”);

}

void IfOrderDoesNotExist52()
{
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() == 1)
{
exists = true;
}
}
else
{
Print(“OrderSelect() error – “, ErrorDescription(GetLastError()));
}

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

}
}

void TechnicalAnalysis3xOr48()
{
if ((0 > 0) || (0 > 0) || (0 > 0))
{
BuyOrderFlex46();

}
}

void BuyOrderFlex46()
{
double SL = NormalizeDouble(Low[1], NDigits);
if (Low[1] == 0) SL = 0;
double TP = NormalizeDouble(High[1], NDigits);
if (High[1] == 0) TP = 0;
int ticket = -1;
if (true)
ticket = OrderSend(Symbol(), OP_BUY, BuyLots46, Ask, 4, 0, 0, “My Expert”, 1, 0, Blue);
else
ticket = OrderSend(Symbol(), OP_BUY, BuyLots46, Ask, 4, SL, TP, “My Expert”, 1, 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()));
}
PrintToLog47();

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

void PrintToLog47()
{
Print(“Buy Order Initiated”);

}

void IfOrderExists49()
{
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() == 1)
{
exists = true;
}
}
else
{
Print(“OrderSelect() error – “, ErrorDescription(GetLastError()));
}

if (exists)
{
TechnicalAnalysis3xOr50();
CloseOrderIf51();

}
}

void TechnicalAnalysis3xOr50()
{
if ((0 > 0) || (0 > 0) || (0 > 0))
{
SellOrderModifyFlex45();

}
}

void SellOrderModifyFlex45()
{
for (int i=OrdersTotal()-1; i >= 0; i–)
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
{
if (OrderType() == OP_SELL && OrderSymbol() == Symbol() && OrderMagicNumber() == 1)
{
double SL = NormalizeDouble(High[1], NDigits);
double TP = NormalizeDouble(Low[1], NDigits);
bool ret = OrderModify(OrderTicket(), OrderOpenPrice(), SL, TP, 0, White);
if (ret == false)
Print(“OrderModify() error – “, ErrorDescription(GetLastError()));
}
}
PrintToLog43();

}

void PrintToLog43()
{
Print(“Sell Order Modify Flexy”);

}

void CloseOrderIf51()
{
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() != 1)
{
continue;
}
if (OrderProfit() > Amount51)
{
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(), 4, Red);
if (ret == false)
Print(“OrderClose() error – “, ErrorDescription(GetLastError()));
}
}
PrintToLog44();

}

void PrintToLog44()
{
Print(“Sell Order Close If”);

}

void IfTesting28()
{
if (IsTesting())
{
Terminate27();

}
}

void IfOrderDoesNotExist42()
{
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() == 1)
{
exists = true;
}
}
else
{
Print(“OrderSelect() error – “, ErrorDescription(GetLastError()));
}

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

}
}

void TechnicalAnalysis3xOr41()
{
if ((0 > 0) || (0 > 0) || (0 > 0))
{
SellOrderFlex40();

}
}

void SellOrderFlex40()
{
double SL = NormalizeDouble(High[1], NDigits);
if (High[1] == 0) SL = 0;
double TP = NormalizeDouble(Low[1], NDigits);
if (Low[1] == 0) TP = 0;
int ticket = -1;
if (true)
ticket = OrderSend(Symbol(), OP_SELL, SellLots40, Bid, 4, 0, 0, “My Expert”, 1, 0, Red);
else
ticket = OrderSend(Symbol(), OP_SELL, SellLots40, Bid, 4, SL, TP, “My Expert”, 1, 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()));
}
PrintToLog39();

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

void PrintToLog39()
{
Print(“Sell Order Flexy Initiated “);

}

int deinit()
{

if (true) ObjectsDeleteAll();

}

Today is July 13, 2011: My Birthday – CodeGenius v2.66 is Completely Done and Error Free – It is Perfect and Into Its Perfection Today!

I was born on July 13, 1972 in George Town, Penang, Malaysia.

We Generate Money Out of Chaos and Turbulence: My Latest Version of Neural Fuzzy Network Algorithms – CodeGenius v2.66 Enhanced with SMART Algorithms

The True and Finest Definition of Financial Speculation/Speculative in Legal

“The Plaintiff’s losses of the shares value were on a speculative basis upon a financial action that does not promise safety of the initial investment along with the return of the principal sum. The speculation is, however, an incomplete information of the projectile path that conjectures on the fluctuation of booming and depression epochs. The phenomenon is, therefore, hypothetical, in which the observable processes are rather stochastic than deterministic.”

“SP1 in his evidence states that if the JV company was able to take off, the share value could go up to RM5.00 per share. Again, this Court is bound by the decision of the learned Judge that the alleged loss of share worth is merely speculative in nature. Further, the evidence given by SP1 is really speculative as SP1 was not a stock trading expert and the Plaintiff also did not call a stock analyst to corroborate on how the future share market fluctuates with respect to the price-earnings ratio (P/E) and supply/demand equilibrium to be valued for the JV company which operated for only 6 months. Therefore, the data accumulated to forecast stock value fluctuation and trajectory movement is incomplete and weak.”

AINY SUHAILAH BINTI YUNUS

Senior Assistant Registrar

The Commercial Division 3

May 25, 2010

Related Case:

https://anticyberforensics.wordpress.com/2010/11/29/true-definition-of-financial-speculation-speculative-in-legal/

Forex July122011 Latest Until 1236pm

Forex July122011 Latest Until 1236pm

Forex July122011 #2 Latest Until 1236pm

Forex July122011 #2 Latest Until 1236pm

I was maliciously and unlawfully imprisoned by the recalcitrant magistrate and prosecution team including the FIR (the legendary geisha cum deputy public prosecutor) but somehow I managed to gone through all this and designed new forex automated robot algorithm while in prison. I developed the most sophisticated forex robot algorithm while I was in Kajang Prison recently. Then so-called algorithm “Justice and Freedom” is now used in my latest forex robot CodeGenius V 2.60.