HOW CAN I OPEN A TRADE ONCE PRICE HAS REACH CERTAIN AMOUNT OF PIPS ABOVE/BELOW..
7 replies
valenpty
3 years ago #259328
hI!
How can I have my Ea open a trade every time the prices has reached certain amount of pips say above or below for instance previous day high or low?
So basically would be something like this:
*IF PRICE REACHES TO 10 PIPS OR MORE OF THE PREVIOUS WEEK LOW, THEN DO THESE THINGS:
-OPEN A BUY OR SELL TRADE WITH A PRE-DETERMINED SL, TP, BREAKEVEN AND ANY OTHER CONFIGS PREVIOUSLY DEFINED BY THE TRADER.
Can you guys give some help?
thanks!!!

tomas262
3 years ago #259331
valenpty
3 years ago #259334
Thanks will check it out!
valenpty
3 years ago #259335
It’s working perfect!
now how can I add risk management strategy on it?
for instance using these conditions:
*if trade #1 = sl then reduce risk by 50%, else (which means was a tp), then next trade keep same risk% as initially set.
and for instance if the trade #1 was a SL do this:
*if trade #2 = tp or trail stop in positive then risk = back to initial %
Im not sure if I explain my self clearly, but in terms of money would be something like this:
TRADE #1 (RISKED $100) RESULT = SL THEN REDUCE RISK BY 50% ON NEXT TRADE.
TRADE #2 (RISKED $50) RESULT = TP OR STOP BY TRAILING IN POSITIVE THEN ON NEXT TRADE START WITH INITIAL RISK OF 100$ PER TRADE.
TRADE #3 (RISKED AGAIN $100) RESULT = SL THEN DO AS ON TRADE #1 OR IF IT TP OR TRAIL STOP IN POSITIVEN THEN KEEP SAME RISK.
Hope this makes sense.
thanks a lot!
valenpty
3 years ago #259342
Can you change this to consider not the current weekly high or low but the previous week’s high or low?
I found that it does what I need after if goes above/below 10 pips of previous weeks high/low but it also sometimes opens another order on the following day but when it does the trading signal conditio on the same week, for instance:
On Monday it went 10 pips below previous week’s high and placed and order, but then on tuesday it did the same.

tomas262
3 years ago #259364
Ok, so you want to make 1 trade per week? Or better one trade long & one trade short as the maximum?
valenpty
3 years ago #259366
If it triggers only 1 per week, then it is ok. But if this can be set how many trades per week, it’s better.

tomas262
3 years ago #259524
If you want the the week’s before high / low simply change HighW[1] to HighW[2] and the same with LowW
This is how you can do 3 trades per week. Check the example attached
Viewing 7 replies - 1 through 7 (of 7 total)