mGRID v.7 - Trailing Stop code
Results 1 to 2 of 2

Thread: mGRID v.7 - Trailing Stop code

  1. #1
    1 Attachment(s) Hi,

    Can anyone add a trailing stop feature to the subsequent EA?

    It is a grid system that uses a user defined variety of levels to place incremental pending orders in either direction of the current market price or a particular time, depending on the amount of pips you opt for each degree.

    If a person can add a trailing stop feature for many orders, this can be a very helpful egy.
    https://www.forexforum.co.za/trading...pa-thread.html

  2. #2
    1 Attachment(s) Additionally, if it's likely to incorporate the MoneyManagement system in the subsequent EA to the MGrid as well, which will be excellent. .

    Lines 72-75 226-227 509-529

    Inserted Code extern double Lots = 1; extern bool MM = false, //Use Money Management or not FromBalance = false; //Use Balance instead of Margin extern int Risk = 10; //10%
    Inserted Code //----------------------- ADJUST LOTS IF USING MONEY MANAGEMENT if(MM)CalculateMM();
    Inserted Code void CalculateMM() double MinLots=MarketInfo(Symbol(),MODE_MINLOT); double MaxLots=MarketInfo(Symbol(),MODE_MAXLOT); if(FromBalance==false) Lots=AccountFreeMargin()/100000*Risk; else if(FromBalance==true) Lots=AccountBalance()/100000*Risk; Lots=MathMin(MaxLots,MathMax(MinLots,Lots)); should(MinLotslt;0.1)Lots=NormalizeDouble(Lots,2); else if(MinLotslt;1)Lots=NormalizeDouble(Lots,1); otherwise Lots=NormalizeDouble(Lots,0); if(Lotslt;MinLots)Lots=MinLots; should(Lotsgt;MaxLots)Lots=MaxLots; https://www.forexforum.co.za/general...ty-knocks.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.