Codes

RSI Breakout for MetaTrader 4

The Expert Advisor places buy trades when RSI crosses above 73 and sells when it drops below 27. A trailing stop based on ATR protects profits

Forum

Problem with FileWriteStruct

I'm trying to write a script which writes my trading history to a binary file. I tried to follow the example at https://docs.mql4.com/files/filewritestruct, but I keep getting the compile error "'tradeBuff' - parameter conversion not allowed OSR Trade History Recorder Binary.mq4 72 33" I can't

Pass enum as method parameter

I declared a method named EnterTrade() that only takes one variable, an enumeration named TradeDirection. The compiler throws the errors TradeDirection - declaration without type. Why won't this compile? void EnterTrade(TradeDirection dir) { } enum TradeDirection { Long, Short };

4105 OrderModify Error

Purpose: Add a set stop loss and take profit to all open trades (regardless of currency pair) Problem: This script generates error 4105 when placed on a chart. Invalid ticket for OrderModify function. My demo account currently has an open trade with no stops or limits attached. What causes the

Webinar: Developing a trading strategy

Developing a successful strategy is one of the most agonising tasks that a trader can undertake. TradersNow started its project years ago with a mathematically sophisticated algorithm to predict the markets. Yet, even with the advantage of a mathematics professor and a team of market professionals

C# dll, error 127

I've gone through the forum posts and cannot figure out how to resolve error 127 . I created a .def file but I'm not sure why or what to do with it... none of the samples even reference the file, although an earlier post discussed it resolving the issue. Steps Taken: 1) Placed test2.mqh in

Setting TP/SL on gold

I wrote this simple gold script to set a stop and tp on gold at Alpari for an open long position. I set the values to 1,000 pips away - it still won't let me set, even though it will allow me to set the same values manually. How do I fix this? #property show_inputs extern int Stop = 1000 ;

Objects Behind Chart Price

Can I create objects that appear behind the chart price? I'd like to reduce the likelihood that I accidentally select the objects. Does putting them behind the price, if it's possible, help reduce accidental highlighting

Reading User's System Time

I want to write an EA so the user can enter trading times using local time instead of broker time. I've seen people reference the kernel32.dll and other system dlls. Does anyone know which dlls and functions I can reference to get the local computer's DateTime.Now

MQL5 DLL in .NET

Does MQL5 support dlls that are NOT written in C++? Can I write a dll in C# or VB without writting a C++ wrapper

Find HLOC without bar index

Do any functions exist in MQL4 for finding the Hi/Lo/Open/Close based on time instead of bar index? Ie, if I want to know the hi from 13:25 but I don't know how many bars ago that was, how can I find out