OILFXPRO Martingale breakout system E A 100% PROFITABLE - page 6

 

If this strategy applied in options then will be perfect

 
Ducati:
I would suggest a fib progression on this EA.

This thread is reopened for discussion following publc demand.

This was a P M from a trader with some constructive suggestion and I was very impressed with his suggestion as follows

MARTINGALE

--------------------------------------------------------------------------------

Hi,

My name is Nasir and I am following your thread, why you closed it, I have this stretegies before one year with the gap of 20 and take profit 40 which was fail in curtern time. from me I thing it is a good strategies I make some twist and it is working fine. I make a gap of 10 and take profit 30 and instead of doubling a lots I go with fibo, like first I will open 0.1, then 0.2,0.3,0.5,0.8,1.3...so on, I make the excel sheet if you have $5000 account you can go upto 10 steps after ten steps the margin will not met so better on 8th step atleast we can have a something like breakeven in this case a move of about 18pips will give us breakeven

Thanks for your constribution

 
el cid:
This thread is reopened for discussion following publc demand.

This was a P M from a trader with some constructive suggestion and I was very impressed with his suggestion as follows

MARTINGALE

--------------------------------------------------------------------------------

Hi,

My name is Nasir and I am following your thread, why you closed it, I have this stretegies before one year with the gap of 20 and take profit 40 which was fail in curtern time. from me I thing it is a good strategies I make some twist and it is working fine. I make a gap of 10 and take profit 30 and instead of doubling a lots I go with fibo, like first I will open 0.1, then 0.2,0.3,0.5,0.8,1.3...so on, I make the excel sheet if you have $5000 account you can go upto 10 steps after ten steps the margin will not met so better on 8th step atleast we can have a something like breakeven in this case a move of about 18pips will give us breakeven

Thanks for your constribution

Nasir

Why not have a fibo exit as well for a quick exit?

Regards

El Cid

 
el cid:
Nasir

Why not have a fibo exit as well for a quick exit?

Regards

El Cid

good idea.

first trade exist is 10 pips

second trade is 20 pips

third & > trade is 30 pips

 

martingale

martingale is a very risky strategy even with tiny lots ....i guess we should focus on where we should put the gap coz we dont care if the market goes down or up but we care if the market stay flat and jumping in the gap so i guess we should concentrate on support and resistance level where we know that there wont be a flat market..

 

how to determine there is no flat market? first hour when market open?

 

I demo lived martingales a thousand times with about a zillion get ins.

Very tough to make money... The market takes a turn and you miss your take profit and Whamo.! A martingale that keeps in the trade and increases profit is the best option but i am still working on.

Market flat is very hard to determine with indicator...flat is defined as what? let me know and I will program it in..there are tons of martingale eas out there.

http://www.forexmt4.com/_MT4_Experts/

here is a list for ya all. 10.3 is the martingales..You can throw ea's on your charts until your blind!!

 

Sliding-Down/Buying-Long Breakout

Try this one:

This strategy is only buy-long. Applicable for up trend market.

When price goes down, the buy-long breakout price will be adjusted lower.

When loss, the next lot size is increased according to 1,1,2,3,5,8,13...

SL=Range, TP=2xRange.

In the down trend market, Sliding-Up/Selling-Short Breakout should be used. Or maybe better if you have two accounts, one buying-long, one-selling-short.

I think it can be further improved. Any suggestion is welcome.

SmartQuant code is attached:

using System;

using System.Drawing;

using OpenQuant.API;

using OpenQuant.API.Indicators;

public class MyStrategy : Strategy

{

[Parameter("Range(pip)")]

public double Range;

[Parameter("Qty")]

public int Qty = 25000;

public double High = 0;

public double Low = 0;

[Parameter("Close positions on strategy stop")]

public bool CloseOnStop = true;

private double delta = 0;

private int ocaCount = 0;

private int n = 1;

private int n1 = 1;

private int n0 = 0;

private double PortfolioValue0 = 0;

private bool started;

private bool newlow;

private int barcount = 0;

private double barclose = 0;

private double barlow = 0;

private double barhigh = 0;

private double barlowest = 999999;

private double minTick = 0.0001;

private double tickSize = 0.0001;

private int decimals = 4;

private bool getDecimals = false;

Order order1;

Order limitOrder;

Order stopOrder;

private double Value = 0;

private double PnL = 0;

private double NetPnL = 0;

private double Debt = 0;

private double CashFlow = 0;

private double NetCashFlow = 0;

public override void OnStrategyStart()

{

getDecimals = int.TryParse(Instrument.PriceFormat.Substring(1,1), out decimals);

if (getDecimals)

{

tickSize = 1.0/Math.Pow(10,decimals);

if (Instrument.TickSize != 0)

tickSize *= Instrument.TickSize;

minTick = tickSize;

}

PortfolioValue0 = Portfolio.GetValue();

Console.WriteLine("{0}, {1}", Instrument, PortfolioValue0);

started = false;

newlow = false;

}

public override void OnStrategyStop()

{

if (CloseOnStop)

{

if (HasPosition)

{

if (Position.Side == PositionSide.Long)

MarketOrder(OrderSide.Sell, Position.Qty).Send();

else

MarketOrder(OrderSide.Buy, Position.Qty).Send();

}

if (order1 != null)

{

order1.Cancel();

}

if (limitOrder != null)

{

limitOrder.Cancel();

}

}

}

public override void OnBar(Bar bar)

{

barcount ++;

barclose = bar.Close;

barhigh = bar.High;

barlow = bar.Low;

if (barcount > 1)

{

if ((barlow + 0.0001) < barlowest)

{

barlowest = barlow;

newlow = true;

}

}

if (HasPosition)

{

PortfolioValue0 = Portfolio.GetValue();

Value = Position.GetValue();

PnL = Position.GetPnL();

NetPnL = Position.GetNetPnL();

Debt = Position.GetDebtValue();

CashFlow = Position.GetCashFlow();

NetCashFlow = Position.GetNetCashFlow();

// Console.WriteLine("{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}", Instrument, n, Value, PnL, NetPnL, Debt, CashFlow, NetCashFlow, PortfolioValue0);

}

if (!HasPosition && (barcount > 5))

{

if (!started)

{

started = true;

if ((barclose >= High))

{

n = 1;

n1 = 1;

}

else

{

n0 = n;

n = n+n1;

n1 = n0;

}

Low = barhigh;

High = Low + Range;

delta = 2*Range;

barlowest = barlow;

Low = Math.Round(Low/minTick) * minTick;

High = Math.Round(High/minTick) * minTick;

delta = Math.Round(delta/minTick) * minTick;

order1 = StopOrder(OrderSide.Buy, Qty*(n), High);

order1.Send();

}

else

{ if (newlow)

{

newlow = false;

Low = barlowest;

High = Low + Range;

delta = 2*Range;

Low = Math.Round(Low/minTick) * minTick;

High = Math.Round(High/minTick) * minTick;

delta = Math.Round(delta/minTick) * minTick;

Console.WriteLine("{0}, barlowest = {1}", Instrument, barlowest);

if (order1 != null)

{

order1.Cancel();

}

order1 = StopOrder(OrderSide.Buy, Qty*(n), High);

order1.Send();

}

}

}

}

public override void OnPositionChanged()

{

if (HasPosition)

{

ocaCount++;

limitOrder = LimitOrder(OrderSide.Sell, Position.Qty, High + delta);

stopOrder = StopOrder (OrderSide.Sell, Position.Qty, Low);

string id = Clock.Now.Ticks.ToString();

limitOrder.OCAGroup = id + ": " + Instrument.Symbol + " " + ocaCount;

stopOrder.OCAGroup = id + ": " + Instrument.Symbol + " " + ocaCount;

limitOrder.Send();

stopOrder.Send();

}

else

{

started = false;

}

}

}

 
TickJob:
how to determine there is no flat market? first hour when market open?

use this indicator

I

Files:
stepma_v7.mq4  8 kb
kaufman2.mq4  4 kb
flattr2.mq4  4 kb
 

some modification on my code above, see here: SmartQuant Discussion :: View topic - Sliding-Down/Buying-Long Breakout