Aggressive scalp ea - page 73

 

Wow, wtf.

All I did was add in some error checking from another EA when it opens a buy or sell, and now it works fine. Which makes no sense, because the fundamental buy and sell OrderSend() data was not changed.

Here's what I changed:

gi_ticket_number = OrderSend(Symbol(), OP_BUY, ldLot, Ask, Slippage, 0, 0, Name_Expert, magic_number, 0, clOpenBuy);

if(gi_ticket_number > 0){

if(OrderSelect(gi_ticket_number, SELECT_BY_TICKET)) Print("Buy order opened: " ,OrderOpenPrice());

}

else Print("Error opening buy: " , GetLastError());

[/CODE]

and

[CODE]

gi_ticket_number = OrderSend(Symbol(), OP_SELL, ldLot, Bid, Slippage, 0, 0, Name_Expert, magic_number, 0, clOpenSell);

if(gi_ticket_number > 0){

if(OrderSelect(gi_ticket_number, SELECT_BY_TICKET)) Print("Sell order opened: " ,OrderOpenPrice());

}

else Print("Error opening sell: " , GetLastError());

Before, they were both formatted with no error checking. I'll have to try it with all the other brokers it didn't work for now.

 
hoisijd:
Wow, wtf.

All I did was add in some error checking from another EA when it opens a buy or sell, and now it works fine. Which makes no sense, because the fundamental buy and sell OrderSend() data was not changed.

Here's what I changed:

gi_ticket_number = OrderSend(Symbol(), OP_BUY, ldLot, Ask, Slippage, 0, 0, Name_Expert, magic_number, 0, clOpenBuy);

if(gi_ticket_number > 0){

if(OrderSelect(gi_ticket_number, SELECT_BY_TICKET)) Print("Buy order opened: " ,OrderOpenPrice());

}

else Print("Error opening buy: " , GetLastError());

[/CODE]

and

[CODE]

gi_ticket_number = OrderSend(Symbol(), OP_SELL, ldLot, Bid, Slippage, 0, 0, Name_Expert, magic_number, 0, clOpenSell);

if(gi_ticket_number > 0){

if(OrderSelect(gi_ticket_number, SELECT_BY_TICKET)) Print("Sell order opened: " ,OrderOpenPrice());

}

else Print("Error opening sell: " , GetLastError());

Before, they were both formatted with no error checking. I'll have to try it with all the other brokers it didn't work for now.

You have to use Modify:

gi_ticket_number = OrderSend(Symbol(), OP_BUY, ldLot, Ask, Slippage, 0, 0, Name_Expert, magic_number, 0, clOpenBuy);

OrderSelect(gi_ticket_number, SELECT_BY_TICKET);

OrderModify(OrderTicket(), OrderOpenPrice(), ldStop, ldTake, 0, Blue);

 
olimpia:
SL: 500

TP: 200

TS: 40

Lots: whatever depends your account.. maybe 0.1 or 0.01 or 1

Max Lots: just 3

Good results in extrategy tester in M1, M5, m15, m30

Alpari.. 03 january to 18 february 2011

Have a goo day mates!

Robert from Paraguay!

Let me ask you some questions, ok?

1) What version of Es-capelast Reversed ECN do you use? 1.01 or 1.04?

2) What is TS?

3) What pair(s) do you trade?

Thanks

Michal from Czech Republic

 
Bongo:
You have to use Modify:

gi_ticket_number = OrderSend(Symbol(), OP_BUY, ldLot, Ask, Slippage, 0, 0, Name_Expert, magic_number, 0, clOpenBuy);

OrderSelect(gi_ticket_number, SELECT_BY_TICKET);

OrderModify(OrderTicket(), OrderOpenPrice(), ldStop, ldTake, 0, Blue);

Yeah I figured that out too, what I did works, but the values for stoploss and takeprofit aren't set in that OrderSend() call. It sets takeprofit and stoploss in another part of the ea i've modified.

Thanks for insights though bongo.

 
hoisijd:
Yeah I figured that out too, what I did works, but the values for stoploss and takeprofit aren't set in that OrderSend() call. It sets takeprofit and stoploss in another part of the ea i've modified. Thanks for insights though bongo.

Change modify to:

for buy:

OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice() - StopLoss * Point,OrderOpenPrice() + TakeProfit * Point,0,Blue);

For sell:

OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice()+StopLoss*Point,OrderOpenPrice() - TakeProfit * Point,0,Red);

}

Before the start you have to put:

extern int StopLoss=0;

extern int TakeProfit= 90;

...

It is easy way.

 
daffi:
Let me ask you some questions, ok?

1) What version of Es-capelast Reversed ECN do you use? 1.01 or 1.04?

2) What is TS?

3) What pair(s) do you trade?

Thanks

Michal from Czech Republic

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Hi michael..

Was the FIRST escapev2.mq4

Tested With EURUSD

Id like to know if somebody can add a TIME filter to this EA..

Files:
escapev2.mq4  5 kb
 
olimpia:
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Hi michael..

Was the FIRST escapev2.mq4

Tested With EURUSD

Id like to know if somebody can add a TIME filter to this EA..

extern string gsTimeFilter="------Time Filter Parameters-----";

extern bool TradeOnSunday=false;//|---------------time filter on sunday

extern bool MondayToThursdayTimeFilter=true;//|-time filter the week

extern int MondayToThursdayStartHour=0;//|-------start hour time filter the week

extern int MondayToThursdayEndHour=24;//|--------end hour time filter the week

extern bool FridayTimeFilter=false;//|-----------time filter on friday

extern int FridayStartHour=0;//|-----------------start hour time filter on friday

extern int FridayEndHour=21;//|------------------end hour time filter on friday

extern bool close_all_trades=FALSE;//|-----------close all open trades ouside of filtered times

extern string gsTimeFilterEnd="--End of Time Filter Parameters--";

Go to es_capeler reverced..._v1.03

 
olimpia:
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Hi michael..

Was the FIRST escapev2.mq4

Tested With EURUSD

Id like to know if somebody can add a TIME filter to this EA..

What is the TS?

 
daffi:
What is the TS?

TS: ItrailingStop and Trailing Stop

 

es_capelast_reversed_ECN_v1.06

Here is version 1.06 of Escape. This version has a better time filter where up to three trading times may be enabled. This version also has solid trade placement code that should make error 130 a thing of the past (except when back-testing as the code is not used during back tests).

Installation:

Open the zip file and place the files in the following locations:

es_capelast_reversed_ECN_v1.06.mq4 into the metatrader\experts\ folder.

LibOrderReliable.mq4 into the metatrader\experts\libraries\ folder.

LibOrderReliable.mqh into the metatrader\experts\include\ folder.

TradeContext.mqh into the metatrader\experts\include\ folder.

Good luck.

Files: