Need some help please

Place your new trading idea here to see if someone can automate it.
Post Reply
matty44
Posts: 2
Joined: Tue Dec 17, 2013 1:10 pm

Need some help please

Post by matty44 »

Hi all, I'm looking for an EA to do some very basic (in my opinion) tasks. Maybe one exists already that can do all of these, if that's the case, could someone please point me in the right direction? I'm currently using multiple EAs and some manual input to do the job, but would love to just "set it, and forget it."

Anyways, here's what I would like the EA to be able to do:

"Mandatory"
1) Place a trade everyday at a set time (for two currency pairs at the same time)
2) Set a SL and TP
3) Be able to move SL to BE at a set number of pips
4) Close the trades at a set time (if they have not already reached TP)

"Optional"
5) It would be nice to have an option to close both trades when a net amount of pips have been reached between the two trades (regardless if one has already hit its SL. I.E. Close trades if +50 combined pips. If one trade instantly hit 25 pip SL and closed itself, it would only close the other still active trade when it hit 75 pips...does that make sense? Basically a net pip amount for the day...)
6) I'd like the EA to adjust the size of my position each night to be a percentage of my total equity. I can always just set this manually each day, but, like I mentioned, with my strategy I'd like to be able to just set it and forget it.

Thanks!

Matty
User avatar
fxdaytrader
Trader
Posts: 190
Joined: Sun Jun 10, 2012 7:03 am
Location: Poon-Town (germany, se-asia, se-europe) ...

Re: Need some help please

Post by fxdaytrader »

matty44 wrote: 1) Place a trade everyday at a set time (for two currency pairs at the same time)
Just place a trade, no underlying rules (for example place trade if rsi>50)?

Most of all mptm or other ordermanager-eas should do.

Regarding the timebased SL I am not sure if it is now implemented in the manger-eas. Maybe you could use the following (to be called from the trademanager-section):

Code: Select all

void TimeBasedSL(string symbol,int magicnumber,int TimeBasedSLdays,bool TimeDesignationInDaysOrBars) {
bool result;
 for (int cnt=OrdersTotal()-1; cnt>=0; cnt--) {
  if (!OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES)) continue;
  if (OrderSymbol()!=symbol) continue;
  if (OrderMagicNumber()!=magicnumber) continue;
   {   
    if (
        (TimeDesignationInDaysOrBars && (TimeCurrent() - OrderOpenTime()) >= (TimeBasedSLdays * 86400))
     || (!TimeDesignationInDaysOrBars && (TimeCurrent() - OrderOpenTime()) >= (TimeBasedSLdays * Period() * 60))
    ) {
     while(IsTradeContextBusy()) Sleep(100);
     RefreshRates();
     string sdaysorbars="days";
     if (!TimeDesignationInDaysOrBars) sdaysorbars="bars";
     
     if (OrderType()==OP_BUY) {
      result=OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_BID),9999,CLR_NONE);
      Print("TimeBasedSL(): **** BUY order ticket "+OrderTicket()+" (opentime: "+TimeToStr(OrderOpenTime())+") closed (SL="+TimeBasedSLdays+" "+sdaysorbars+")");
     }
     if (OrderType()==OP_SELL) {
      result=OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_ASK),9999,CLR_NONE);
      Print("TimeBasedSL(): **** SELL order ticket "+OrderTicket()+" (opentime: "+TimeToStr(OrderOpenTime())+") closed (SL="+TimeBasedSLdays+" "+sdaysorbars+")");
     }
    }//if (TimeCurrent() - ...
   }
 }//for (int cnt=OrdersTotal()-1; cnt>=0; cnt--) {
}
matty44
Posts: 2
Joined: Tue Dec 17, 2013 1:10 pm

Re: Need some help please

Post by matty44 »

No rules, just place a buy/sell at certain time that I set. Where could I find this mptm? I have pretty much zero coding knowledge, so unless I can drag and drop it into my Empty4 expert advisors tab, I can't really use it...

Thanks for the response.

Matty
Eddie70
Posts: 1
Joined: Wed Dec 18, 2013 1:43 am

Re: Need some help please

Post by Eddie70 »

hello all first time here i have an Ea which needs correcting the codes anyone can help on this .

thnx
phil_trade

Re: Need some help please

Post by phil_trade »

Eddie70 wrote:hello all first time here i have an Ea which needs correcting the codes anyone can help on this .

thnx
Hi Eddie

welcome on board !

please publish your code and explain the problem. You will find someone to help you :yahoo:

cheers

Philippe
User avatar
fxdaytrader
Trader
Posts: 190
Joined: Sun Jun 10, 2012 7:03 am
Location: Poon-Town (germany, se-asia, se-europe) ...

Re: Need some help please

Post by fxdaytrader »

matty44 wrote:Where could I find this mptm?
Do you know GOOGLE (at least: NSA?) :xm:

mptm = "multi purpose trademanager", it is one of steves masterpieces :arrow:

here we go:
http://www.google.de/#q=site:stevehopwo ... m+%2B+mptm
and will land at this forum here ;)
Post Reply

Return to “Ideas for Possible Automation”