[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 378

 
Egregor:
Here is the indicator itself


if you make a call to an indicator, for example:

      double p0=iCustom(Symbol(), Period(), "FiboBars", period,fiboLevel,showAlert, 0, 1);
      double p1=iCustom(Symbol(), Period(), "FiboBars", period,fiboLevel,showAlert, 1, 1);
      double p2=iCustom(Symbol(), Period(), "FiboBars", period,fiboLevel,showAlert, 2, 1);
      double p3=iCustom(Symbol(), Period(), "FiboBars", period,fiboLevel,showAlert, 3, 1);

remember to define the variables:

extern int period = 10;//5Min
extern int fiboLevel = 1;
extern bool showAlert = false;

then a red bar when p2>p3

and a green bar when p3>p2

 
lukins:

I'm writing an EA in MQL4 that switches between accounts. I'm stuck on the following.

I have hWnd variable - terminal login window handler, I need to enter text in Login/Password field and simulate pressing ENTER key. Here is my code:

Only pressing ENTER works - the rest is ignored, please tell me how to fix it.

P.S. probably I should create handlers of fields Login / Password and prescribe them in 1-3 lines instead of hWnd, question how to do it?

Thanks in advance!


Maybe it would be better to create your own topic. Your question is beyond the scope of a newcomer's topic
 
abolk:


if you make a call to the indicator, e.g:

remember to define the variables:

the red bar when p2>p3

and a green bar when p3>p2

Thank you, it worked.
 
Vinin:

Maybe it would be better to create your own topic. Your question is beyond the scope of a newcomer's topic
Took your advice, deleted the post and created a separate topic
 

Is it possible to declare an array in an EA?

Can I declare an array in my EA to record my formula calculations for the last few bars?

I.e.

bar i -> calculate by its formula -> in array[i]

bar i+1 -> own formula calculation -> in array[i+1]

etc.

Another question: can EA draw or attach its own custom indicator (if yes, how)?

 
progenitor:

Is it possible to declare an array in an EA?

yes

Another question: can the EA draw,
yes
or hook a custom indicator (if yes, how)?
no
 
Egregor:
Here's the turkey itself

Add reverse to the Expert Advisor or make it open trades in the opposite direction with the same conditions.
 
sammi61:

Add reverse to the Expert Advisor or make it open trades in the opposite direction under the same conditions.

Please do not post decompiled code. Repeating this might get you banned
 

Good day to you all. I have this problem:

I need to place an object of type OBJ_TEXT over the hight of a certain bar. If you specify the iHigh value of the bar you want in the object coordinates, the text will be overlaid on the bar and you won't see anything, you have to move the object up by a certain amount of points. I am currently doing this:

ObjectCreate ("Max("+mx+")", OBJ_TEXT, 0, Time[i+n],MaxBuffer[i+n]+VertShift*Point)
where- MaxBuffer[i+n] is the high of the required bar, and VertShift is an external variable. When switching timeframes the text jumps vertically and I have to enter the settings of the indicator and adjustVertShift value each time. I am now tired of tuning and I want to improve my indicator. I would like to finish the work. Please advise how to place the text over the bar to make everything look nice.
 
mInvIn:

Good day to you all. I have this problem:

Insert in init() a little code to calculate VertShift from the chart period. You set it up once, it will last for ages.