[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 570

 
Good luck and fat profits to all! Help if you can and guide me in the right direction. I am a newbie and am quite slow in programming, I have only been trading forex for half a year. Please tell me if it is possible to open an order with ready-made parameters "Stop" and "Profit", regardless of the volume of the lot. For instance, I would like to try an order with +5 pips profit and 30 pips stop. If it is possible, please advise how to do it, where to look for a script, how to write it and which buttons to push. I understand that a lot of questions, but, as a beginner, I want it all at once. I would be sincerely grateful to everyone who responds.
 
mazan >>:
Всем удачи и жирного профита! Помогите, если можно и направьте на путь истинный. Я новичок, и совсем тормоз в програмировании, на форексе всего полгода. Подскажите кто может, можно ли написать скрипт на открытие ордера с готовыми параметрами "Стоп" и "Профит", не зависимо от объема лота. Например, хочу попробовать на пипсовке ордер с параметрами профита +5пунктов, и стопа-30пунктов. Возможно ли такое, чтобы при открытии ордера в нем уже были эти параметры, и если такое возможно, подскажите как это осуществить, где поискать сркипт, и как его написать, и на какие кнопки нажимать. Понимаю, что много вопросов, но, новичок, хочется всего и сразу. Буду искренне благодарен всем, кто откликнется.

This is not the way to solve the problem, no one will allow you to put a takeprofit +5pp, but you can move it after the market has moved back.

You can arrange a loop in the script and track as soon as the profit is +5pp it will close the order, those solution without setting a takeprofit at all.

I advise you to read what [ STOPLEVEL, #property show_inputs (if you want to do it with a script), and understand what a looped script is].

highlighted to search in navigator, about the script search on forum.

The script loops like this:

int start(){
 while(!IsStopped()){
  RefreshRates();
  // необходимые вычисления
  if(условие_выхода_из_цикла)break;
  Sleep(1000);// пауза на 1сек.
 }
return(0);
}
 

Can you tell me why, in tasks, two applications of the same terminal are popping up. This makes the computer slow down.

 
apparently because there are two terminals running... and one has frozen (judging by your bewilderment, at the exit stage) and is slowing down the system with some calculations.
 
alsu писал(а) >>
apparently because there are two terminals running... and one is hovering (judging by your bewilderment, at the exit stage) and slowing down the system with some calculations.

it's just that when you turn it on... in this case World forex, I look at it hovering, I open the tasks and there's its double. What's the reason?
 
I've got different icons, it looks like some indicator from a template which creates another window. this window is what's slowing me down:) In general, I advise you to use something cooler than Windows Task Manager - Process Explorer or AnVir Task Manager, you can see which process creates which window, and a lot of other useful features...
 
alsu писал(а) >>
icons are different, it looks like some indicator from the template loads, which creates another window. it's this window that slows down:) In general, I advise to use something cooler than Windows Task Manager - Process Explorer or AnVir Task Manager, you can see what process creates what window and a lot of other useful features...

Got it, thanks.
 

People!!! Oh, my God!!! I've been up all night with a lot of confusion... Tell me where the mistake is in the function... I made it exactly the same as all the other functions. The rest of them work without any problems, but this one throws errors when compiling... It says the variables aren't set... ...and it's not available... I'm boiling, help me before I burst... :)

int Trend_MACD(string sy,int tf)
{

   int 
   smaper=55, 
   fmaper=34, 
   fema=23, 
   sema=77, 
   sig=9, 
   subMA=30;
   
   double
   TrendMACDmain,
   TrendMACDsig,
   TrendSMA,
   TrendFMA,
   Trend_UP_Limit=0.001;
   
   if (sy=="" || sy=="0") sy=Symbol();
   if (tf==5)
      {
         fema=23;
         sema=77;
         sig =9;
         smaper=55;
         fmaper=34;
         subMA=30;
         Trend_UP_Limit=0.001;
      }
// На отсутствие дальнейших проверок на другие ТФ не обращайте внимание... Пока нужно только М5, а все параметры выше заданы явно...
      
   TrendMACDmain=iMACD(sy,tf,fema,sema,sig,PRICE_CLOSE,MODE_MAIN,1);
   TrendMACDsig =iMACD(sy,tf,fema,sema,sig,PRICE_CLOSE,MODE_SIGNAL,1;
   TrendSMA     =iMA(sy,tf,smaper,0,MODE_SMA,PRICE_CLOSE,1);
   TrendFMA     =iMA(sy,tf,fmaper,0,MODE_SMA,PRICE_CLOSE,1);
//----------------------------------------------   
   if (
         TrendMACDsig<TrendMACDmain &&          // Если MACD главная выше сигнальной и
         TrendMACDmain>Trend_UP_Limit &&        // Главная MACD выше верхнего лимита и
         TrendFMA>TrendSMA &&                   // Быстрая МАшка выше медленной и
         (TrendFMA-TrendSMA)>=subMA*Point       // разница между ними больше subMA пунктов,
      }
         return(1);                             // значит тренд вверх.
   if (
         TrendMACDsig>TrendMACDmain &&          // Если MACD главная ниже сигнальной и
         TrendMACDmain<-Trend_UP_Limit &&       // Главная MACD ниже верхнего лимита и
         TrendFMA<TrendSMA &&                   // Быстрая МАшка ниже медленной и
         (TrendSMA-TrendFMA)>=30*Point          // разница между ними больше subMA пунктов,
      }
         return(-1);                            // значит тренд вниз,
         else                                   // иначе
         return(0);                             // флэт
}         
   

 
artmedia70 писал(а) >>

People!!! Oh, my God!!! I've been up all night with a lot of confusion... Tell me where the mistake is in the function... I made it exactly the same as all the other functions. The rest of them work without any problems, but this one throws errors when compiling... It says the variables aren't set... ...and it's not available... I'm boiling, help me before I burst... :)


  if (
         TrendMACDsig<TrendMACDmain &&          // Если MACD главная выше сигнальной и
         TrendMACDmain>Trend_UP_Limit &&        // Главная MACD выше верхнего лимита и
         TrendFMA>TrendSMA &&                   // Быстрая МАшка выше медленной и
         (TrendFMA-TrendSMA)>=subMA*Point       // разница между ними больше subMA пунктов,
      }
         return(1);                             // значит тренд вверх.
   if (
         TrendMACDsig>TrendMACDmain &&          // Если MACD главная ниже сигнальной и
         TrendMACDmain<-Trend_UP_Limit &&       // Главная MACD ниже верхнего лимита и
         TrendFMA<TrendSMA &&                   // Быстрая МАшка ниже медленной и
         (TrendSMA-TrendFMA)>=30*Point          // разница между ними больше subMA пунктов,
      }
Look at the brackets.
 
Sorry, how come there 's a round bracket first and then a square bracket inside if ?
Reason: