Problems with "close each profitable trade" block
-
EA description:
http://savepic.su/3416652.jpgI want to EA open an order when fast ema crosses slow ema below and close an order when fast ema crosses slow ema above, but only if a trade is profitable. That EA what I have made opens a trade but does not close it when there is some profit on crossing.
Take a look at the picture and some one tell me please what is wrong.
Thank you!
Sorry for bad English. -
I checked this EA and it seems to work. If you want, put "Once per bar -> Draw arrow" after block #4 just to see places where crossovers occur. When this happens below my Sell trade, it's closed.
-
How you can see it closes orders not on each crossing above point. I need to close orders on every crossover above but with profit 3 pips+, if profit is not reached then it must ignore those signal. What else can be wrong. Maybe a signal has not enough time to be execute, because values are rapidly changing?
-
In USDJPY, what price distance is 3 pips? If you place SL or TP something like 10 pips, where it will be placed?
-
-
Then can you check your Input parameters for "inp5_PipsAmount", sometimes our parameters are not what we think...
But I think that 3 pips are more than you think on this chart. Set SL in "Sell now" to 3 pips just to experiment. -
If i will set TP 3 pips broker never opens my orders with this amount of point, because minimal Sl and TP for USDJPY is 6 pips (roboforex fix-standart). But here it does not mather how many pips is in a closing moment, because it closes on crossover. At first i tried my EA with value of block = 0. It means that EA must close orders on crossover with positiv value (more than 0). So i think it does not mather what number is there. Maybe troble is in some logical point? Maybe don't use this block and try another combination of blocks with formula result (open price - close price > 0), how you think?
-
No, the block should work, I think it's fine. You can always backtest it without crossover above it (with "Just pass" for example), and it should close trades immediately when they go to certain profit. Also you can check if crossover works by putting "Draw arrow" or something else to be drawn after it. Then you have the combination of both, which should work as well. At least it works on my backtester... and I don't know what can be wrong with the project itself, so I'm thinking about input parameters or point format or something else that is hidden. But if you can't understand what is going on, I can connect to you with TeamViewer.