Serving Traders Since 2005
|
|
|
|||||||
| MetaTrader Expert Advisors Post and discuss the MetaTrader expert advisors here. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Hello,
I've been working on this EA, it works when back tested, however it will not trade when applied. I get the smiley face and all the correct boxes are checked such as allow DLL imports and enable live trading, but still no trades. This has lead me to believe that the problem is my code, can someone please take a look? MQL5 Code:
|
|
||||
|
It trades without a problem in my demo platform from Alpari. What's the output in the Experts and the Journal tabs of your terminal after you attach it?
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
|
||||
|
Can you pls help me understanding the settings for the order size :
extern string rem1="//---- Definition Trend et Breakout"; extern int BreakoutPeriode=7; extern int TrendPeriode=6; extern string rem2="//---- Order"; extern bool OnlyShort=false; extern bool OnlyLong=false; extern int MaxTradesPerBar=2; extern int StopLoss=6; extern int BreakEven=1; extern int SeuilSL = 6; extern int PartialTP1=10; extern int PartialRatio1=20; extern int PartialTP2=20; extern int PartialRatio2=60; extern int TakeProfit=50; extern int Slippage=3; extern int MaxSpread=3; extern int Magic=12387; extern string rem3="//---- MM: 1.Fixed 2.Geometrical 3.Proportional 4.Smart 5.TSSF"; extern int MMType=3; extern double FixedLots=0.1; extern int GeometricalFactor=10; extern int ProportionalRisk=90; extern int LastXTrades=10; extern double DecreaseFactor=2; extern double TSSFTrigger1=1; extern int TSSFRatio1=50; extern double TSSFTrigger2=2; extern int TSSFRatio2=75; extern double TSSFTrigger3=3; extern int TSSFRatio3=100; extern string rem4="//---- Debug"; extern bool DebugMode=false; I would think that the EA opens a new order with 0,1 lot ,but in reality it depends on the amount of free margin : e.g. ~0,6 lot for $ 1000 ,increasing if the free margin is higher . I'd like to lower the order size while I'm testing this robot . I guess the MMType ,GeometricalFactor ,ProportionalRisk=90 are important ,to be honest I can 't see what the " extern double FixedLots=0.1" setting is good for The example is taken from the following thread : Hardprofit.mq4. Thanks in advance for your help . |
|
||||
|
Change MMType to 1.
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Trade Forex based on the Forex Carry Trade | Johnkitty | Trading Systems and Strategies | 0 | 29th March 2011 09:18 |