[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 216

 
Gek34:

Good afternoon.

I want to draw the readings on D1 by sections on a smaller TF, it doesn't draw anything:

int start()
{
int counted_bars=IndicatorCounted();
int limit;
if (TimeFrame>0) limit=Bars-counted_bars+(TimeFrame/Period());
else limit=Bars-counted_bars-1;
int i=limit;
int C_time;
int Bar_Shift;
if (limit==0) return(0);
//wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
int h,l,h1,l1;
while(i>=0)
{
C_time=Time[i];
Bar_Shift=iBarShift(NULL,TimeFrame,C_time,true);
h=iMA(NULL,0,period,0,MODE_EMA,2,Bar_Shift);
l=iMA(NULL,0,period,0,MODE_EMA,3,Bar_Shift);

//----
ExtMapBuffer1[Bar_Shift]=h;
ExtMapBuffer2[Bar_Shift]=l;
i--;}
//----
return(0);
}

 


Maybe someone will correct the code or show me how to do it.

Thanks in advance.


https://www.mql4.com/ru/search#!keyword=MTF%20MA&module=mql4_module_codebase
 

Thanks for the link, but that's not what I need

I want to connect these dots in sections.

SetIndexStyle(0,DRAW_SECTION);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexEmptyValue(0,0.0);
SetIndexStyle(1,DRAW_SECTION);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexEmptyValue(1,0.0);


 
Good day everyone..... I have a question, I have put two EAs on different brokers one of them is Alpari. I have been working with another one and everything is ok, but nothing happens on Alpari, can the reason be that I am testing the other one on Alpari at the same time? In other words, is it possible to put an EA working and testing another one on the same terminal? Thank you!!!
 
laveosa:
Good day everyone..... I have a question, I have put two EAs on different brokers one of them is Alpari. I have been working with another one and everything is ok, but nothing happens on Alpari, can the reason be that I am testing the other one on Alpari at the same time? In other words, is it possible to put an EA working and testing another one on the same terminal? Thank you!!!

You can even do this one! The tester takes the data of the EA and does not interfere with the work of the EA in any way!
 
borilunad:

You can even do the same! The tester takes the data of the EA and does not interfere with the work of the EA in any way!

Thank you, I understand.
 
Gek34:

Thanks for the link, but that's not what I need

I want to connect these dots in sections.

SetIndexStyle(0,DRAW_SECTION);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexEmptyValue(0,0.0);
SetIndexStyle(1,DRAW_SECTION);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexEmptyValue(1,0.0);



Then you should show all the code, not just bits and pieces. You won't need to think it over

I made the indicator a long time ago, I don't know if it works or not

Files:
 
Hello, Could you please tell me how to write a correct function for the variable"stop loss", if the "stop" should be equal to the "low" price of the previous candle. Thank you!
 
tara:
To start with, just articulate clearly what you would like. Geometric approaches are welcome.


I have started a thread on the subjecthttps://www.mql5.com/ru/forum/143933
 
I'm just beginning to learn a programming language, so please excuse my confusion)) I need to set the variable double sl= and then I don't know. The stop should equal low bar1. Thanks
 
art-gan:
I'm just beginning to learn a programming language, so please excuse my confusion)) I need to set the variable double sl= and then I don't know. The stop should equal low bar1. Thanks
Try it like this:
double sl= Low[i+1];
Reason: