Forum

Indicator values correct from Script, but struggling from EA

I have this test indicator : #property version "1.00" #property strict #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Lime #property indicator_color2 Red #property indicator_width1 1 #property indicator_width2 1 #define BuyBufferIndex 0 #define

Custom Indicator - draws fine on historical data, not on real-time data

Hi Playing with swing highs and lows - LL,LL,LL,HL,HL for Swing Low and HH,HH,HH,LH,LH for Swing High. If I drop it on a chart... does what I expected it to do. However, doesn't paint entries in real-time and if I test it through an EA, opens trades at wrong entry points. I suspect the indicator is

.net C# dll export Marshalas string not working

I am trying to invoke this method in MQL: #import "Trading.dll" int GetSymbolCount( string symbol); #import The C# code is as follows: [DllExport( "GetSymbolCount" , CallingConvention = CallingConvention.StdCall)] public static int GetSymbolCount([MarshalAs(UnmanagedType.LPWStr)] string symbol) I

Custom Indicator: iCustom - MQL4 returns correct values, MQL5 returns incorrect values

Hi To get the buffer values of a custom indicator of the last closed candle in MQL4 - which returns correct values : for ( int i = 0 ; i < 27 ; i++) Print (i + ": " + iCustom ( Symbol (), Period (), "Currency Strength Multimeter" , 250 , 5 , true , false , i, 1 )); To get the buffer values of

Custom Indicator working on CHART and from SCRIPT - BUT NOT FROM EA

Hi Guys I have a custom indicator , which works fine when I attach it to a chart. When I attempt to get the values from the indicator, they are retrieved correctly as per the chart, when getting it from a script. If I use the same code that works in the script from an EA - I get values, but they are

HELP: Trailing Stop with Break Even - Need help with my script

Hi Below is my attempt at a trailing stop. Need help making it smarter and more reliable. I would like it to break even after 5 pips profit and thereafter trail by 5 pips. Please help. //+------------------------------------------------------------------+ //| Expert trail stop order function

Breakeven Trailing Stop Algorithm Script

Hi I need a script that was add a stop loss at open price +1, if market has moved by 5 pips in my favour. Then I would like to trail the order by 5 pips at a time. Would appreciate any help

Custom Indicator: iCustom values do not correspond to values on chart

Hi All Newbie MQL developer, so bare with me please. Created a custom indicator which plots what I need, exactly as I need it on the graph. However, when I try to get the values at a particular bar, through iCustom - I don't get the same values as the chart and I can't understand what I am doing

1 Min Exponential Scalper EA: Need advice on backtest results...

Hi I have developed a 1 minute scalping ea. Below is the results of the back test on a 1 minute chart from the beginning of this year to Friday, 7 November 2014. It is designed for EURUSD on ECN Brokers. The strategy is profitable even after taking into account commission costs. Please advise on

Help needed to improve my scalping ea.

I've written an EA with simple money management and trailing stop, based on 5 EMA High and 5 EMA Low. The idea is to sell when overbought and buy when oversold. If you run the EA with 0.3 or 0.4 spread, i.e 3 to 4 points it is profitable. Thanks to trailing stop i get about 88% success rate. The