Forum

swiching the requiriment for a trade.

hi everybody, even tho my understanding of things like this is growing a bit bigger, im stuck once again. which basically opens a trade when X pips from the last trade (this case its a buy order ) has changed in the opposite direction. now, logical thing would be to change the last_buy_price - ask

i want a function to return a number and to print it in the journal.

IF (something == something) return (this); <-- where do i add a Print ("this")? im having trouble adding the print part alongside the return call. any help? code: if (X==Z) return ( 0 ) ; else X=Y(); // Print ("WUT")

constantly spams trades, but i want just one.

hey guys, was wondering if anyone could correct my mistake here - i want the code to read what types of orders are opened more - long's or short's - and then open an opposite trade, with an equal amount of lot sizes. i know the build is wrong, for it checks the total number of trades, not the

string of code to discard all records, memory of an EA?

so, lets say - i have an EA, which for some procedures uses some info from previous trades. in my case - after a trade has hit TP, another trade is opened, in the same direction, but the parameters of the trade are changed. is it possible to invoke a string of code, that would erase all such info

have a bug [bug?] in the code, which bias'es the whole EA.

hi there! so, as the subject mentions - theres a bug in this code - annoying me, quite a bit - might anyone experienced point out where the issue is? the issue is - when the "flush", or the restart of the EA is activated - for some reason it opens the two initial trades, but with one extra trade -

same old, good friend - error 130.

but im starting to rip my hair out. i might actually say ive tried everything - removed TP,SL, edited prices, Asks, Bids, all of it. i still get it - my fave' - error 130 . could some good ol' chap point my mistake out here, please? i tried to compare it with a bunch of other lines, and codes, and

stop EA from trading on a specific day [?]

hi there, every body. was wondering if any one could throw in a line of code to disable EA from trading on a specific day? i, personally dislike fridays, so lets take that for example. so, this is the code - it closes all trades, and restarts the EA if equity has grown. so, my idea is - after trades

results on back testing not matching (optimization and simple test)

so, ive noticed this quite a few times - i do an optimization of an EA, i randomly pick a result that has used specific settings, and profited the tested time period, but when i launch it to see either visually, or without - it fails, thus not representing the result given by optimizer. genetic

reversing a code to do a function in an opposite direction.

hi there, guys! i have this little piece of code here that does the following - records your balance, and once equity reaches a specific percent growth over that mark, it closes all trades. could some one maybe edit it just a bit so it would do the same, but in the opposite direction? if equity

a reset function for an EA if specific criteria has been met (?)

im thinking about adding a "reset" button to my EA (mql4). question is if it would function like that? steps and criteria are pretty basic - so i would really appreciate of the "local guru's" could answer my question. step one - record the balance before the EA is started up. step two - setting the