Forum

Detailed explanation of iCustom

Hello. I am new to coding, and am learning a lot, however I have struck something that I cannot get my head around at the moment. I am trying to call the result of a test in one of my indicators, to an ea, so it can add it to its own tests before placing a trade. The ea is a simple moving average

Error 130 - common I know, but problematic none the less.

Hello Everyone. I am having a problem with Error #130 (I have looked through the documentation and have not found anything that can help me so far). I have attached the code below - aside from the other issues in the code, I am just focusing on this for the moment. For some reason, if I change the

How the "and" & "or" operators work, when both combined in an if statement.

Hi there everyone, this is just confusing me, and I need to get my ordering right. if( A < B && C < D || E < F ). In that statement, does it mean: if ( A < B && C < D ) "or" ( A < B && E < F ) or does it mean: if ( A < B && C < D ) "or" ( E < F ). In other words, does the "or" operator

Check Once Per Bar

Hey Guys, I am trying to identify some code which will allow me to test once per bar. For example, running an if() statement at the start of a new bar. One in which you can select a specific time frame rather than what the time frame is currently operating on. Any ideas? I am stumped, its late and I

Identification of a new day

Ok. So I am trying to create a test that identifies if it is a new day. I am trying to do this through testing, on M1, to see if the date of the previous bar is less than the current bar. I have started with this: double Yesterday = TimeToStr ( iTime ( Symbol ()

EA not placing correct orders all the time.

Hey Everyone. I am having a few problems with my code. There are many problems, and as I hope you can appreciate, I am new to coding and am doing it in my spare time - I am slowly working through them. The problem I am currently trying to overcome is that occasionally the EA is only placing an order

Yesterday High/Low/Close

Hey Everyone, I am trying to find out if there is such a variable that I can call to find the previous day high/low/close. I cant seem to find it, my guess is there is one, but it seems to be avoiding me. Thanks

Preventing EA from placing 2 of the same trades in one day.

Hi All. Quick question does anyone have an idea for how to stop or prevent an EA making another type of trade, if it has already traded one in that day. For example, if I have placed a buy limit , and it has triggered. How would I prevent another buy limit being placed later in the day. I currently

Problems with a StopLoss

Hey all. I am now to coding, and am trying my best, however I seem to have hit a wall with this one. This EA is 'hacked' together with heaps of code from other EA's, so it doesnt flow the best yet, as I have not cleaned it up. (any tips on cleaning it up would be appreciated) However the main

MT4 Historic Data

Hello everyone. For some reason MT4 wont download historical data from Meta-quotes, and my provider doesn't seem to understand my need for historical data that goes back past 65000 1-min bars, (I realise the limitations on number of bars per chart, but want to back test over certain periods). The