***Details of Fixes needed & problems of current Gloria EA****
I need someone with experience with MetaTrader`s MQL.
This Ea is a modification of my old SynergyEA. Synergy’s indicators have been deleted & replaced by my GloriaIndicator. The GloriaIndicator is just a shell containing all my indicators and arrows. Please test on my broker’s platform, because it’s rather particular with EA’s. It is www.investtechfx.com/
——————————————————————–
MISC:
**Comments are currently disabled. They should be turned on & display properly, each on new lines. Plus add current position of ScaleInPercent.
**Demo_Account (full functionality) & Live Account (certain account Numbers).
——————————————————————–
Enter trade immediately upon new signal, do not wait for next bar to enter.
——————————————————————–
MoneyManagement:
Is in the LibDerksUtils.mq4 library file
(Should work with DualWinMM, Martingale, or Independantly).
AllocatedPortion– Percent of account balance to be used.
TradeSizePercent– Calculated based on AllocatedPortion.
MinLots– Minimum lots to trade.
MaxLots– Maximum lots to trade, before a ResetEA or StopEA is triggered.
MaxLoss%–Maximum percent of AllocatedPortion lost, before StopEA or ResetEA.
ResetEA– True/False, if MaxLots or MaxLoss is reached, reset EA to base lots.
StopEA– True/False, if MaxLots or MaxLoss reached, stop EA.
——————————————————————–
DualWin & Martingale:
(A base lot is MinLot or TradeSizePercent, depending upon which is selected).
ScaleInPercent– Scales in percentage of current loss over several trades,
untill all recovered. Should recalculate after every trade,
to find total current loss. & trade according to strategy’s rules. eg. for DualWin, only scale in after a win.
ScaleIn+BaseLot –True/False,
Adds 1 base lot to ScaleInPercent lots, for each trade scaled-in, plus 1 for loss trade.
Martingale should use the actual loss,(not a multiplier) to get next lot size.
Martingale should recalculate after every Loss, to get total loss.
——————————————————————–
EXITS:
Are in the LibOrderReliable.mq4 library file.
***Include Hidden code… & add more RefreshRates()
Modify the Trailing Value, FirstSL, & SecondSL to include hidden code to scalp BELOW my broker’s 10 pip minimum. The code for Stops which are less than 10 & Instant Orders are in LibOrderReliable.mq4 library file.
Since my broker does not support “Instant orders”, extra code had to be added for RefreshRates(). It should refresh & continue retrying until closed, or a Error 141 for too many attempts. In which case,..???..ideas are welcome. Alert maybe.
Current ERROR messages:
OrderClose error 145 [Modification denied. Order too close to market]
OrderModify Error 1 (only occasionally)
=====================================================================
Question & Answer re: Error 145.
what does the error 145 “order is too close to market” mean?
* Market & Pending Order Control
* Error Code 1
http://docs.mql4.com/trading/errors
Metaquotes gives the dealers nasty little tools to prevent you from setting orders where you want, apparently they can also lock in a previous order when price gets close enough to it that it “might” be executed.
See also MarketInfo() MODE_STOPLEVEL and MODE_FREEZELEVEL
You are probably running into the “freeze level” setting at your friendly Dealer. “Modifying has been denied since the order is too close to market and locked for possible soon execution.
The data can be refreshed after more than 15 seconds using the RefreshRates function, and a retry can be made.” However, they can return error 141, meaning too many attempts have been made, which will stop your EA.
======================================================================