Posts: 3
Please rate this topic Current rating: 3.0 Votes: 1
RSS
ranifa
ranifa
FREE Member
Offline
  • Registered: 09-26-14
  • Posts: 86
  • Email
  • Thanks: 1

Straddle&Trail EA

Expert Advisor Straddle&Trail.
extern bool    ShutDown.NOW=False;                 // If true ALL POSITIONS (open and/or pending) will be closed/deleted
                                                   // based on "ShutDown.What" flag below
                                                   // This parameter is the first on the list so the user can access it
                                                   // as quickly as possible.
extern string  sStr00=" 0=Everything               ";
extern string  sStr01=" 1=All Triggered Positions  ";
extern string  sStr02=" 2=Triggered Long           ";
extern string  sStr03=" 3=Triggered Short          ";
extern string  sStr04=" 4=All Pending Positions    ";
extern string  sStr05=" 5=Pending Long             ";
extern string  sStr06=" 6=Pending Short            ";
extern int     ShutDown.What=0;
extern bool    ShutDown.Current.Pair.Only=True;    // If true, ALL trades for CURRENT pair will be shutdown
                                                   //(no matter what time frame).
                                                   // If False, ALL trades on ALL pairs will be shutdown.
extern string  sStr1="=== POSITION DETAILS ===";
extern double  Lots=1;
extern int     Slippage=10;
extern int     Distance.From.Price=30;             // Initial distance from price for the 2 pending orders.
extern int     StopLoss.Pips=30;                   // Initial stop loss.
extern int     TakeProfit.Pips=60;                 // Initial take profit.
extern int     Trail.Pips=15;                      // Trail.
extern bool    Trail.Starts.After.BreakEven=true;  // if true trailing will start after a profit of "Move.To.
                                                   //BreakEven.at.pips" is made
extern int     Move.To.BreakEven.Lock.pips=1;      // Pips amount to lock once trade is in profit
                                                   // by the number of pips specified with "Move.To.BreakEven.at.pips"
                                                   // Unused if Trail.Starts.After.BreakEven=False
extern int     Move.To.BreakEven.at.pips=5;        // trades in profit will move to entry price + Move.To.BreakEven.
                                                   //Lock.pips as soon as trade
                                                   // is at entry price + Move.To.BreakEven.at.pips

                                                   // i.e. Entry price on a long order is @ 1.2100
                                                   // when price reaches 1.2110 (Entry price + "Move.To.BreakEven.at.pips")
                                                   // the ea will lock 1 pip moving sl
                                                   // at 1.2101 (Entry price+ "Move.To.BreakEven.Lock.pips=1")
extern string  sStr2="=== NEWS EVENT ===";
extern int     Event.Start.Hour=12;                // Event start time = Hour.      Broker's time.
extern int     Event.Start.Minutes=30;             // Event start time = Minutes.   Broker's time.
                                                   // IF YOU WANT TO DISABLE THE "NEWS" FEATURE (the straddle)
                                                   // SET BOTH PARAMETERS TO 0.
extern int     Pre.Event.Entry.Minutes=30;         // Number of minutes before event where the ea will place the straddle.
                                                   // If set to 0, the ea will place the straddle immediately when activated,
                                                   // otherwise xx minutes specified here before above Event start time.
extern int     Stop.Adjusting.Min.Before.Event=2;  // Minutes before the event where the EA will stop adjusting
                                                   // the pending orders. The smallest value is 1 min.
extern bool    Remove.Opposite.Order=True;         // if true, once the 1st of the 2 pending orders is triggered,
                                                   // the opposite pending one is removed otherwise left as is.
extern bool    Adjust.Pending.Orders=True;         // if true, once the pending orders are placed at
                                                   // "Pre.Event.Start.Minutes" minutes before the event's time,
                                                   // the ea will try to adjust the orders ONCE EVERY MINUTE until
                                                   // "Stop.Adjusting.Min.Before.Event" minutes before the release where
                                                   // it will stay put.
extern bool    Place.Straddle.Immediately=False;   // if true, the straddle will be placed immediately once the
                                                   // expert is activated. This overrides previous 'News Events'
                                                   // settings for placing the long and short pending orders and
                                                   // in that case, the positions WILL NOT BE ADJUSTED.
                                                   // This is to be used as a "quiet" range breakout, for example if we
                                                   // want to play a "regular" breakout during Asian Session for example
                                                   // or at any other time of the day where the market is rangebound

Straddle_Trail.mq4 44.83 kb, 20 downloads since 2014-10-28 
Log in or register to get download access!

Log in Register

jay007hot3
ACTIVE Member
Offline
  • Registered: 11-11-14
  • Posts: 115
  • Email
  • Thanks: 1

I can not understand what you post here ? please explain me more

azaib77
Banned
Offline
  • From: Pakistan
  • Registered: 11-14-14
  • Posts: 99
  • Gender: male
  • Age: 42
  • Email
  • Thanks: 3

can this ea is used to close all trades or something else

Login or Register for FREE!

You are not logged in to the MT4talk forum!


Log in Register

Online Users & Stats
  • Total number of registered users: 46,597
  • Registered users today: 44
  • Newest registered user: mmm
  • Total number of topics: 11,640
  • Total number of posts: 37,786

Online users: 3,245 guests, 177 Members:

admin, agbatoadesina, ahmilion19, aidrissa, ajazakh, Akash, akinssun, Akvisto, alapia, Alexander Lamount Knowles, Alexandre Bastos, Alreza, Alvin Lee, amenofis, Andrea Moschini, armingrivas, artzrules, Arun Ottapura, AshioyaM, azerty911, Baha, betuboxem, bima, binaryot, Biomac, bkrisbiyanto, bmnvanwyk, botniatrader, boubou852, bpbluegum, buysellprofit999, candyboy_tushar, casanay2020, charlenep1, Chartist, chirongweprincetatenda, cicche98, Clint, Clive Aldred, D900, damvanlong, Dansuy, Denis Maxime, donnec, Donnie Drajat, Dush, EAInspirer, Eduardo Degobi Rego, ekans1234, elishaab, Enlightened, Enock01, Etsenn, exstromar, fcastro, Fidelis Obodoeze, Floriano Bertozzi, flsekme, Forex Krishna, fxalby, Fxmaster, Gautam92, GoldenBrett90, Hakan Kokarcalı, henlube, HenryB, Herberth Zandomenico, Hercs, HornFX, houmss, HS Bhiks, huongdtcm, IB Sindu Wardana, InnocentMichael, iscantonionv, izurcmun, j.kameneckas, jamile_forex, Jaya Wardhana, Joker, judeekatherinexx, judmolo, jufete74, kaku5, Kamil750, karthic22, Kcty, Kot1981, kris69one, Kurt Raubenheimer, kwakudokyi, L.l. Lide, leopin, lives3xxx, lmsomni, maennicr, magdie123, magnosud, mangkukhayuntrader, Maria Bergström, MarianNick123, Marosi Mologadi Lekgothoane, Matome, mcwilton, Mdu1993, Media FX, Meletta, mikefx, mjunaid01, mmm, Moepi, Mogbolu Simeon, mznozary, Nane, naz11, nienhuis2214, niphon.n, nthusiw, oski, parallelnative, payco21, PGT, Phelyx, profitablemicheal112, q695421208, qihun, quintana, quoideneuf, Radz5000, rainer3770, rameshk2712, Ricardo Fernandes, robsonoliveira130, Rooks, rugira82, Ruslan06041980, sectordz, SERGH411, Shambhu Singh Dulawat, sidtune, snikrs, somesh1515, sri4you, star1600, Steen, Sunlike, SUPERBJMAX1688, ta srenevasan, tedtrader1, tempo_forex, test, Timeless, toso.alberto2, tradingralf, unmolesting, vankk, Victoriano, vinod gatkal, Vojtěch Macošek, vufx1972, wagner.mangolin, wanaib, warrbuff, wasi559, wasintoh, Wojciech Piotr WA, wto, xv16, Yasin Ipek, Yuri Frattale, Yuriy68, Yusouf, Yutthana Treewai, Zoltan0013, zorbafx69, Валерий Шкребтиенко, วรพงษ์ ชวาลเจริญชัย

NOTE: Only open-source Forex robots allowed to upload. Hacked or illegal versions of copyrighted Forex robots are highly prohibited on MT4talk.com. If you upload any illegal version of any copyrighted Forex robot, your forum account will be banned. No exceptions.

MT4talk is a User Generated Content website. All content uploaded to MT4talk by our users (MT4talk forum members) is User Generated Content.

All User-Generated Content shall be for information purposes only. While MT4talk shall endeavor to provide you with accurate information on its Website, MT4talk shall not be responsible for the accuracy or reliability of User Generated Content. As such you agree to access the Website and use the Services at your own risk. You shall be solely and exclusively responsible for all User Generated Content you upload or post on the Website. You hereby grant MT4talk (i) an irreversible, non-exclusive, royalty-free and fully-paid, worldwide license to reproduce, distribute, publicly display and perform, prepare derivative works of, incorporate into other works, and otherwise use and exploit your User Generated Content, and (ii) the right to include the User Generated Content on the Website.  You hereby irreversibly waive any claims and assertions of moral rights or attribution with respect to your User-Generated Content.

Only open source forex trading software used to automate online trading decisions/signals (“Forex Trading Robots”) shall be uploaded by you onto the Website. MT4talk prohibits the uploading of copyrighted, hacked or illegal versions of forex trading robots on to the Website. MT4talk may remove any copyrighted hacked or illegal versions of forex trading robots from its Website and may close your Member Account (defined below) should you upload copyrighted, hacked or illegal versions of forex trading robots on to the Website. Forex Trading Robots that have been uploaded on the Website, may undergo a simulated back-test on an actual forex account by our tester team, solely for the purposes of providing you with a starting point for your own back-test and for educational purposes only. 

To use the MT4talk forum, you must agree on the Terms of use and Privacy & Cookies Policy!


CFTC RULE 4.41 – HYPOTHETICAL OR SIMULATED PERFORMANCE RESULTS HAVE CERTAIN LIMITATIONS. UNLIKE AN ACTUAL PERFORMANCE RECORD, SIMULATED RESULTS DO NOT REPRESENT ACTUAL TRADING. ALSO, SINCE THE TRADES HAVE NOT BEEN EXECUTED, THE RESULTS MAY HAVE UNDER-OR-OVER COMPENSATED FOR THE IMPACT, IF ANY, OF CERTAIN MARKET FACTORS, SUCH AS LACK OF LIQUIDITY. SIMULATED TRADING PROGRAMS, IN GENERAL, ARE ALSO SUBJECT TO THE FACT THAT THEY ARE DESIGNED WITH THE BENEFIT OF HINDSIGHT. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFIT OR LOSSES SIMILAR TO THOSE SHOWN.

Disclaimer - No representation is being made that any Forex account will or is likely to achieve profits or losses similar to those shown on backtests in this forum. In fact, there are frequently sharp differences between hypothetical performance results and the actual results subsequently achieved by any particular trading program. Hypothetical trading does not involve financial risk, and no hypothetical trading record can completely account for the impact of financial risk in actual trading. All information on this forum is for educational purposes only and is not intended to provide financial advice. Any statements posted by forum members or the MT4talk EA Tester Team about profits or income expressed or implied, do not represent a guarantee. Your actual trading may result in losses as no trading system is guaranteed. You accept full responsibilities for your actions, trades, profit or loss, and agree to hold the MT4talk team and forum members of this information harmless in any and all ways.

Copyright MT4talk.com Forum Rules - Privacy Policy.