[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 1138

 
drknn:

What's the operating system, seven? If yes, no wonder you didn't run the meta-editor as administrator. If it's an xpi, then we'll ask more questions.
Thank you very much ! Yes, seven. Running as administrator solved the problem !
 
volshebnik:
Thank you very much! Yes, seven. Running as administrator solved the problem !


Disable the fuck out of this service - it will bore you

Disable UAC in Windows 7 at the command line

C:{Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f

To enable the UAC again, you can do the following:

C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f

There's another thing in seven - "God Mode"

1. right-click any empty space on your desktop. 2.
2. Go to the New menu and create a new folder.
3. Rename the folder as follows:GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}

voila!!!!!!

DO NOT use this feature on Windows 7 x64 (and also Windows Vista x64) - it causes the system to crash As reported by users, it also works on x64 systems, but use it at your own risk.

 
Moderators - would you clean up a bunch of pages of this thread - anyway the previous material is not really anyone read, but opens this branch of the browser with a lag. Probably due to the fact that the pages in the branch has a thousand.
 

I've got a question for the experts (help me understand this for a nerd):

I wrote a code - conditional sale. Here's the condition:

   int buy1 = 0;
   if (ima0<ima1)buy1 = 2;

Here is a sale:

{
 
   double P1_buy;
   int rebuy;
   if (buy1>1)
     {      
      P1_buy = MarketInfo(Symbol(), MODE_ASK);
      rebuy = OrderSend(Symbol(),OP_BUY,Lots,P1_buy,4,0,0,"",MAGICMA,0,Blue);
      if (rebuy > 0)                        // Получилось :)
         {
           Alert ("Открыт ордер buy ",rebuy);
         }
     }
   return (0);
     
}
   

It ends up selling indefinitely 9 as long as there's free money)

Thought it was here, but no - there 100% either 0 or 2

ima0<ima1
 
luekalek:

I've got a question for the experts (help me understand this for a nerd):

I wrote a code - conditional sale. Here's the condition:

Here's the sale:

It ends up selling indefinitely 9 as long as there's free money)

Thought it was here, but no - there 100% either 0 or 2

Selling or buying?
 
paukas:
Sells or buys?

EA should sell or buy depending on the value of sell1

   double sell1 = 0.0;
   if (ima10<ima11)sell1 = 2.0;

and buy1

   double buy1 = 0.0;
   if (ima0<ima1)buy1 = 2.0;

after these calculations I have prescribed

//=++==============================================================++=
// продаем на вершине мин. лотом;

   double P1_sell=0.0;
   double resell=0.0;   

   double total = 0.0;
   if(OrdersTotal()>0.0)  total=2.0;

   if (total>1) sell1=0;
   if (sell1>1)
     {
      P1_sell = MarketInfo(Symbol(), MODE_BID);
      resell=OrderSend(Symbol(),OP_SELL,Lots,P1_sell,3,0,0,"",OrderTicket(),0,Red);
      if (resell > 0)                        // Получилось :)
         {
           Alert ("Открыт ордер sell ",resell);       
         }
     }  
  
//=++==============================================================++=
// закрываем ордер sell если buy>1;

   double tok=0.0;
   double P1_sell2=0.0;
   if (buy1>1.0)
     {
     P1_sell2 = MarketInfo(Symbol(), MODE_ASK);
     tok = OrderClose(OrderTicket(),OrderLots(),P1_sell2,3,Red);
     }
    
//=++==============================================================++=
// покупаем на дне мин. лотом;
 
   double P1_buy=0.0;
   double rebuy=0.0;
   
   double total2 = 0.0;
   if(OrdersTotal()>0.0)  total2=2.0;

   if (total2>1.0) buy1=0.0;
   
   if (buy1>1.0)
     {      
      P1_buy = MarketInfo(Symbol(), MODE_ASK);
      rebuy = OrderSend(Symbol(),OP_BUY,Lots,P1_buy,3,0,0,"",OrderTicket(),0,Blue);
      if (rebuy > 0.0)                        // Получилось :)
         {
           Alert ("Открыт ордер buy ",rebuy);
         }
     }
   
//=++==============================================================++=
// закрываем ордер buy если sell>1;

   double tak=0.0;
   double P1_buy2=0.0;
   if (sell1>1.0)
     { 
      P1_buy2 = MarketInfo(Symbol(), MODE_BID);
      tak = OrderClose(OrderTicket(),OrderLots(),P1_buy2,3,Blue);
     }

//--------------------------------------------------------------------
   return(0);                            // Выход из start()
}
//-------------------------------------------------------------------
And he now instead of 74 open sell orders, 1 buy order (when testing 1 week in the tester)
 

Thank you all. The issue has been resolved. The newbie figured it out on his own.

it was the wrong approach, you just have to use void

void CheckForOpen()  
{
----
}
void CheckForClose()
{
----
}
void start()
  {
   CheckForOpen();
   CheckForClose();
  }

and everything works - woohoo.

 
drknn:


Disable the fucking service - you'll be sick of it.

Disable UAC in Windows 7 via command line

C:{Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f

To enable the UAC again, you can do the following:

C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f

There's another thing in seven - "God Mode".

1. right-click any empty space on your desktop. 2.
2. Go to the New menu and create a new folder.
3. Rename the folder as follows:GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}

voila!!!!!!

DO NOT use this feature on Windows 7 x64 (and also Windows Vista x64) - it causes the system to crash As reported by users, it also works on x64 systems, but use this at your own risk.

Thank you very much ! Fixed 1 to 0 and now, before launching some programs, no longer asks for permission to open them, and additional MT4's don't glitch. Didn't experiment with "god mode" though - Windows 7 x64.
 
drknn:

not a bit wrong I am interested in "cyclicity", roughly speaking if I need to make a trade every 1.5 hours, or for example 2, or an hour, do not write if(Hour()==? ||Hour()==?||Hour()==?......) etc., sleep also not
Opening of trades at the appearance of a new bar is also not suitable because it is impossible to set the period of 1.5 hours or 2 hours.
 

Good morning !

Can anyone help me ? I am browsing "Code Base", I optimize what they offer and test - the result is bad - optimizations for one year, half a year, two months, a month, a week give profit, but as soon as you start testing - you get loss or very large drawdown and reduction of the deposit. I have also developed and tested indicators, but the result is the same. I have an optimised Expert Advisor in Articles and I have tried it and got the same result. I have posted reviews on sites where I downloaded Expert Advisors and indicators - no answers. If i've got one, that would give me stable earnings without large drawdown or where i can check it ? I understand that the question is trivial, maybe "a voice crying in the wilderness", but, nevertheless, suddenly ? Here's my email address if you need it - kalliopik@rambler.ru