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

 
borilunad:

Thanks! I'm the one who's been fighting to keep this DailyPivotPoints from making holes at 0 o'clock without compiling! Only three buffer lines, no arrows. So why shove all the functions, necessary and unnecessary, everywhere!

And who shoves, the programmer shoves ))))


I don't seem to need this function on lines, only on semaphore or histograms I see the point in using it.

 
evillive:

Who's shoving it, the programmer )))

Finally agreed it wasn't needed there! I always comment out what's unnecessary to make it work faster!
 
borilunad:

Finally agreed it wasn't needed there! I always comment out what's unnecessary to make it work faster!

You can't tell if you need it or not without code, everyone decides for themselves what they need and what they don't need. Is it a few microseconds faster - is it much noticeable?
 
evillive:

If youwant or don't want, you can't tell without code, everyone decides for himself what he needs and what he doesn't need. is it a few microseconds faster - does it make much difference?
All of them have DailyPivotPoints! For example, MACD doesn't have this function, while the histograms do! The author is the same! Such a contradiction! Total disorientation! How can I make sense out of it! If the authorities make inaccuracies, then from whom can the inexperienced learn?! There has to be logic andconsistency in everything!
 
Good afternoon. Wanted to test the indicator with the EA on the history, but ran into a misunderstanding. The indicator draws shapes (some of them are https://docs.mql4.com/ru/constants/objectconstants/wingdings). How do I know if any of these shapes (e.g. 110) is on the previous (or on another) candle. The Japan indicator is attached.
Files:
japan.ex4  13 kb
 
Roooto:
Good afternoon. Wanted to test the indicator with the EA on the history, but ran into a misunderstanding. The indicator draws shapes (some of them are https://docs.mql4.com/ru/constants/objectconstants/wingdings). How do I know if any of these shapes (e.g. 110) is on the previous (or on another) candle. The Japan indicator is attached.

Look for an object with a shape name (the name appears when you hover over it or in the object's properties), you can do it without a number.
 

Trying to make a custom function for the first time. It doesn't work.

These variables are in the global:

int sdelka_plus;
int sdelka_minus;

I calculatethem as follows:

if (sell > 0){if (signal_close > stop){ sdelka_minus=sdelka_minus+1;}
if (sell > 0){if (signal_close_profit > p){ sdelka_plus=sdelka_plus+1;}

Now the function:

int C = Gipo(sdelka_plus,sdelka_minus);//строка находится в старте

data should be passed to double OnTester() to get a value there

int Gipo(int plus, int minus)
{
int c = plus/minus;//то что нужно получить в функцию OnTester() 
return(c);
}

The calculations in the tester function are not as important as the number obtained after dividing plus trades by minus ones and optimizing by this parameter.

Gurus, show me an example how to do it.

 

Good day! Please help me to deal with pending orders. For example, I should place a pending order by the indicator. How can I write it?

Price = NormalizeDouble (iMA(Symbol(),TimeFrame_D1, EMA_Period_21,0,MODE_EMA,PRICE_MEDIAN,0)+1*Point,Digits);// how to correct this?

SL = NormalizeDouble (Ask- StopLoss*Point,Digits);

TP = NormalizeDouble (Level_plus_1500_D1,Digits); // this one for the profit - Level_plus_1500_D1 - EMA level?

OrderSend(Symbol(),OP_BUYLIMIT,Lots,Price,Slippage, SL,TP,NULL,Magic,0,clrLime);

 
Price =  NormalizeDouble (iMA(Symbol(),TimeFrame_D1, EMA_Period_21,0,MODE_EMA,PRICE_MEDIAN,0)+1*Point,Digits);// как правильно прописать эту строчку?
SL = NormalizeDouble (Ask- StopLoss*Point,Digits);
TP = NormalizeDouble (Level_plus_1500_D1,Digits); // и эту для профита -  Level_plus_1500_D1 - уровень ЕМА ?                                                   
OrderSend(Symbol(),OP_BUYLIMIT,Lots,Price ,Slippage, SL,TP,NULL,Magic,0,clrLime);
 
jekk:

Good day! Please help me to deal with pending orders. For example, I should place a pending order by the indicator. How can I write it?

Price = NormalizeDouble (iMA(Symbol(),TimeFrame_D1, EMA_Period_21,0,MODE_EMA,PRICE_MEDIAN,0)+1*Point,Digits);// how to correct this?

SL = NormalizeDouble (Ask- StopLoss*Point,Digits);

TP = NormalizeDouble (Level_plus_1500_D1,Digits); // this one for the profit - Level_plus_1500_D1 - EMA level?

OrderSend(Symbol(),OP_BUYLIMIT,Lots,Price,Slippage, SL,TP,NULL,Magic,0,clrLime);


Price =  NormalizeDouble (iMA(Symbol(),PERIOD_D1, EMA_Period_ 21,0,MODE_EMA,PRICE_MEDIAN,0)+1*Point,Digits);// как правильно прописать эту строчку? 
 TP = NormalizeDouble (Level_plus_1500_D1-iMA(Symbol(),PERIOD_D1, 21,0,MODE_EMA,PRICE_MEDIAN,0),Digits); // и эту для профита -  Level_plus_1500_D1 - уровень ЕМА  ?

Read the help, everything is there and is quite clear.

And SL and TP should be set better from the price of the order (Price), not from the market, it's more logical somehow.

Reason: