I need someone who can help me get my EA to work. - page 2

 
Lorentzos Roussos #:
I wonder what chatGPT will say if asked "How to be a top seller on mql5.com?"  😊  
Your question has been answered:
To be a top seller on mql.com, you should focus on providing high-quality products or services and excellent customer service. Additionally, you should actively promote your products and engage with your customers to build a positive reputation. You may also want to offer competitive prices and stay up to date with any changes or trends in your industry.

😁
 

And I have tried also. I guess if you give clear instructions, and strategy not so complicated, can make a code.

Here is my request:

I need an expert advisor in mql4 and strategy will be MovingAverage Cross over

. If MA10 cross up MA 20, open Buy Order and if MA 10 cross below MA20, open Sell Order.

Orders should be closed on reversed signal, and add condition that only one order will be open on the same time


And this is the code:

#property copyright "Copyright 2021"
#property link      "https://yourwebsite.com"
#property version   "1.00"

// input parameters
extern int ma1 = 10; // MA1 period
extern int ma2 = 20; // MA2 period
extern double lots = 0.1; // trade volume

// global variables
double ma1_value, ma2_value;
int buy_ticket, sell_ticket;

void OnTick()
{
   // get moving averages values
   ma1_value = iMA(NULL, 0, ma1, 0, MODE_SMA, PRICE_CLOSE, 0);
   ma2_value = iMA(NULL, 0, ma2, 0, MODE_SMA, PRICE_CLOSE, 0);

   // check for crossover
   if(ma1_value > ma2_value)
   {
      // check if there is a sell order open
      if(sell_ticket > 0)
      {
         // close the sell order
         CloseOrder(sell_ticket);
         sell_ticket = 0;
      }
      
      // check if there is a buy order open
      if(buy_ticket == 0)
      {
         // open a buy order
         buy_ticket = OrderSend(NULL, OP_BUY, lots, Ask, 3, 0, 0, "buy", 0, 0, Green);
      }
   }
   else if(ma1_value < ma2_value)
   {
      // check if there is a buy order open
      if(buy_ticket > 0)
      {
         // close the buy order
         CloseOrder(buy_ticket);
         buy_ticket = 0;
      }

      // check if there is a sell order open
      if(sell_ticket == 0)
      {
         // open a sell order
         sell_ticket = OrderSend(NULL, OP_SELL, lots, Bid, 3, 0, 0, "sell", 0, 0, Red);
      }
   }
}
void CloseOrder(int ticket)
{
   if(!OrderClose(ticket, OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 3, Red))
   {
      Print("Error closing order: ", GetLastError());
   }
}
 
 buy_ticket = OrderSend(NULL, OP_BUY, lots, Ask, 3, 0, 0, "buy", 0, 0, Green);

Be careful with NULL.

  1. On MT4, you can use NULL in place of _Symbol only in those calls that the documentation specially says you can. iHigh does, iCustom does, MarketInfo does not, OrderSend does not.
  2. Don't use NULL (except for pointers where you explicitly check for it.) Use _Symbol and _Period, that is minimalist as possible and more efficient.
  3. Zero is the same as PERIOD_CURRENT which means _Period. Don't hard code numbers.
  4. MT4: No need for a function call with iHigh(NULL,0,s) just use the predefined arrays, i.e. High[].
  5. Cloud Protector Bug? - MQL4 programming forum (2020)
 
William Roeder #:

Be careful with NULL.

  1. On MT4, you can use NULL in place of _Symbol only in those calls that the documentation specially says you can. iHigh does, iCustom does, MarketInfo does not, OrderSend does not.
  2. Don't use NULL (except for pointers where you explicitly check for it.) Use _Symbol and _Period, that is minimalist as possible and more efficient.
  3. Zero is the same as PERIOD_CURRENT which means _Period. Don't hard code numbers.
  4. MT4: No need for a function call with iHigh(NULL,0,s) just use the predefined arrays, i.e. High[].
  5. Cloud Protector Bug? - MQL4 programming forum (2020)
Thanks! But this was just a demonstration of chatGBT ability to code a strategy. It is not mine 
 
Daniel Cioca # But this was just a demonstration of chatGBT ability to code a strategy. It is not mine 

That was just a demonstration that Chatgpt (the worst) can not code.

 
William Roeder #:

That was just a demonstration that Chatgpt (the worst) can not code.

I think is an unbelievable… it is a beginning … of course it cannot do complicated coding, but this is because maybe we cannot explain good enough for it to understand. As you can see, the code is matching with the request… it took like a second to come with that code 
 
Daniel Cioca #: I think is an unbelievable… it is a beginning … of course it cannot do complicated coding, but this is because maybe we cannot explain good enough for it to understand. As you can see, the code is matching with the request… it took like a second to come with that code 

An A.I. cannot be compared to a human brain. At the current level of technology, in order to fully simulate a human brain, one would need to build a computer the size of a city, and it would need to be powered by a nuclear reactor.

Yet, our brain fits inside our heads, and only needs about 20 Watts of power. So, there is no way, ChatGPT or any other current A.I. is going to be able to produce code as good as a decent human coder.

 
Fernando Carreiro #:

An A.I. cannot be compared to a human brain. At the current level of technology, in order to fully simulate a human brain, one would need to build a computer the size of a city, and it would need to be powered by a nuclear reactor.

Yet, our brain fits inside our heads, and only needs about 20 Watts of power. So, there is no way, ChatGPT or any other current A.I. is going to be able to produce code as good as a decent human coder.

I said it is a BEGINNING … and it is unbelievable where technology is compared to where it was 20 years ago… and this computer the size of a city… maybe in 10 years it will be the size of a cellphone… BEGINNING is the key word … 
 
Daniel Cioca #:
Your question has been answered:
To be a top seller on mql.com, you should focus on providing high-quality products or services and excellent customer service. Additionally, you should actively promote your products and engage with your customers to build a positive reputation. You may also want to offer competitive prices and stay up to date with any changes or trends in your industry.

😁

wow , thanks  😊 . The AI has spoken , i'll do that . I'll be bach.

We can do an experiment here .

Metaquotes has very good SEO on this forum .

If we create a topic "How to be a top seller on mql5.com" , will it find it and deliver the answers inside ? 

And per the evaluation , we will need dummy answers too , so the mods will have to co-operate . 

Daniel Cioca #:

And I have tried also. I guess if you give clear instructions, and strategy not so complicated, can make a code.

Here is my request:

I need an expert advisor in mql4 and strategy will be MovingAverage Cross over

. If MA10 cross up MA 20, open Buy Order and if MA 10 cross below MA20, open Sell Order.

Orders should be closed on reversed signal, and add condition that only one order will be open on the same time


And this is the code:

I like how it added yourwebsite.com , xD , it's ready to be shipped . 

 
Fernando Carreiro #:

An A.I. cannot be compared to a human brain. At the current level of technology, in order to fully simulate a human brain, one would need to build a computer the size of a city, and it would need to be powered by a nuclear reactor.

Yet, our brain fits inside our heads, and only needs about 20 Watts of power. So, there is no way, ChatGPT or any other current A.I. is going to be able to produce code as good as a decent human coder.

I disagree . 

A child starts becoming conscious of the world around it because it learns how to describe it .

ChatGPT at this point , is the child stage of the "AI" . 

We do not know what the "rules" for consciousness are in this universe , meant from the standpoint of "knowing you are here" .

Although i doubt it is one unit that is doing the calculations , this must be several accessing the same "knowledge" base .

The question is :

Can consciousness arise inside a silicon chip ? (based on the rules of this universe we do not know)

If that consciousness is not continuous (i.e. power outage and restart) does it mean a new consciousness emerges upon restart with the same knowledge ?