EA For USDJPY
-
Are tick ids function the same way as candle ids ex. where tick[0] the current tick and tick[1] is the previous tick?
This ea is supposed to close trades that are less than $0.10 profitable by using a trades loop to find any open trades whose direction has reversed within the current candle (i.e. whose ask price of tick[0] is greater than but not equal to ask price of tick[1]) but it's not working: http://fxdreema.com/shared/deukmspob
here's the same idea written differently (revised from an earlier forum post) but it also doesn't work: http://fxdreema.com/shared/2bVa6mgN
Thank you

-
It's not the same as candle parameters. This should return the last tick (if id 1 is used) value, but I think it's not working right now for some reason and I need to check it later.
-
no problem, do you know a workaround to accomplish this task (to close trade when current candle changes direction by a certain amount, say current tick >= previous tick):
Maybe there is a way to express "if current candle size decreases by x amount" or "if ask price crosses opening price, set virtual s/l at opening price" or simply "if candle changes direction"? -
-
I think I fixed that problem.
-
very smart! thank you

Block id "end" means that it is not counted in the order?
Why is "pass" underneath block id "end"? -
let's say you wanted to close trade if current price > lastprice[2] or lastprice[n]. Is this a good way to do that?: http://fxdreema.com/shared/9VS8gkGFd
-
this would be even better:
for each open trade in loop, if profit amount of candle close[0] > profit amount of candle close[3]
Is there a way to write this using blocks?
-
__this would be even better:
for each open trade in loop, if profit amount of candle close[0] > profit amount of candle close[3]
Is there a way to write this using blocks?[/quote:3fr9vo0g]
With blocks it will be bad-looking, because this requires to keep data for each trade (arrays of data), and this data to be collected on special conditions. It may sound simple, but it's too challenging to be made with blocks
-
Ah, by the way I can suggest something. It looks to be something similar but quite different. Go to Project options and turn on Virtual Stops. Also set up Virtual stops timeout. This will cause (if no bugs of course) the trade to be closed X seconds after it crosses the SL line, and if it returns before timeout - it will not be closed.
-
__very smart! thank you

Block id "end" means that it is not counted in the order?
Why is "pass" underneath block id "end"?[/quote:3g5pjg7r]Not exactly... What is important is to set "LastPrice" after it was used, and with such a name the block will be executed last (latin IDs are executed after numeric). I tried with 1000000, but when you put new block it will be number 1000001 and that is not good
But I don't like this set up anyway 
Why is "Pass" there... because there is no matter where it is, in this case it only causes the other block to be included to the project, otherwise not-connected blocks are not included.
I wrote 2 posts on the previous page, If you missed them - go there.
-
thanks, I've explored the virtual stops but they don't do exactly what I'm looking for so this looks like a programming job

-
____this would be even better:
for each open trade in loop, if profit amount of candle close[0] > profit amount of candle close[3]
Is there a way to write this using blocks?[/quote:32pkt1ow]
With blocks it will be bad-looking, because this requires to keep data for each trade (arrays of data), and this data to be collected on special conditions. It may sound simple, but it's too challenging to be made with blocks :)[/quote:32pkt1ow]Would you be interested in writing this code? If so please, email me cost. If not, could you point me in a direction on how to approach the above programming task (I understand how code works but don't have a lot of programming experience)? If you don't have time no worries, I know you are busy and really appreciate the quality of your service

-
I do code only for fxDreema, I'm not a freelancer. If something is good (and easily possible) at the moment for fxDreema, I will consider it. If it's too specific, whell, one tool can't be used for everything in the world

I never tried this, but I know there is a "Jobs" section in mql4.com/mql5.com. But I guess a whole EA should be done. -
ok, thanks
