This EA needs a break even setting
Results 1 to 8 of 8

Thread: This EA needs a break even setting

  1. #1

    This EA needs a break even setting

    The algorithm on this EA is profitable on some instances.
    To reduce the losses it needs a breakeven setting.
    Something like when price reached 100 pips, quits move to breakeven.

    Additionally some cash management setting would be fine where lot size is calculated as percentage of your available margin, not account total!

    The current one, since you can see, is disabled due to 130 errors.

    Thank you!

  2. #2
    Thank you Hayseed, that seems terrific.

    I will try them at the backtester.
    This may also be utilized as a really good template and everything you have to do is change the trading algorithm.

    Thanks again!

  3. #3
    hey pippin.... Might need more than simply breakeven....

    Fixed sell order error, now places sells.... Altered money direction, now accurate risk ratio.... Additional breakeven....

    Possibly consider higher interval filter...h

  4. #4
    Quote Originally Posted by ;
    hello pippin.... May need more than simply breakeven....

    Mended sell order error, today places sells.... Changed money management, today true risk ratio.... Additional breakeven....

    Perhaps consider increased timeframe filter...h
    Thanks guy! That's a great improvement.

    I have something else that I was playing around with.

    I want to open many orders. All orders need to include up to the maximum risk ratio and each order needs a different target.

    Something such as:

    uselots = lots/2;
    ticket = OrderSend(Symbol(), OP_BUY, uselots, NormalizeDouble(Ask,4), slippage, realSL, realTP, nameEA, 16384,0,Red);
    ticket1 = OrderSend(Symbol(), OP_BUY, uselots, NormalizeDouble(Ask,4), slippage, realSL, realTP1, nameEA, 16384,0,Red);
    Subsequently, when you're checking your orders:
    if(totalOrders ==1)

    OrderModify(OrderTicket(),OrderOpenPrice(),OrderOp enPrice(), OrderTakeProfit(),0,Blue);

    Have a TP on the very first order of X pips, and when it is hit, you'll only have one order on and modify that order so that the SL = the Order Open Price

    Now as you see I will read and change existing code, but do not know where to place this new code. Part of this procedure is learning how to code.

    Thanks for your aid.
    I shall also create this EA available on my site:
    If you donate you need to set your name or logo or email in the EA.

    A higher timeframe blocker, any ideas?
    It's not easy to rule out horizontal market entrances completely. Perhaps a volatility indior. I will play around with some and see.
    Greatest is to keep the EA setting on guide approve and use it in combination with some means to determine horizontal markets.

    Also the stop, I am utilizing the 50MA when the tp's aren't attained. 50MA is a fantastic resistance but am searching for better ones.
    Welles Wilder's volatility stop might be a great one, or maybe even the SAR.
    Again, testing is required.
    However, I feel that today we've got a b/e setting we could lessen the amount of losing trade considerably.

  5. #5
    Here I've got the modified EA using some pseudo code to start multiple lots and order alteration.
    Also I've a stoploss calculation based on the most recent low in pseudocode.

    Could you please take a look?

  6. #6
    Hello pippin.... May be better to just settle to a lot size that your comfortable with rather than splitting the risk.... It'll avoid future unseen problems....

    To transfer staying orders to breakeven after initial profit target has been hit, substitute breakeven with tp from the 4 places from the ea...h

    Inserted Code //-- sell conditions if((Close#91;1#93; lt; al1) (st2gt;20) (st1lt;20)) OrderSend(Symbol(),OP_SELL,LotsOptimized(),Bid,3,( Bid sl*Stage),(Bid-tp*Stage),,MAGICMA,0,Red); OrderSend(Symbol(),OP_SELL,LotsOptimized(),Bid,3,( Bid sl*Stage),(Bid-tp2*Stage),,MAGICMA,0,Red); OrderSend(Symbol(),OP_SELL,LotsOptimized(),Bid,3,( Bid sl*Stage),(Bid-tp3*Stage),,MAGICMA,0,Red); return; //-- buy conditions if((Close#91;1#93; gt; al1) (st2lt;80) (st1gt;80)) OrderSend(Symbol(),OP_BUY,LotsOptimized(),Ask,3,(A sk-sl*Stage),(Ask tp*Stage),,MAGICMA,0,Blue); OrderSend(Symbol(),OP_BUY,LotsOptimized(),Ask,3,(A sk-sl*Stage),(Ask tp2*Stage),,MAGICMA,0,Blue); OrderSend(Symbol(),OP_BUY,LotsOptimized(),Ask,3,(A sk-sl*Stage),(Ask tp3*Stage),,MAGICMA,0,Blue); return; //--

    Inserted Code if(UseBreakeven) for(int I=0;ilt;OrdersTotal();I ) if(OrderSelect(I,SELECT_BY_POS,MODE_TRADES)==false ) break; if(OrderSymbol() !) = Symbol() }

  7. #7
    Here it's Hayseed.
    I open 2 orders instead of 3, and b/e functions on both.
    It runs without any difficulties.

    Thanks for your help!

  8. #8
    Here is the chart.
    Drawdown maximum 15%. Pretty Impressive

    Need to optimize a little more but it looks very promising...

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. Read more.