Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1127

 
jaffer wilson:
Please, someone will answer my request too: # 11237

See example

Terminal_folder\MQL5_Experts\Examples\Controls\Controls.mq5

Terminal_folder\MQL5\Experts\Examples\Controls\ControlsDialog.mqh

There is a drop down list there.

 
Nikolai_korzhok:

Hi all, Can you tell me please, I want to put a stop behind the low of a particular candle, but not more than a predetermined number of pips. how do I do that?

I do the following: I take 4 candlesticks from the low of the last closed candlestick. If it is less than 200 pips, then stop at the low of 15 pips, and if it is more, then just stop at 200 pips. I cannot use it on the chart, I don't know how to place stops, if they are lower than 200 pips. I'm learning the language only recently. I have changed the last candlestick's clause to Asc.

It all worked when I wrote it that way. Maybe it will help someone sometime.

sl = NormalizeDouble(Low[4] - 5*Point, 5);  //Расчет стопа для покупок
if(NormalizeDouble(Ask - sl,5)>=NormalizeDouble(StopLoss*Point,5))
  {
   sl=NormalizeDouble(Ask - StopLoss*Point, 5);
  }
 
Nikolai_korzhok:

It all worked out when I wrote it this way. May help someone sometime.

Instead of 5 write _Digits or Digits()

 
Alexey Viktorov :

See example

Terminal_folder\MQL5_Experts\Examples\Controls\Controls.mq5

Terminal_folder\MQL5\Experts\Examples\Controls\ControlsDialog.mqh

There is a drop down list.

But I'm not looking for a drop down list. What I'm asking: as a list --- I want to add a label and a field to edit. But I can only see the labels in the list. Even I want to edit and change the text in the input field.

The list view is in the panel. I don't see any controls for this requirement, and I couldn't figure out how I could achieve it.

I think I'm being clear.

 
Сергей Таболин:

Instead of 5, write _Digits or Digits()

Got it, thanks!
 
Print(MarketInfo(symbol,MODE_STOPLEVEL));// =0

MODE_STOPLEVEL

14

Minimum stop loss/stake profit level in pips.

Zero value of MODE_STOPLEVEL means either that there is no minimal distance limitation for Stop Loss/Stake Profit or that the trading server uses external dynamic level controls that cannot be translated into the terminal. In the second case, GetLastError() may return error 130, as the MODE_STOPLEVEL level is actually "floating".


how do I know my minimum stop loss/stake profit level in pips at the moment? my current level is ~15

 

During profiling, the program indicates a bug

Resistance[index][i] = iClose(symb,PERIOD_H1,i); period for an hour, even if I delete the line, it points to another one, what should I change here?

Resistance[index][i] = iClose(symb,PERIOD_H1,0);-is this correct?

 

Greetings. Can you give me a hint, please, because I can't find it.

If in Ordersend slippage = 0, is this slippage not specified, i.e. any slippage, or is this slippage == 0, i.e. no slippage allowed?

 
if(((iClose(symb,PERIOD_H1,i) > iOpen(symb,PERIOD_H1,i) && iClose(symb,PERIOD_H1,i) < (iHigh(symb,PERIOD_H1,i)+iLow(symb,PERIOD_H1,i))/2) || (iClose(symb,PERIOD_H1,i) < (iHigh(symb,PERIOD_H1,i)+iLow(symb,PERIOD_H1,i))/2 && iClose(symb,PERIOD_H1,i) == iOpen(symb,PERIOD_H1,i)) && iVolume(symb,Period(),i)>iVolume(symb,Period(),i+1))
{
Resistance[index][i] = iClose(symb,PERIOD_H1,i);
for(int kt = BarsBack-1; kt>i; kt--)
{
if(Resistance[index][kt] <= iClose(symb,PERIOD_H1,i))
{
Resistance[index][kt] = 0
 
Please tell me how to properly install MT4 under Astralinux. Thank you!