SL control
9 replies
TJ#
8 years ago #114378
TJ#
8 years ago #133714
These did not work either…
bid cross below abc level ==> close position (100)
or
ask cross above xyz level ==> close position (200)
How to get this right?
tomas262
8 years ago #133720
Hi,
it seems Open P/L (pips) function always return 0 for me. That could be a reason why conditions don’t work. I will test this where the problem could be and let you know
tomas262
8 years ago #133749
Hello,
I have created an example on how to exit a position when open PL (pips) exceeds certain (negative) limit in pips. Tested and works well. To be sure it works correctly I also added print to MT journal
TJ#
8 years ago #133775
hi,
I realised that we somehow cannot put both BUY & SELL’s conditions & both control stops on the same EA to work. It has to be BUY (Long Only) & control stop, one EA and SELL (Short Only) & control stop, the other EA. Very interesting… 🙁
2nd, I cannot get it to work with specific levels,
bid cross below abc level ==> close position (100)
or
ask cross above xyz level ==> close position (200)
Worst nightmare
The 3rd issue is, this EA works only on Oanda’s Demo account and not on Oanda’s Live account. I don’t know why…
Both are running same version & build “400 Build 890”. 🙁
Ps.
I have removed the Long trigger conditions… you can insert any of yours..
tomas262
8 years ago #133797
Ok, will look at that
What issue is that with Oanda live? EA not opening trades? Is there any error message in MetaTrader log?
TJ#
8 years ago #133798
in the Demo acc, the EA is closing the trade as expected or planned (perfect!!), but when put it in the Live acc, it became a “rogue” EA. it does not close the trade when the losing pips were reached or exceeded.
It just ignores the EA rules totally.. 🙁
How do I see the MT logs? where to find them?
TJ#
8 years ago #133827
When I was testing this out:
1. AUDUSD’â„¢s spread was @ 1.6 pip
2. I used a test script to trigger the BUY
3. My hidden SL was set to -5.0 pips ==> when SL is greater than -5 pips trade will be closed.
a. The Hidden Stop Loss(in pips) is set as a var(double) so that I can change it as and when I see fit.
2 05:47:39.976 Script Long AUDUSD,M15: loaded successfully
0 05:47:40.245 ‘233753’: order buy market 0.01 AUDUSD sl: 0.00000 tp: 0.00000
0 05:47:40.543 ‘233753’: order was opened : #71026184 buy 0.01 AUDUSD at 0.71456 sl: 0.00000 tp: 0.00000
0 05:47:40.543 ‘233753’: modify order #71026184 buy 0.01 AUDUSD at 0.71456 sl: 0.00000 tp: 0.00000 -> sl: 0.70928 tp: 0.00000
0 05:47:40.824 ‘233753’: order #71026184 buy 0.01 AUDUSD at 0.71456 was modified -> sl: 0.70928 tp: 0.00000
2 05:47:40.825 Script Long_09 AUDUSD,M15: removed
2 05:48:19.296 Expert Hidden_SL_Long AUDUSD,M15: loaded successfully
0 05:48:59.099 ‘233753’: modify order #71026184 buy 0.01 AUDUSD at 0.71456 sl: 0.70928 tp: 0.00000 -> sl: 0.71261 tp: 0.00000
0 05:48:59.387 ‘233753’: order #71026184 buy 0.01 AUDUSD at 0.71456 was modified -> sl: 0.71261 tp: 0.00000
1 05:50:14.340 ‘233753’: modification of order #71026184 buy 0.01 AUDUSD at 0.71456 sl: 0.71261 tp: 0.00000 -> sl: 0.71478 tp: 0.00000 failed [Invalid S/L or T/P]
Hopes the info provided is useful to you. 🙂
TJ#
8 years ago #133833
the following log data is from Oanda Demo account..
Same setup as Live account,
tomas262
8 years ago #133906
TJ, have you talked to Oanda about differences between live and demo account? There can be and they could help solve this too
Viewing 9 replies - 1 through 9 (of 9 total)