- John James Holmes: . i was wondering how i could exit a buy trade if the EMAs switch over while i am in the trade.
If slow is above the fast, close all buy orders (pending or otherwise), then test for opening.
-
openOrderID = OrderSend(NULL,OP_SELLLIMIT,lotSize,Bid,10,stopLossPrice,takeProfitPrice,NULL,magicNB);
You can not open pending orders at the market.
You can't move stops (or pending prices) closer to the market than the minimum: MODE_STOPLEVEL * _Point or SymbolInfoInteger(SYMBOL_TRADE_STOPS_LEVEL).
Requirements and Limitations in Making Trades - Appendixes - MQL4 TutorialOn some ECN type brokers the value might be zero (the broker doesn't know). Use a minimum of two (2) PIPs.
The checks a trading robot must pass before publication in the Market - MQL5 Articles (2016)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
good evening people, i was wondering if i could get some advice off anybody regarding my code (see below)
so one of the basic but important factors in my strategy is the EMAs (50 &200) when 50>200 buy and when 200>50 sell. i was wondering how i could exit a buy trade if the EMAs switch over while i am in the trade. I have been learning to code for a few months now so i do apologise if its something ridiculously simple that ive missed .