[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 517

 
demlin:
Man, judging from the discussion it's not an indicator at all. But the interesting thing is that it is on another site under a different name and with great advertising ))))
The advertisement is the engine of trade. The entire Internet is flooded with paid indicators and Expert Advisors, which are lying in our database.
 

Good afternoon, Dear Sirs!

I hope for your help, as I am a newbie.

I need to make two conditions in the EA's work:

1. The EA should only open one trade a day.

2. The deal should be opened only from the second time (i.e., when the conditions are formed for the second time. The first one is ignored)

Thank you in advance

void analyzeOpen()
{
   if(....) 
   {
         if(....)
         {

                int orderTicket=-1;
                while(orderTicket==-1)
                {

                while(IsTradeContextBusy()) Sleep(1000);
                double Stop=...
                double Take=...
         
                if(reg)
                {
                     orderTicket=OrderSend(Symbol(), OP_BUY, Lot, Ask, 3, NormalizeDouble(Stop, Digits), NormalizeDouble(Take, Digits), comment, Magic);
                }

                }
         }
         else
         {
            
         }
   }
   else
   {
     
   }
}
 
Zhunko:

It's the same thing:


In the sense that normalisation happens automatically when double is converted to int ? Thank you!

 
Pyro:


In the sense that normalisation happens automatically when double is converted to int ? Thank you!


Whole numbers don't need to be normalised.
 
rbh:

Good afternoon, Dear Sirs!

I hope for your help, as I am a newbie.

I need to make two conditions in the EA's work:

1. The EA should only open one trade a day.

2. The deal should be opened only from the second time (i.e., when the conditions are formed for the second time. The first one is ignored)

Thank you in advance

Read a textbook, learn the basics and start writing code yourself. If you don't succeed, post it here and someone will help you. Otherwise... just go to the job
 
artmedia70:
Read a textbook, learn the basics and start writing code yourself. If you don't get it right, post it here and someone will help. Otherwise... just go to the job

I`m slowly reading my tutorial and studying my skills :).

What I can not at the moment, that's posted). I'm not asking to write for me - expressed poorly - "must be done". I mean what I need to do, and you ask only to lead the way, but more specifically (for example, a link to a function in the same tutorial, which will help or an example of code. idea how to do it).

Sincerely.

 

Hello.

Could you please give me an example of code for an EA according to trading criteria?

After doubling the deposit - EA should close orders with the biggest minus ( loss-making trades ).

I would appreciate it.

 
alex12:

Hello.

Please give me an example of code for an EA according to trading criteria:

After doubling the deposit - EA should close orders with the biggest minus ( loss-making trades ).

Thank you.

In order to double the deposit we need to open positions as well, that's one. The second and important thing - you have to open them in such a way that they are profitable.

And you have to close positions that are in deficit. So you do not want to use stops? Third - where are the criteria for opening positions? Or is there a holy spirit here?

 
artmedia70:

In order to double the deposit, you need to open positions as well - that's one. Second, and no less important, you have to open them in such a way that they are profitable.

And you have to close positions that are in deficit. So you do not want to use stops? Thirdly, where are the criteria for opening positions? Or is there a holy spirit here?

The Expert Advisor is in the appendix:

Files:
grider_3.zip  6 kb
 
Why hasn't my indicator been published yet? )) (Good question for a Saturday) Poisoned it yesterday afternoon and it's still not freely available?