Skip to main content

Evolve Expert Advisor Codes

NOTE! DO NOT USE THIS FOR REAL MONEY! THIS IS NOT TESTED! THIS SHOULD BE USE FOR DEMO PURPOSES!

I had being thinking about this idea for awhile now, what if i can take a bunch of EA and randomly add in codes/indicator and see which one do the best and using that EA as a base and create another generation of EAs?

My first EA is going to be a simple bot that will base on a random number 1 to 100 to buy or sell. As this is totally random, i dont see how it can randomly generate profit. But i had seem well made technical report totally ruin in the market. So being a totally random EA might have its random advantages.

Codes
static int LowRisk_ticket;
  if(OrderSelect(LowRisk_ticket, SELECT_BY_TICKET)==false){
   MathSrand(GetTickCount());
   double rand1 = 1*MathRand()/32768.0;
   MathSrand(GetTickCount());
   double rand2 = 1*MathRand()/32768.0;
   MathSrand(GetTickCount());
   double rand3 = 1*MathRand()/32768.0;
   if (rand1 ==0) rand1 = 1*MathRand()/32768.0;
   if (rand2 ==0) rand2 = 1*MathRand()/32768.0;
   if (rand3 ==0) rand3 = 1*MathRand()/32768.0;
   if (rand1 ==0) rand1 = 1*MathRand()/32768.0;
   if (rand2 ==0) rand2 = 1*MathRand()/32768.0;
   if (rand3 ==0) rand3 = 1*MathRand()/32768.0;
  if(profitOrLost>0)
   {
      if (tradeType==1)
      {
         LowRisk_ticket=OrderSend(Symbol(),OP_BUY,LowRisk_Lots,Ask,3,Bid-(rand1),Bid+(rand2),"buy Order",16384,0,Red);
      }
      if (tradeType==0)
      {
         LowRisk_ticket=OrderSend(Symbol(),OP_SELL,LowRisk_Lots,Bid,3,Ask+(rand2),Ask-(rand1),"buy Order",16384,0,Red);
      }
   }
   if(profitOrLost<=0)
   {
      if (rand3<0 .5="" p="">       LowRisk_ticket=OrderSend(Symbol(),OP_BUY,LowRisk_Lots,Ask,3,Bid-(rand1),Bid+(rand2),"buy Order",16384,0,Red);
       tradeType=1;
      }
      if (rand3>0.5){
       LowRisk_ticket=OrderSend(Symbol(),OP_SELL,LowRisk_Lots,Bid,3,Ask+(rand2),Ask-(rand1),"buy Order",16384,0,Red);
       tradeType=0;
      }
     }
  }
  if(OrderSelect(LowRisk_ticket, SELECT_BY_TICKET)==true){
   if (OrderCloseTime()!=0)
   {
   //Order is closed
      profitOrLost=OrderProfit();
      LowRisk_ticket=0;
   }
  }


Question: What is an Expert Adviser?
Answer:
An Expert Adviserpiece of software written specifically for the MetaTrader Platform. An Expert Adviser an just advise traders which trades to make or can be programmed to automatically execute the trades on a live account.
Expert Adviser re very flexible pieces of software that can take any information into account that is available on the metatrader platform. They are written in their own proprietary programming language called Adviser Language Version 4.

Comments

  1. This comment has been removed by a blog administrator.

    ReplyDelete

Post a Comment

Popular posts from this blog

Today's Forex Focus, 30 Jan 2024

 Ah, nephew, let's dive into the Forex market today, shall we? It's like peering into a crystal ball, but with a bit more logic and a lot less mysticism. First up, we've got the EUR/USD pair showing a bit of a bearish tilt. The dollar's holding steady like a rock in a stream, buoyed by investors who've got their eyes glued to the upcoming Federal Reserve policy meeting. There's a bit of a buzz about geopolitical tensions in the Middle East, making investors a bit jittery and giving the dollar a bit of a boost​​. Then, there's talk about the Federal Reserve potentially pushing back against the idea of a rate cut anytime soon. This is like a plot twist in a thriller movie for the traders, who are now less convinced about a rate drop in March. The dollar, meanwhile, is flexing its muscles a bit, up by 0.19% against a basket of currencies. Across the pond, the Euro's taken a bit of a tumble, and there's chatter about when the European Central Bank might ...

Free server for Terraria: Singapore Base

Update: Click here for the latest update IP: 175.156.159.250 port: 7777 password: server672011 email: ohguowei@gmail.com updated: hai, i give up on port forwarding. sorry guys, i will be using hamachi for terraria. this game is just too unstable for multi player hamachi ip: 5.100.228.220 hamachi network: sgterraria hamachi password: sgterraria terraria password: server672011 opening time 12pm to 12am. email me if you need help, but dont expect me to do much since this is a free server.

Here are a few tips and tricks for your kindle paper white!

Here are a few tips and tricks for your kindle paper white! 1. Save the battery. Normally a kindle battery can last quite long before you will need to recharge it but if you want more time you can turn off your wirless connection by switching it to Airplane mode when you don’t need it. Just go to Settings and turn on Airplane Mode. 2. Remove recommended content. Remove it from your home screen by going to Menu > Settings > Device Options > Personalize Your Kindle > Recommended Content. 3. Take screenshots. Either top left / bottom right or top right / bottom left combinations will work for taking screenshots. Connect your Kindle to a computer using a USB cable to download the screenshots. 4. Keep it private. Set a passcode by navigating to Settings > Device Options > Device Passcode: Enter Passcode. Then confirm the passcode and select OK. 5. Choose your own font size. To make the font smaller and fit more words on a single page, “p...