MQL4 Learning - page 76

 

Yeah exactly,

and you can count the posts on one hand.

My point is that there are a ton of experienced programmers that use these boards and they don't seem to want to help anyone.

This is why I was asking if you could point me to a site or person that WAS willing to help.

Instead you buried my post where it will NEVER be seen.

Perfect.

 

Hi there guys. I need some urgent help.

I have an indicator that draws lines in the price bar, I just deserve to show it in a separate window and in histogram.

What should I do?

Thanx in advance.

 

Draw in Seprate Window

Boyens:
Hi there guys. I need some urgent help.

I have an indicator that draws lines in the price bar, I just deserve to show it in a separate window and in histogram.

What should I do?

Thanx in advance.

Drawing in MetaTrader see this article

MQL4 Language for Newbies. Custom Indicators (Part 1) - MQL4 Articles

 
arshadFX:
Drawing in MetaTrader see this article MQL4 Language for Newbies. Custom Indicators (Part 1) - MQL4 Articles

Thank you a lot!!!

I made the changes, is compilling now. How long it takes most of time?

 

Compiling usually takes a matter of seconds. If it's taking longer than that I'd say youre computer has hung.

Lux

 

how can i get price closed bar only at specific time?

Dear Sir,

do you know some code for calling price close at specific time?

exmp;

extern string Asia_Open = "02:00";

extern string Europe_Open = "08:00";

extern string LONDON_Open = "10:00";

extern string US_Open = "15:00";

how can i get price closed bar only at "02:00" or else?

your help is needed..

thank you..

MANSTIR

 
MANSTIR:
Dear Sir,

do you know some code for calling price close at specific time?

MANSTIR

datetime some_time=StrToTime("02:00");

int shift=iBarShift("EUROUSD",PERIOD_H1,some_time);

Print("close price of the bar with open time ",TimeToStr(some_time)," is ",iClose[shift]);

 

EA fix........

I need an EA adjusted and I do not know how to do it.

It is a simple fix..........I have the programming just do not knonw how to insert it. I can email it all to you.

 

Running Mutiple EA's?

I have written several EA's now and when back testing I learned they didn't work. By didn't work I mean the back test program in the FXDD program and/or meta editor gave me results that were of negative earnings. I'm sure many traders/programmers have had similar results. I was actually about to give up on the strategy I was trying to program. I opened the chart and enlarged it so that I could see with my own two eyes just exactly where I went wrong. While looking over the chart and actually seeing with my own two eyes just exactly where the trade openings were (both buy and sell) and also the closings, I noticed they were wrong. I went back to my original chart where I had placed markers of where I wanted to enter the market and also exit it. I checked my conditions on all my enter/exit points for both buying and selling. I knew I was correct so I tried a little reverse phycology on the back testing itself. My EA has 5 conditions to open a trade (buy or sell) and 3 conditions to close one. Hold on to your seats here you just might have a great EA yourself and not realize it. I actually reversed all my signs (greater than to less than >< and vice versa. I know how stupid this sounds and I was laughing (at myself) while I was going through my EA and doing this. I ran another test with the new (wrong) settings installed. The test was a total SUCCESS. Thats right it actually worked and I now had a profit. Once again I opened the chart of the back test results and noticed with the reverse signs the test now opened and closed my trades exactly where I wanted them and where they should be to generate profitable trades. I have since corrected my greater/less than signs for my conditions and I am now running forward testing to see how well it will do before putting real money to it. So far my EA works pretty good on the USDCHF pair. I would like to put it to the test of other currency pairs in forward testing but I cannot figure out a way around the problem of: total=OrdersTotal();

if(total<1)

With this in each of the EA attached to other currency pairs, only one trade will be opened. When I increase the total<4 what I get is four open trades for one currency pair. I have tried using

OrderSelect(10000, SELECT_BY_POS, MODE_TRADES)

if(OrderSymbol()==Symbol())

return(0);

else // from here it would go to the initial buying conditions.

I have also tried if(ticket<1) thinking it would only read tickets for the current chart the EA is attached. None of the efforts I have tried have worked, so here is my questions, How can I trade mutiple currency pairs at the same time but only have one ticket open per currency pair.

 

Use orderstotal to loop through all the open orders but check magic number and symbol to make sure you're only counting orders for the right EA on the right currency.

Lux

Reason: