Hi guys!
Can someone help me with this code:
CLOSE if EMA34 crosses over EMA54 or if the price is reached 70 pips from entry
If any of this conditions match, close the trade.
Thanks in advance
Topic moved to correct forum (about automatic trading) and title changed to a title ” explicit enough to prompt the community to read your discussion. “, please respect some rules while posting, thanks in advance.
Here is the code you need:
if average[34,1] crosses over average[54,1] then
sell at market
exitshort at market
endif
set target pprofit 70
Long and sell orders are closed in this code, since you didn’t specified which kind of orders you’d like to be closed by the condition ..
“price is reached 70 pips from entry” is what we call a takeprofit.