PipMaker v1 - Price action based EA - page 66

 

your help is really helpfull

@waltini

Thanks for your clear explanation. You got the point!

 
matrixebiz:
What settings? Thanks

here is my setting for GU oNLY

Minimum balance is $1500

Trade Long Only or Short Only

I decide it manually

I use pipmaker v mod4c as a tool to manage TP.

I thinks this version will be great cause have SL

TradeShort=0

TradeLong=1

UseDPO=0

UseSniper=0

LotSize=0.10000000

LotIncrement=0.10000000

Multiplier=0.00000000

ProfitTarget=14

OpenOnTick=1

Spacing=10

TrendSpacing=1000

CounterTrendMultiplier=1.00000000

CloseDelay=0

CeaseTrading=0

PasueTrading=Pause Trading at Timeinterval

StartTime=0

EndTime=0

QuitTrading=Quit Trading at Time

endDayHourMinute=0

RightSideLabel=1

SessionTarget=35

MaximumBuyOrders=5

MaximumSellOrders=5

SLTotalinDollar=350.00000000

 

I haven't forward testing the mod 4c yet, but is it true that once the session profit reached the EA stops instead of reaching another session profit target?

 
waltini:
Tiger Wong, thanks for the fantastic job you are doing and maybe I can help a little.

Matrixebiz, if you have Trade Long = true and Use Sniper = true, the ea will only place trades when the Sniper is above zero. Trades above the first trade will be placed at trend intervals when the Sniper is above zero or green.

Below the first trade the price must be at least "spacing" pips away and the Sniper must be above zero. So if the price trended down strongly by 100 pips and the 1 minute sniper never got above zero, no further trades would be placed. As soon as the sniper pops its head above zero and it is more than "spacing" below the lowest buy it will place the next trade.

If you have TradeLong = true and TradeShort = false it will only ever place Long trades regardless of what any of the indicators are saying.

Ok, thanks for that. Do you recommend using the indicators? or just turn them off and let the EA trade normally? Not really familiar with these indicators.

 

no it doesent wor and here is what i can download.I try to compile that in metatreder editor but there are some faults and i dont know how to repaire.

However thanks for ansver.At the moment i am play with version 9.1 what i download and for now result is awsom.

//+--------------------------------------------------+ //|PipMaker v5 Neo Last Update 06-27-2007 01:05am | //+--------------------------------------------------+ #include #include #define NL "\n" // Regular variables //extern bool AverageDown = false; extern int AverageDown = 0; extern double LotSize = 0.01; extern double LotIncrement = 1.01; //extern bool Multiplier = true; extern int Multiplier = 0; extern double TargetReducer = 0.75; extern int ProfitTarget = 50; //extern bool OpenOnTick = false; extern int OpenOnTick = 0; extern int Spacing = 2; extern int TrendSpacing = 1; extern double CounterTrendMultiplier = 2; extern double CloseDelay = 91; extern int TrendTimeFrame = PERIOD_M1; extern int TrendPeriods = 1200; extern bool CeaseTrading = false; // Internal settings int Step = 1; int Error = 0; int Order = 0; int Orders = 1; int Slippage = 0; int Reference = 0; string TradeComment = "PipMaker v5 Neo"; datetime BarTime = 0; static bool TradeAllowed = true; double TickPrice = 0; int MaxBuys = 0; int MaxSells = 0; bool Auditing = true; string Filename = "PipMaker.txt"; int init() { if (Symbol() == "AUDCADm" || Symbol() == "AUDCAD") Reference = 801001; if (Symbol() == "AUDJPYm" || Symbol() == "AUDJPY") Reference = 801002; if (Symbol() == "AUDNZDm" || Symbol() == "AUDNZD") Reference = 801003; if (Symbol() == "AUDUSDm" || Symbol() == "AUDUSD") Reference = 801004; if (Symbol() == "CHFJPYm" || Symbol() == "CHFJPY") Reference = 801005; if (Symbol() == "EURAUDm" || Symbol() == "EURAUD") Reference = 801006; if (Symbol() == "EURCADm" || Symbol() == "EURCAD") Reference = 801007; if (Symbol() == "EURCHFm" || Symbol() == "EURCHF") Reference = 801008; if (Symbol() == "EURGBPm" || Symbol() == "EURGBP") Reference = 801009; if (Symbol() == "EURJPYm" || Symbol() == "EURJPY") Reference = 801010; if (Symbol() == "EURUSDm" || Symbol() == "EURUSD") Reference = 801011; if (Symbol() == "GBPCHFm" || Symbol() == "GBPCHF") Reference = 801012; if (Symbol() == "GBPJPYm" || Symbol() == "GBPJPY") Reference = 801013; if (Symbol() == "GBPUSDm" || Symbol() == "GBPUSD") Reference = 801014; if (Symbol() == "NZDJPYm" || Symbol() == "NZDJPY") Reference = 801015; if (Symbol() == "NZDUSDm" || Symbol() == "NZDUSD") Reference = 801016; if (Symbol() == "USDCHFm" || Symbol() == "USDCHF") Reference = 801017; if (Symbol() == "USDJPYm" || Symbol() == "USDJPY") Reference = 801018; if (Symbol() == "USDCADm" || Symbol() == "USDCAD") Reference = 801019; if (Reference == 0) Reference = 801999; } int deinit() { } void CloseBuysInProfit() { double BuyProfit, LastBuyTime; RefreshRates(); for (Order = OrdersTotal() - 1; Order >= 0; Order--) { if (OrderSelect(Order, SELECT_BY_POS, MODE_TRADES)) { if (OrderSymbol() == Symbol() && OrderMagicNumber() == Reference && OrderType() == OP_BUY) { BuyProfit = OrderProfit() + OrderSwap() + OrderCommission(); if (OrderOpenTime() > LastBuyTime) LastBuyTime = OrderOpenTime(); if ((IsTesting() || TimeCurrent() - LastBuyTime >= CloseDelay) && BuyProfit > 0) OrderClose(OrderTicket(), OrderLots(), Bid, 5, Green); Error = GetLastError(); if (Error != 0) Write("Error closing BUY order " + OrderTicket() + ": " + ErrorDescription(Error) + " (A" + Error + ") Lots:" + OrderLots() + " Bid:" + MarketInfo(OrderSymbol(), MODE_BID)); } } } return; } void CloseSellsInProfit() { double SellProfit, LastSellTime; RefreshRates(); for (Order = OrdersTotal() - 1; Order >= 0; Order--) { if (OrderSelect(Order, SELECT_BY_POS, MODE_TRADES)) { if (OrderSymbol() == Symbol() && OrderMagicNumber() == Reference && OrderType() == OP_SELL) { SellProfit = OrderProfit() + OrderSwap() + OrderCommission(); if (OrderOpenTime() > LastSellTime) LastSellTime = OrderOpenTime(); if ((IsTesting() || TimeCurrent() - LastSellTime >= CloseDelay) && SellProfit > 0) OrderClose(OrderTicket(), OrderLots(), Ask, 5, Red); Error = GetLastError(); if (Error != 0) Write("Error closing SELL order " + OrderTicket() + ": " + ErrorDescription(Error) + " (B" + Error + ") Lots:" + OrderLots() + " Ask:" + MarketInfo(OrderSymbol(), MODE_ASK)); } } } return; } void PlaceBuyOrder() { double BuyOrders, Lots; double LowestBuy = 1000, HighestBuy; if (BarTime != Time[0]) { BarTime = Time[0]; TickPrice = 0; TradeAllowed = true; } RefreshRates(); for (Order = OrdersTotal() - 1; Order >= 0; Order--) { if (OrderSelect(Order, SELECT_BY_POS, MODE_TRADES)) { if (OrderSymbol() == Symbol() && OrderMagicNumber() == Reference && OrderType() == OP_BUY) { if (OrderOpenPrice() HighestBuy) HighestBuy = OrderOpenPrice(); BuyOrders++; } } } if (TradeAllowed) { if (Ask >= HighestBuy + (TrendSpacing * Point)) { // if (Multiplier) if (Multiplier == 1) Lots = NormalizeDouble(LotSize * (MathPow(LotIncrement, BuyOrders) / Orders), 2); else Lots = NormalizeDouble(LotSize + ((LotIncrement * BuyOrders) / Orders), 2); } if (Ask = 0; Order--) { if (OrderSelect(Order, SELECT_BY_POS, MODE_TRADES)) { if (OrderSymbol() == Symbol() && OrderMagicNumber() == Reference && OrderType() == OP_SELL) { if (OrderOpenPrice() > HighestSell) HighestSell = OrderOpenPrice(); if (OrderOpenPrice() < LowestSell) LowestSell = OrderOpenPrice(); SellOrders++; } } } if (TradeAllowed) { if (Bid = HighestSell + (Spacing * Point)) { // if (Multiplier) if (Multiplier == 1) Lots = NormalizeDouble(LotSize * CounterTrendMultiplier * (MathPow(LotIncrement, SellOrders) / Orders), 2); else Lots = NormalizeDouble((LotSize * CounterTrendMultiplier) + ((LotIncrement * SellOrders) / Orders), 2); } if (Lots == 0) { // if (Multiplier) if (Multiplier == 1) Lots = NormalizeDouble(LotSize * CounterTrendMultiplier, 2); else Lots = NormalizeDouble(LotSize, 2); } OrderSend(Symbol(), OP_SELL, Lots, Bid, Slippage, 0, 0, TradeComment, Reference, Red); Error = GetLastError(); if (Error != 0) Write("Error opening SELL order: " + ErrorDescription(Error) + " (D" + Error + ") Bid:" + Bid + " Slippage:" + Slippage); else { TickPrice = Close[0]; TradeAllowed = false; } } } int start() { double MarginPercent; static double LowMarginPercent = 10000000, LowEquity = 10000000; double BuyPipTarget, SellPipTarget; int SellOrders, BuyOrders; double BuyPips, SellPips, BuyLots, SellLots; double LowestBuy = 999, HighestBuy = 0.0001, LowestSell = 999, HighestSell = 0.0001, HighPoint, MidPoint, LowPoint; double Profit = 0, BuyProfit = 0, SellProfit = 0, PosBuyProfit = 0, PosSellProfit = 0; int HighestBuyTicket, LowestBuyTicket, HighestSellTicket, LowestSellTicket; double HighestBuyProfit, LowestBuyProfit, HighestSellProfit, LowestSellProfit; double CurrentTime = (TimeHour(CurTime() + TimeMinute(CurTime()))); double Trend; bool SELLme = false; bool BUYme = false; double Margin = MarketInfo(Symbol(), MODE_MARGINREQUIRED); string Message; for (Order = OrdersTotal() - 1; Order >= 0; Order--) { if (OrderSelect(Order, SELECT_BY_POS, MODE_TRADES)) { if (OrderSymbol() == Symbol() && OrderMagicNumber() == Reference) { Profit = OrderProfit() + OrderSwap() + OrderCommission(); if (OrderType() == OP_BUY) { if (OrderOpenPrice() >= HighestBuy) { HighestBuy = OrderOpenPrice(); HighestBuyTicket = OrderTicket(); HighestBuyProfit = Profit; } if (OrderOpenPrice() MaxBuys) MaxBuys = BuyOrders; BuyLots += OrderLots(); BuyProfit += Profit; if (Profit > 0) PosBuyProfit += Profit; } if (OrderType() == OP_SELL) { if (OrderOpenPrice() <= LowestSell) { LowestSell = OrderOpenPrice(); LowestSellTicket = OrderTicket(); LowestSellProfit = Profit; .etc...

 

That is the question

matrixebiz:
Ok, thanks for that. Do you recommend using the indicators? or just turn them off and let the EA trade normally? Not really familiar with these indicators.

Hi Matrixebiz, that is the million dollar question, there is no doubt that the ea has great potential. Essentially it is a more sophisticated 10.3. with the same potential for damage.

Perhaps duyduy can best answer you, he is the forward testing guru. I am still playing with the backtester and experimenting going long and short on correlated currencies.

 
waltini:
Hi Matrixebiz, that is the million dollar question, there is no doubt that the ea has great potential. Essentially it is a more sophisticated 10.3. with the same potential for damage. Perhaps duyduy can best answer you, he is the forward testing guru. I am still playing with the backtester and experimenting going long and short on correlated currencies.

Yeah, I knew this was different than 10.3 but when I saw it do straight martingale this week on EUR/JPY I thought I did something wrong. It would be great for the EA to open opposite direction trades when EA is going against you, like Hedging, cover some of the losses or turning into winning ProfitTarget if trend doesn't reverse back in your favor.

also, is there a DPO Indicator that I can attach to a chart to see what it's doing?

 

Time to do some code reading

matrixebiz:
Yeah, I knew this was different than 10.3 but when I saw it do straight martingale this week on EUR/JPY I thought I did something wrong. It would be great for the EA to open opposite direction trades when EA is going against you, like Hedging, cover some of the losses or turning into winning ProfitTarget if trend doesn't reverse back in your favor. also, is there a DPO Indicator that I can attach to a chart to see what it's doing?

Hi Matrixebiz, I believe the general consensus is to either go long or short only. To achieve hedging take the opposite position in another correlated currency or the same currency(different chart). By having trades with the trend closer together and trades against the trend further apart, hopefully any losses taken by trades against the trend will quickly be overcome by the other currency. This strategy was mentioned by someone else and is not my idea.

A quick look at the code looks to me like someone(probably tiger wong) has named the indicator which is a 2 period linear weighted moving average(30 min timeframe), using a weighted close and using the current bar which is being formed. This indicator is one of the set of indicators provided with metatrader, just use a moving average and put in the parameters.

In this case for a long trade the moving average must be above the open price for the day for any long trades to be taken if DPO=true.

 

forward testing

this ea looks really good from what i'v read so far.

how do u really carryout the forward testing.

 
matrixebiz:
Ok, thanks for that. Do you recommend using the indicators? or just turn them off and let the EA trade normally? Not really familiar with these indicators.
waltini:
Hi Matrixebiz, that is the million dollar question, there is no doubt that the ea has great potential. Essentially it is a more sophisticated 10.3. with the same potential for damage. Perhaps duyduy can best answer you, he is the forward testing guru. I am still playing with the backtester and experimenting going long and short on correlated currencies.

Thanks waltini, but I'm not guru

To matrixebiz

I already forward test it using FXSniper or DPO or both of them on

from m1 till m30 timeframe.. And in the long run it give very large DD

So I turn it off in this time forward test..

And I decide it manually for long and short.

Reason: