PipMaker v1 - Price action based EA - page 35

 

Today I was trading USDJPY and I was making money at an amazing rate until the market turned and then I was losing it equally as quickly !

Is there a way to implement a type of trailing stop to stop trading once drawdown gets to half of profit earnt for example?

 

Post 100 EA already has SL and TP feature, but

the custom indicator he used did not work properly (it gives error in the journal).

don_forex:
I am noticing that losing trades are not always being closed. That is why I am working on changing the logic to include the OrderModify() to place the losing StopLoss and winning TakeProfit. This would ensure that the losing trades would in fact be closed when they are supposed to be closed.

I have, on a couple of occasions, stated the fact that keeping the LowMargin as high as possible in the key to success! That means, only one pair if necessary, a higher spacing requirement, lower profit targets, etc, etc... one is correct in saying you MUST play with the system. Tweak the parameters! Don't be afraid to try something new!!!

Don
 
manz66:
the custom indicator he used did not work properly (it gives error in the journal).

That isn't quite the same logic that I am looking at... What my idea entails is calculating the price that reaches the profit target, then place a stoploss and takeprofit on only the orders that are effected by the current profit target (positive orders and losing order) when the price is the minimum price away from the target in order to be able to set the modifications...

Don

 
don_forex:
That isn't quite the same logic that I am looking at... What my idea entails is calculating the price that reaches the profit target, then place a stoploss and takeprofit on only the orders that are effected by the current profit target (positive orders and losing order) when the price is the minimum price away from the target in order to be able to set the modifications... Don

I got this Code from another EA, see if it helps (I am not a programmer).

//MM Max Loss Allowed

//MM Closeall @ 1,5% profit

//MM margin management

//CloseAll() at will

more mm codes

extern double Risk = 0.3;

extern double StopLossIndex = 2.5;

extern bool AutoStopLossIndex = true;

extern double StaticStopLoss = 19;

extern double StopLevel;

extern bool EnableTrailingStop = false; // Enable Dynamic Trailing Stop

extern double TrailingStopFactor = 1.0;

extern string TimeTradeHoursDisabled=""; // Example "00,01,02,03,04,05" GMT Alpari=10

extern int GMT=0; // For North Finance GMT = 3, Alpari GMT = 1, IBFX GMT = -1 etc.

another EA mm code

extern string

TrailingStop_Setting = "---------- Trailing Stop Setting";

extern int

TrailingStopType = 1,

TrailingStop = 0;

extern string

breakeven_setting = "---------- Break Even After Pips";

extern int

BreakEvenAfterPips = 40;

extern string

Indicator_Setting = "---------- Indicator Setting";

extern string

CossDistance_Setting = "---------- Min Cross Distance Setting";

extern int

MinCrossDistance = 1, //Always positive, 0:disable

MaxLookUp = 40; //Number of bar to keep checking for the entry condition

extern string

Exit_Setting = "---------- Exit Setting";

extern string

MM_Parameters = "---------- Money Management";

extern double

Lots = 1;

extern bool

MM = true, //Use Money Management or not

AccountIsMicro = false; //Use Micro-Account or not

extern double

DecreaseFactor = 1; //Decrease Lots After Loss

extern int

Risk = 10; //10%

extern string

Alert_Setting = "---------- Alert Setting";

extern bool

EnableAlert = true;

extern string

SoundFilename = "alert.wav";

extern string

Testing_Parameters= "---------- Back Test Parameter";

extern bool

PrintControl = true,

Show_Settings = true;

another ea mm code

extern string Close_Management = "---- Manejo de cierre ----";

extern bool CloseImmediately = false;

extern string s1 = "---- Cierre segn horario ----";

extern bool CloseOnTime = false;

extern int CloseHour = 23; //Time to close, Hour

extern int CloseMinute = 0; //Time to close, minutes

extern string s2 = "---- Manejo de cierre segn margen de la cuenta ----";

extern bool CloseOnFloatPL = false;

extern double MaxFloatPL = -100.00; //Max floating profit/loss allowed when closing EA

extern string s3 = "---- Manejo de cierre segn margen libre ----";

extern bool CloseOnEquityTarget = false;

extern bool AutoRestartAfterEqTarget = false;

extern double EquityTargetPercentage = 5.0; //Percentage equity growth when closing EA

extern string s4 = "---- Comments ----";

extern bool DisableComments = false; //turn off comments

extern string s5 = "---- Email ----";

extern bool TestEmail = false; //if true send a test email every 5 minutes

extern string EmailAddress = "youremail@alguno.com";

extern int EmailIteration = 3; //How namy times email send when alert active

extern string s6 = "---- Alerts ----";

extern bool AlertOnLowMargin = false; //email alert when margin low

extern double MarginPercentage = 100.0; //margin low percentage

extern bool AlertOnTradeLevel = false; //email alert when trade level reach

extern int AlertTradeLevel = 6; //trade level to alert

int magic;

double lot2; //lots to open at each level

int LotDigits;

datetime tob,tos; //Time Out Buy & Sell

double SL; //stoploss price at MaxTrades level

bool Halt = false;

double StartBalance, EquityTarget;

double MarginPer;

last one

xtern double maxLoss = 100; // Maximum Loss that you can bear in percent

extern double maxYield = 0.01; // a number between 0 to 100 (not more than 10 is recommended)

extern double lTakeProfit = 21; // recomended no more than 20

extern double sTakeProfit = 21; // recomended no more than 20

extern double takeProfit = 21; // recomended no more than 20

extern double pr = 11; //take profit in sideway markets.

extern double stopLoss = 0; //

extern int magicEA = 124; // Magic EA identifier. Allows for several co-existing EA with different input values

extern double lTrailingStop = 15; // trail stop in points

extern double sTrailingStop = 15; // trail stop in points

// Check for invalid bars and takeprofit

if(Bars < 200) {

Print("Not enough bars for this strategy - ", nameEA);

return(0);

}

calculateIndicators(); // Calculate indicators' value

//Check for TakeProfit Conditions

if(lTakeProfit<1){

Print("TakeProfit less than 1 on this EA with Magic -", magicEA );

return(0);

}

if(sTakeProfit<1){

Print("TakeProfit less than 1 on this EA with Magic -", magicEA);

return(0);

}

 

Works differently

manz66:
the custom indicator he used did not work properly (it gives error in the journal).

I don't think PipMaker_NeoV5a_Rodmod8.mq4 isthe same EA, I have it on and it acts a little like a martingale and is loosing compared to 9-1.

 
ElectricSavant:
Here are the 19 pair that IBFX offers and their normal spreads:

EUR/USD (2)

USD/JPY (3)

EUR/GBP (4)

USD/CHF (4)

NZD/USD (5)

USD/CAD (5)

AUD/USD (5)

GBP/USD (6)

EUR/JPY (6)

EUR/CHF (6)

CHF/JPY (7)

AUD/JPY (8)

EUR/AUD (8)

AUD/CAD (8)

EUR/CAD (9)

GBP/JPY (9)

NZD/JPY (10)

GBP/CHF (10)

AUD/NZD (11)

I am trading 6 pairs with demo-dollars of 2K with 0.01 microlot inputs in Pipmaker at IBFX with v9.1 on a 15 minute setting: GBP/USD, USD/CHF, USD/JPY, AUD/USD, NZD/USD & USD/CAD. I am again faced with this incredible drawdown that this system seems to live with. To some of you 40% DD is ok, if you are getting the yield...but I am a 15% Intraday DD guy...I am already at 10% DD in under a day.

These are my four input changes from the defaults:

Lots: 0.01

SmallestLotSize: 2

TrendPeriod: 80

TrendtimeFrame: 15

DATE STARTED 08/22/07, BANKED DEMO PROFIT $204.16, DD:-$193.94

ES

Will be forward testing trading euro/usd and gbp/usd one directional for buy only or sell only positions with the following setting changes to ceros settings on 15min charts.

lot size:0.2

lot increment:0.2

spacing: 0.30

trendspacing:30

My reasoning is to keep the trades simple for the dealer desk and use my 1hr charts to determine long term trends. By going one directional, I am able to risk larger lot positions and keep a relatively small drawdown. Just need to check it once a day to see if trend direction had changed. If trend does happen to change, it appears the ea simply stops any trades from occurring and then just need to reset expert.

Would like to eventually piggyback this expert with another 1hr chart indicator but not sure yet how. If anyone has the urge we could start another thread to look into this further and prevent anymore confusions.

 

........................

 

@DonForex

& Cero Onda

Ive took over the attitudes of your 15Min.setfile. In the script are two lines, I cant find in your settings:

//extern bool Multiplier = true;

//extern bool OpenOnTick = false;

The

extern int Multiplier

ive changed in 0

The

extern int OpenOnTick

ive changed in 1

Do I have to also change the "//extern booI-lines" in the same values like the "extern int"?

 

Its Don's code with a mod...

berdj:
I don't think PipMaker_NeoV5a_Rodmod8.mq4 isthe same EA, I have it on and it acts a little like a martingale and is loosing compared to 9-1.

Acts like a martingale? My goal in that version was to prevent Don's logic from closing just winning trades. The Rodmod8 version accomplishes that. I removed portions of the code that prevented the logic from just closing winning trades. If you look at the visual on a backtest, it will always close a losing outlier, unless there aren't any. I wanted to get rid of the outliers as quickly as possible.

Yes, it loses. As I posted in #99. I always tested it with a pipstep of 2, which as Don has suggested is to small.

 

Why speak in code?...come out with it....

Will this version outperform 9.1 with larger pipsteps?

ES

crodzilla:
Acts like a martingale? My goal in that version was to prevent Don's logic from closing just winning trades. The Rodmod8 version accomplishes that. I removed portions of the code that prevented the logic from just closing winning trades. If you look at the visual on a backtest, it will always close a losing outlier, unless there aren't any. I wanted to get rid of the outliers as quickly as possible. Yes, it loses. As I posted in #99. I always tested it with a pipstep of 2, which as Don has suggested is to small.