PipMaker v1 - Price action based EA - page 80

 
wingnuts:
I have this EA: PipMakerV5WINNER1itremd.ex4

and am trying to find out whether it is related to the other EAs discussed in this thread. When it trades, the EA puts in the comment "PipMaker v5 Neo" and I see Neo has been active in making changes to the EAs here, so that is a clue!

I would like to find out the heritage, how to best set it up, and whether it's the best version to be running. Getting access to the source would be nice too.

Can anyone shed any light on this EA? Thanks in advance.

Cheers, Trevor.

COuld u post the ea?

 

Well, no matter what methods are used to make profit, at some point things will go wrong, mostly due to big slopes in trend.

So best thing to do is to cut loses early.

I added some loss management for v10.

Adjust parameters to fit your pair, lot size, etc.

Give it a try.

External variables:

extern string LossManagement = "What to do if things are going wrong";

extern bool AllowRecovery = true; //enable/disable loss management

extern double MaxLoss = 5; //maximum loss in usd to trigger recovery

extern bool ExitAllTrades = true; //Close all open orders

extern bool StopTrading = true; //stop trading if loss management was triggered

extern bool PlaceRecoveryOrders = true; //Use counter orders to get in profit

extern int MaxRecoveryOrders = 2; //max extra orders to use for recovery

extern double RecoveryTakeProfit = 5; //take profit in points

extern double RecoveryStopLoss = 45; //stop loss in points

extern double RecoveryLotMultiplier = 10; //lot size is total buy or sell lots, depending wich type is loosing. Multiplier is used to get profit in specified RecoveryTakeProfit pips

[/PHP]

Add this outside start()

int RecoveryOrders(int RecTotal=0){

int cnt;

for(cnt=0;cnt<OrdersTotal();cnt++)

{

OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);

if(OrderMagicNumber() == Reference * 2 && OrderComment()=="Rec" && OrderSymbol()==Symbol())

RecTotal++;

}

return (RecTotal);

}[/PHP]

Add this before buy/sell criteria

[PHP] if(AllowRecovery)

{

int returnValue;

if(iMA(Symbol(),5,10,0,MODE_SMA,PRICE_CLOSE,0) < iMA(Symbol(),5,10,1,MODE_SMA,PRICE_CLOSE,1)) {returnValue=-1;} // Trade Direction Short

if(iMA(Symbol(),5,10,0,MODE_SMA,PRICE_OPEN,0) > iMA(Symbol(),5,10,1,MODE_SMA,PRICE_OPEN,1)) {returnValue=1;} // Trade Direction Long

if(RecReverse) returnValue=-returnValue; //If for some reason consider necessary to invert direction

if(SellProfit<=-MaxLoss)

{

NoSell=true; //Do not allow to place more losing orders

NoBuy=false;

if(ExitAllTrades) ExitAllTrades(Aqua,"Sell profit going under max allowed loss");

if(PlaceRecoveryOrders && RecoveryOrders() < MaxRecoveryOrders)

{

if(returnValue == 1) OrderSend(Symbol(), OP_BUY, SellLots*RecoveryLotMultiplier, Ask, Slippage, Ask - RecoveryStopLoss * Point, Ask + RecoveryTakeProfit * Point, "Rec", Reference*2,0, Green);

if(returnValue == -1)OrderSend(Symbol(), OP_SELL, SellLots*RecoveryLotMultiplier, Bid, Slippage, Bid + RecoveryStopLoss * Point, Bid - RecoveryTakeProfit * Point, "Rec", Reference*2,0, Red);

if(StopTrading) CeaseTrading=true;

}

}

if(BuyProfit<=-MaxLoss)

{

NoBuy=true; //Do not allow to place more losing orders

NoSell=false;

if(ExitAllTrades)ExitAllTrades(Aqua,"Buy profit going under max allowed loss");

if(PlaceRecoveryOrders && RecoveryOrders() < MaxRecoveryOrders){

if(returnValue == -1)OrderSend(Symbol(), OP_SELL, BuyLots*RecoveryLotMultiplier, Bid, Slippage, Bid + RecoveryStopLoss * Point, Bid - RecoveryTakeProfit * Point, "Rec", Reference*2,0, Red);

if(returnValue == 1) OrderSend(Symbol(), OP_BUY, BuyLots*RecoveryLotMultiplier, Ask, Slippage, Ask - RecoveryStopLoss * Point, Ask + RecoveryTakeProfit * Point, "Rec", Reference*2,0, Green);

if(StopTrading) CeaseTrading=true;

}

}

}

And, finally add this to sell and buy criteria:

[PHP]if(NoBuy) BuyMe = false;

if(NoSell) SellMe = false;
 

hi duyduy, here is the stable pipmaker version you asked for, if you could "see" the logics inside, (only .ex4 file), please let me know, thanks.

duyduy:
COuld u post the ea?
 

Hi Enforcer, thanks for your loss management codes, will you please show how and where to add reverse signal for v10?

Enforcer:
Well, no matter what methods are used to make profit, at some point things will go wrong, mostly due to big slopes in trend.

So best thing to do is to cut loses early.

I added some loss management for v10.

Adjust parameters to fit your pair, lot size, etc.

Give it a try.

External variables:

extern string LossManagement = "What to do if things are going wrong";

extern bool AllowRecovery = true; //enable/disable loss management

extern double MaxLoss = 5; //maximum loss in usd to trigger recovery

extern bool ExitAllTrades = true; //Close all open orders

extern bool StopTrading = true; //stop trading if loss management was triggered

extern bool PlaceRecoveryOrders = true; //Use counter orders to get in profit

extern int MaxRecoveryOrders = 2; //max extra orders to use for recovery

extern double RecoveryTakeProfit = 5; //take profit in points

extern double RecoveryStopLoss = 45; //stop loss in points

extern double RecoveryLotMultiplier = 10; //lot size is total buy or sell lots, depending wich type is loosing. Multiplier is used to get profit in specified RecoveryTakeProfit pips

[/PHP]

Add this outside start()

int RecoveryOrders(int RecTotal=0){

int cnt;

for(cnt=0;cnt<OrdersTotal();cnt++)

{

OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);

if(OrderMagicNumber() == Reference * 2 && OrderComment()=="Rec" && OrderSymbol()==Symbol())

RecTotal++;

}

return (RecTotal);

}[/PHP]

Add this before buy/sell criteria

[PHP] if(AllowRecovery)

{

int returnValue;

if(iMA(Symbol(),5,10,0,MODE_SMA,PRICE_CLOSE,0) < iMA(Symbol(),5,10,1,MODE_SMA,PRICE_CLOSE,1)) {returnValue=-1;} // Trade Direction Short

if(iMA(Symbol(),5,10,0,MODE_SMA,PRICE_OPEN,0) > iMA(Symbol(),5,10,1,MODE_SMA,PRICE_OPEN,1)) {returnValue=1;} // Trade Direction Long

if(RecReverse) returnValue=-returnValue; //If for some reason consider necessary to invert direction

if(SellProfit<=-MaxLoss)

{

NoSell=true; //Do not allow to place more losing orders

NoBuy=false;

if(ExitAllTrades) ExitAllTrades(Aqua,"Sell profit going under max allowed loss");

if(PlaceRecoveryOrders && RecoveryOrders() < MaxRecoveryOrders)

{

if(returnValue == 1) OrderSend(Symbol(), OP_BUY, SellLots*RecoveryLotMultiplier, Ask, Slippage, Ask - RecoveryStopLoss * Point, Ask + RecoveryTakeProfit * Point, "Rec", Reference*2,0, Green);

if(returnValue == -1)OrderSend(Symbol(), OP_SELL, SellLots*RecoveryLotMultiplier, Bid, Slippage, Bid + RecoveryStopLoss * Point, Bid - RecoveryTakeProfit * Point, "Rec", Reference*2,0, Red);

if(StopTrading) CeaseTrading=true;

}

}

if(BuyProfit<=-MaxLoss)

{

NoBuy=true; //Do not allow to place more losing orders

NoSell=false;

if(ExitAllTrades)ExitAllTrades(Aqua,"Buy profit going under max allowed loss");

if(PlaceRecoveryOrders && RecoveryOrders() < MaxRecoveryOrders){

if(returnValue == -1)OrderSend(Symbol(), OP_SELL, BuyLots*RecoveryLotMultiplier, Bid, Slippage, Bid + RecoveryStopLoss * Point, Bid - RecoveryTakeProfit * Point, "Rec", Reference*2,0, Red);

if(returnValue == 1) OrderSend(Symbol(), OP_BUY, BuyLots*RecoveryLotMultiplier, Ask, Slippage, Ask - RecoveryStopLoss * Point, Ask + RecoveryTakeProfit * Point, "Rec", Reference*2,0, Green);

if(StopTrading) CeaseTrading=true;

}

}

}

And, finally add this to sell and buy criteria:

[PHP]if(NoBuy) BuyMe = false;

if(NoSell) SellMe = false;
 
sivach:
hi duyduy, here is the stable pipmaker version you asked for, if you could "see" the logics inside, (only .ex4 file), please let me know, thanks.

Thanks sivach, you beat me to it.

 

Glad to help

wingnuts:
Thanks sivach, you beat me to it.
 
sivach:
hi duyduy, here is the stable pipmaker version you asked for, if you could "see" the logics inside, (only .ex4 file), please let me know, thanks.

can't see anything in ex4 file

 
sivach:
Hi Enforcer, thanks for your loss management codes, will you please show how and where to add reverse signal for v10?

Reverse option is left there for testing.

Normally if buys are losing place a sell order and vice versa.

Direction of recovery order is decided by a simple MA and it seems to work better then just placing sell order for buys in loss and buy order for sells in loss.

Also is better to stop trading after placing recovery order since these may go wrong too.

For example with loss management turned on I made 17$ profit for a day, without it I made -77$ profit and a floating PL of -800$.

I put a stop loss at 200 for normal orders, without any stop loss account crash due to margin call.

So pick what option you like

Most EAa are concern how to get bigger profit and don't pay too much attention on loss management, that's why most of them will empty your account sooner or later.

 

Thank you Enforcer.

 

Some quick tests and mq4 file.

Default settings for GPBUSD.

First file is report for this month with Loss Management turned on, second is default v10.

Reason: