Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 941

 
evillive:


where risk - percentage of free funds involved

margin = MarketInfo(Symbol(),MODE_MARGINREQUIRED) - margin for one order

lotstep = MarketInfo(Symbol(),MODE_LOTSTEP) - lot size.

Thank you! I have seen the function, I understand the gist, I will manage it!
 

Good afternoon forum users. I still can't solve the problem. It seems to be simple, but how to implement it correctly I can't think of anything :-(. The problem is as follows.

We have an array with 10 elements. Each element of the array contains a price or level for the current day. I have to determine the closest support and resistance level of the array in relation to the klos. How to make it prettier???? Well and on the cheap (meaning resources of calculations)

Are there any ideas????

 
Thank you all for your help, kind of got through it :-)
 

Please help with the code. I want to set stop loss and take profit by Fibo levels. I am using this scheme, but it does not work. I cannot understand the reason. In my journal it says only removed and uninit reason 0

 
 double low,
        high,
        SL,
        TP;
  int start()                               
       {
  low = iLowest (NULL,0,MODE_LOW,20,0);
  high = iHighest(NULL,0,MODE_HIGH,20,0); 
  SL = NormalizeDouble(low, 5);
 TP = NormalizeDouble(low+((high - low)* 1.68), 5);          
    OrderSend(Symbol(), OP_BUY,0.1, Ask, 3, SL, TP);
   return;                                  
  }
//--------------------------------------------------------------------
 
nikelodeon:

Good afternoon forum users. I still can't solve the problem. It seems to be simple, but how to implement it correctly I can't think of anything :-(. The problem is as follows.

We have an array with 10 elements. Each element of the array contains a price or level for the current day. I have to determine the closest support and resistance level of the array in relation to the klos. How to make it prettier???? Well and on the cheap (meaning resources of calculations)

Are there any ideas????

You need to find between which levels a given price falls?
 

RickD:
Нужно найти,  между какими уровнями попадает заданная цена?

Yes. You need to know what levels the cloze is between at the moment. I.e. determine the current support and resistance levels.....


 
nikelodeon:
In the cycle, look for the minimum absolute difference between the level and the price. The level found is the one we are looking for
 
Vinin:
We search for the minimal absolute difference between the level and the price. The level we found is the price we are looking for.

Yes, I did so, but if the price is higher than the level and the level is higher than the variable caliper, then the caliper is equated with the level. Sootvetochno in the variable caliper written level, which is below the sloss but which is greater than the rest of the levels, which are below kloss. In general, I have already implemented it.

I have a little bit another question. My working TF is 5 minutes. How to know the open and the slose of the previous day?

 
nikelodeon:

Yes, I did so, but if the price is higher than the level and the level is higher than the variable caliper, then the caliper is equated with the level. Sootvetochno in the variable caliper written level, which is below the sloss but which is greater than the rest of the levels, which are below kloss. In general, I have already implemented it.

I have a little bit another question. My working TF is 5 minutes. How to know the open and the slose of previous day?

iOpen(NULL, PERIOD_D1,1);

iClose(NULL, PERIOD_D1,1);

 
nikelodeon:

Yes, I did so, but if the price is higher than the level and the level is higher than the variable caliper, then the caliper is equated with the level. Sootvetochno in the variable support written level, which is below the sloss but which is greater than the rest of the levels, which are below kloss. In general, I have already implemented it.

I have a little bit another question. My working TF is 5 minutes. How to know open and klose of previous day?

Simple:

  open = iOpen(_Symbol,PERIOD_D1,1);
  close = iClose(_Symbol,PERIOD_D1,1);
Reason: