Martingale EA - page 20

 
ElectricSavant:
wolfe,

I have an idea in the back of my mind though..I am waiting for you to perfect the multiple pair trading in v1.4

I want to put this "long only" or "short only" in the long term direction in each of the pair of a basket of 8 pair...I will use a "close-all" utility to exit the entire basket (I will disable TFX exits...by setting them far away).

This could be very powerful.

ES

This sounds interesting. You may have some good ideas here. v1_4 still in the works. Everyone keeps adding on ideas. I'm trying to include them in v1_4.

As the entire method sits now(the general TFX trading method), I'm not convinced that it is the best it could possibly be.

I look forward to your ideas, maybe with enough hard work and testing we will collectively produce a viable, robust, and profitable system. I'm feeling like we have a great start.

 
ElectricSavant:
I am blowing up accounts...I can't figure it out.

but your code works excellent...

ES

Glad the code is working properly. v1_4 WILL be better than 1_3. It already is.

 
ElectricSavant:
wolfe,

Can we have an autorestart input (true or false) so that we may turn the EA off after an exit?

ES

P.S. I think I can make a profitable method to use this in.

I like this option. I want to include it in 1_4.

 
ElectricSavant:
wolfe,

Can we have an overide on the entry direction completely and get an input where we can indicate an initial entry direction choice of long or short?

1 for long

-1 for short

If you can implement this...that will mean that this EA will offer three types of options for initial entry direction...

The MA settings

The BO settings

User input settings

wolfe you can see that by implementing this you will give the user another option for him to use, in the event he has a bias about the direction. (he may be using Long Only or Short Only inputs in the common tab of the smiley)

ES

This could be done. Maybe not in v1_4.

If you want to do this now you could set Use_Manual_Entry to true. If you wanted to go long (for example) you could set Manual_Long with a price that is less than the current bid. Set Manual_Short WAY below current bid and below Manual_Long.

After the cycle is complete and close all is performed, a new cycle WILL NOT start.

To start again, remove EA from chart and re-install. You must remove and re-install because when close all is performed Trade_Allowed is set to FALSE. Trade_Allowed is re-set to true when loading EA to chart.

 
Cijas:
Hi everyone and first grats to Wolfe and the contributors of this thread.

I am curently using the version 1.03 in live trading and i will be more confident if there will be an option as you descrive.

Cause i am at work and the EA is of course running at home without ability to close the EA if things turns wrong.

In my live trades i am using version 1.03 with GBPJPY with a gap of 100 pips between the trades and a TP of 1 % Account and a SL of 5 % of account (wich is unfortunately only of 1 036 $ althought i invested a global sum (in differents times) of 4 881 $ ! ) with 0.01 lot at first trade then an increasing of 0.01).

I choose a TP of 1% cause i don't want to increase too much the lots (i had use many martingale kinds in live as blesssystem which i tried to particpate so i am aware of the danger of marging call).

I tooked a SL of only 5 % cause i know (unfortunately for my account) that GBPJPY is very volatile and i hope it wong marge too long (which is the moste dangerous case in this EA) before doing a trend.

Wish me some luck guys ! (and i confirm the Comments are wrong cause it is written "TFX LONG START" even with sell position).

P.S : sorry for my poor english i am french.

Glad you like the EA. A little surprised you're trading live, it's still in development. I'm glad you are using with low risk settings. Good luck, I wish you success.

Have you had any errors?

 
omelette:
double temp = 12.345678;

Comment(DoubleToStr(temp,3));

// displays as "12.345"

Thank you Omelette, for all of your help. Wish I could return the favor.

 
ElectricSavant:
dude! How many lines of code are you up to now?...this is awesome work! ES

About 600.

Here is a shot of some additional screen comments.

Files:
v1_4jpyf.gif  26 kb
 

you are one hell of a wolfe, good job and thanks for your help in this forum, guys like you are what keeps this stuff going....

 

dude! How many lines of code are you up to now?...this is awesome work!

ES

wolfe:
Just finished Auto_Restart input for v1_4.

V1_4 is being coded to handle all currency pairs offered at IBFX automatically. EA will self-assign Global Variables, and Magic Numbers when attached to currency chart. This will assure functionality when attached to more than one chart at a time.

if (Symbol()=="EURUSDm" || Symbol()=="EURUSD"){TFX_LastTicket="TFX_LastTicket_EURUSD";TFX_LastOpen="TFX_LastOpen_EURUSD"; TFX_LastLots="TFX_v1.3_LastLots_EURUSD"; TFX_ClosedProfit="TFX_ClosedProfit_EURUSD";Magic_Number=1000;}

if (Symbol()=="USDJPYm" || Symbol()=="USDJPY"){TFX_LastTicket="TFX_LastTicket_USDJPY";TFX_LastOpen="TFX_LastOpen_USDJPY"; TFX_LastLots="TFX_v1.3_LastLots_USDJPY"; TFX_ClosedProfit="TFX_ClosedProfit_USDJPY";Magic_Number=2001;}

if (Symbol()=="GBPJPYm" || Symbol()=="GBPJPY"){TFX_LastTicket="TFX_LastTicket_GBPJPY";TFX_LastOpen="TFX_LastOpen_GBPJPY"; TFX_LastLots="TFX_v1.3_LastLots_GBPJPY"; TFX_ClosedProfit="TFX_ClosedProfit_GBPJPY";Magic_Number=3002;}

if (Symbol()=="USDCHFm" || Symbol()=="USDCHF"){TFX_LastTicket="TFX_LastTicket_USDCHF";TFX_LastOpen="TFX_LastOpen_USDCHF"; TFX_LastLots="TFX_v1.3_LastLots_USDCHF"; TFX_ClosedProfit="TFX_ClosedProfit_USDCHF";Magic_Number=4003;}

if (Symbol()=="GBPUSDm" || Symbol()=="GBPUSD"){TFX_LastTicket="TFX_LastTicket_GBPUSD";TFX_LastOpen="TFX_LastOpen_GBPUSD"; TFX_LastLots="TFX_v1.3_LastLots_GBPUSD"; TFX_ClosedProfit="TFX_ClosedProfit_GBPUSD";Magic_Number=5004;}

if (Symbol()=="EURCHFm" || Symbol()=="EURCHF"){TFX_LastTicket="TFX_LastTicket_EURCHF";TFX_LastOpen="TFX_LastOpen_EURCHF"; TFX_LastLots="TFX_v1.3_LastLots_EURCHF"; TFX_ClosedProfit="TFX_ClosedProfit_EURCHF";Magic_Number=6005;}

if (Symbol()=="EURGBPm" || Symbol()=="EURGBP"){TFX_LastTicket="TFX_LastTicket_EURGBP";TFX_LastOpen="TFX_LastOpen_EURGBP"; TFX_LastLots="TFX_v1.3_LastLots_EURGBP"; TFX_ClosedProfit="TFX_ClosedProfit_EURGBP";Magic_Number=7006;}

if (Symbol()=="USDCADm" || Symbol()=="USDCAD"){TFX_LastTicket="TFX_LastTicket_USDCAD";TFX_LastOpen="TFX_LastOpen_USDCAD"; TFX_LastLots="TFX_v1.3_LastLots_USDCAD"; TFX_ClosedProfit="TFX_ClosedProfit_USDCAD";Magic_Number=8007;}

if (Symbol()=="AUDUSDm" || Symbol()=="AUDUSD"){TFX_LastTicket="TFX_LastTicket_AUDUSD";TFX_LastOpen="TFX_LastOpen_AUDUSD"; TFX_LastLots="TFX_v1.3_LastLots_AUDUSD"; TFX_ClosedProfit="TFX_ClosedProfit_AUDUSD";Magic_Number=9008;}

if (Symbol()=="GBPCHFm" || Symbol()=="GBPCHF"){TFX_LastTicket="TFX_LastTicket_GBPCHF";TFX_LastOpen="TFX_LastOpen_GBPCHF"; TFX_LastLots="TFX_v1.3_LastLots_GBPCHF"; TFX_ClosedProfit="TFX_ClosedProfit_GBPCHF";Magic_Number=1009;}

if (Symbol()=="CHFJPYm" || Symbol()=="CHFJPY"){TFX_LastTicket="TFX_LastTicket_CHFJPY";TFX_LastOpen="TFX_LastOpen_CHFJPY"; TFX_LastLots="TFX_v1.3_LastLots_CHFJPY"; TFX_ClosedProfit="TFX_ClosedProfit_CHFJPY";Magic_Number=1110;}

if (Symbol()=="NZDUSDm" || Symbol()=="NZDUSD"){TFX_LastTicket="TFX_LastTicket_NZDUSD";TFX_LastOpen="TFX_LastOpen_NZDUSD"; TFX_LastLots="TFX_v1.3_LastLots_NZDUSD"; TFX_ClosedProfit="TFX_ClosedProfit_NZDUSD";Magic_Number=1211;}

if (Symbol()=="EURCADm" || Symbol()=="EURCAD"){TFX_LastTicket="TFX_LastTicket_EURCAD";TFX_LastOpen="TFX_LastOpen_EURCAD"; TFX_LastLots="TFX_v1.3_LastLots_EURCAD"; TFX_ClosedProfit="TFX_ClosedProfit_EURCAD";Magic_Number=1312;}

if (Symbol()=="AUDJPYm" || Symbol()=="AUDJPY"){TFX_LastTicket="TFX_LastTicket_AUDJPY";TFX_LastOpen="TFX_LastOpen_AUDJPY"; TFX_LastLots="TFX_v1.3_LastLots_AUDJPY"; TFX_ClosedProfit="TFX_ClosedProfit_AUDJPY";Magic_Number=1413;}

if (Symbol()=="EURAUDm" || Symbol()=="EURAUD"){TFX_LastTicket="TFX_LastTicket_EURAUD";TFX_LastOpen="TFX_LastOpen_EURAUD"; TFX_LastLots="TFX_v1.3_LastLots_EURAUD"; TFX_ClosedProfit="TFX_ClosedProfit_EURAUD";Magic_Number=1514;}

if (Symbol()=="EURJPYm" || Symbol()=="EURJPY"){TFX_LastTicket="TFX_LastTicket_EURJPY";TFX_LastOpen="TFX_LastOpen_EURJPY"; TFX_LastLots="TFX_v1.3_LastLots_EURJPY"; TFX_ClosedProfit="TFX_ClosedProfit_EURJPY";Magic_Number=1615;}

if (Symbol()=="AUDCADm" || Symbol()=="AUDCAD"){TFX_LastTicket="TFX_LastTicket_AUDCAD";TFX_LastOpen="TFX_LastOpen_AUDCAD"; TFX_LastLots="TFX_v1.3_LastLots_AUDCAD"; TFX_ClosedProfit="TFX_ClosedProfit_AUDCAD";Magic_Number=1716;}

if (Symbol()=="AUDNZDm" || Symbol()=="AUDNZD"){TFX_LastTicket="TFX_LastTicket_AUDNZD";TFX_LastOpen="TFX_LastOpen_AUDNZD"; TFX_LastLots="TFX_v1.3_LastLots_AUDNZD"; TFX_ClosedProfit="TFX_ClosedProfit_AUDNZD";Magic_Number=1817;}

if (Symbol()=="NZDJPYm" || Symbol()=="NZDJPY"){TFX_LastTicket="TFX_LastTicket_NZDJPY";TFX_LastOpen="TFX_LastOpen_NZDJPY"; TFX_LastLots="TFX_v1.3_LastLots_NZDJPY"; TFX_ClosedProfit="TFX_ClosedProfit_NZDJPY";Magic_Number=1918;}

 
ElectricSavant:
wolfe,

Can we have an autorestart input (true or false) so that we may turn the EA off after an exit?

ES

P.S. I think I can make a profitable method to use this in.

Just finished Auto_Restart input for v1_4.

V1_4 is being coded to handle all currency pairs offered at IBFX automatically. EA will self-assign Global Variables, and Magic Numbers when attached to currency chart. This will assure functionality when attached to more than one chart at a time.

if (Symbol()=="EURUSDm" || Symbol()=="EURUSD"){TFX_LastTicket="TFX_LastTicket_EURUSD";TFX_LastOpen="TFX_LastOpen_EURUSD"; TFX_LastLots="TFX_v1.3_LastLots_EURUSD"; TFX_ClosedProfit="TFX_ClosedProfit_EURUSD";Magic_Number=1000;}

if (Symbol()=="USDJPYm" || Symbol()=="USDJPY"){TFX_LastTicket="TFX_LastTicket_USDJPY";TFX_LastOpen="TFX_LastOpen_USDJPY"; TFX_LastLots="TFX_v1.3_LastLots_USDJPY"; TFX_ClosedProfit="TFX_ClosedProfit_USDJPY";Magic_Number=2001;}

if (Symbol()=="GBPJPYm" || Symbol()=="GBPJPY"){TFX_LastTicket="TFX_LastTicket_GBPJPY";TFX_LastOpen="TFX_LastOpen_GBPJPY"; TFX_LastLots="TFX_v1.3_LastLots_GBPJPY"; TFX_ClosedProfit="TFX_ClosedProfit_GBPJPY";Magic_Number=3002;}

if (Symbol()=="USDCHFm" || Symbol()=="USDCHF"){TFX_LastTicket="TFX_LastTicket_USDCHF";TFX_LastOpen="TFX_LastOpen_USDCHF"; TFX_LastLots="TFX_v1.3_LastLots_USDCHF"; TFX_ClosedProfit="TFX_ClosedProfit_USDCHF";Magic_Number=4003;}

if (Symbol()=="GBPUSDm" || Symbol()=="GBPUSD"){TFX_LastTicket="TFX_LastTicket_GBPUSD";TFX_LastOpen="TFX_LastOpen_GBPUSD"; TFX_LastLots="TFX_v1.3_LastLots_GBPUSD"; TFX_ClosedProfit="TFX_ClosedProfit_GBPUSD";Magic_Number=5004;}

if (Symbol()=="EURCHFm" || Symbol()=="EURCHF"){TFX_LastTicket="TFX_LastTicket_EURCHF";TFX_LastOpen="TFX_LastOpen_EURCHF"; TFX_LastLots="TFX_v1.3_LastLots_EURCHF"; TFX_ClosedProfit="TFX_ClosedProfit_EURCHF";Magic_Number=6005;}

if (Symbol()=="EURGBPm" || Symbol()=="EURGBP"){TFX_LastTicket="TFX_LastTicket_EURGBP";TFX_LastOpen="TFX_LastOpen_EURGBP"; TFX_LastLots="TFX_v1.3_LastLots_EURGBP"; TFX_ClosedProfit="TFX_ClosedProfit_EURGBP";Magic_Number=7006;}

if (Symbol()=="USDCADm" || Symbol()=="USDCAD"){TFX_LastTicket="TFX_LastTicket_USDCAD";TFX_LastOpen="TFX_LastOpen_USDCAD"; TFX_LastLots="TFX_v1.3_LastLots_USDCAD"; TFX_ClosedProfit="TFX_ClosedProfit_USDCAD";Magic_Number=8007;}

if (Symbol()=="AUDUSDm" || Symbol()=="AUDUSD"){TFX_LastTicket="TFX_LastTicket_AUDUSD";TFX_LastOpen="TFX_LastOpen_AUDUSD"; TFX_LastLots="TFX_v1.3_LastLots_AUDUSD"; TFX_ClosedProfit="TFX_ClosedProfit_AUDUSD";Magic_Number=9008;}

if (Symbol()=="GBPCHFm" || Symbol()=="GBPCHF"){TFX_LastTicket="TFX_LastTicket_GBPCHF";TFX_LastOpen="TFX_LastOpen_GBPCHF"; TFX_LastLots="TFX_v1.3_LastLots_GBPCHF"; TFX_ClosedProfit="TFX_ClosedProfit_GBPCHF";Magic_Number=1009;}

if (Symbol()=="CHFJPYm" || Symbol()=="CHFJPY"){TFX_LastTicket="TFX_LastTicket_CHFJPY";TFX_LastOpen="TFX_LastOpen_CHFJPY"; TFX_LastLots="TFX_v1.3_LastLots_CHFJPY"; TFX_ClosedProfit="TFX_ClosedProfit_CHFJPY";Magic_Number=1110;}

if (Symbol()=="NZDUSDm" || Symbol()=="NZDUSD"){TFX_LastTicket="TFX_LastTicket_NZDUSD";TFX_LastOpen="TFX_LastOpen_NZDUSD"; TFX_LastLots="TFX_v1.3_LastLots_NZDUSD"; TFX_ClosedProfit="TFX_ClosedProfit_NZDUSD";Magic_Number=1211;}

if (Symbol()=="EURCADm" || Symbol()=="EURCAD"){TFX_LastTicket="TFX_LastTicket_EURCAD";TFX_LastOpen="TFX_LastOpen_EURCAD"; TFX_LastLots="TFX_v1.3_LastLots_EURCAD"; TFX_ClosedProfit="TFX_ClosedProfit_EURCAD";Magic_Number=1312;}

if (Symbol()=="AUDJPYm" || Symbol()=="AUDJPY"){TFX_LastTicket="TFX_LastTicket_AUDJPY";TFX_LastOpen="TFX_LastOpen_AUDJPY"; TFX_LastLots="TFX_v1.3_LastLots_AUDJPY"; TFX_ClosedProfit="TFX_ClosedProfit_AUDJPY";Magic_Number=1413;}

if (Symbol()=="EURAUDm" || Symbol()=="EURAUD"){TFX_LastTicket="TFX_LastTicket_EURAUD";TFX_LastOpen="TFX_LastOpen_EURAUD"; TFX_LastLots="TFX_v1.3_LastLots_EURAUD"; TFX_ClosedProfit="TFX_ClosedProfit_EURAUD";Magic_Number=1514;}

if (Symbol()=="EURJPYm" || Symbol()=="EURJPY"){TFX_LastTicket="TFX_LastTicket_EURJPY";TFX_LastOpen="TFX_LastOpen_EURJPY"; TFX_LastLots="TFX_v1.3_LastLots_EURJPY"; TFX_ClosedProfit="TFX_ClosedProfit_EURJPY";Magic_Number=1615;}

if (Symbol()=="AUDCADm" || Symbol()=="AUDCAD"){TFX_LastTicket="TFX_LastTicket_AUDCAD";TFX_LastOpen="TFX_LastOpen_AUDCAD"; TFX_LastLots="TFX_v1.3_LastLots_AUDCAD"; TFX_ClosedProfit="TFX_ClosedProfit_AUDCAD";Magic_Number=1716;}

if (Symbol()=="AUDNZDm" || Symbol()=="AUDNZD"){TFX_LastTicket="TFX_LastTicket_AUDNZD";TFX_LastOpen="TFX_LastOpen_AUDNZD"; TFX_LastLots="TFX_v1.3_LastLots_AUDNZD"; TFX_ClosedProfit="TFX_ClosedProfit_AUDNZD";Magic_Number=1817;}

if (Symbol()=="NZDJPYm" || Symbol()=="NZDJPY"){TFX_LastTicket="TFX_LastTicket_NZDJPY";TFX_LastOpen="TFX_LastOpen_NZDJPY"; TFX_LastLots="TFX_v1.3_LastLots_NZDJPY"; TFX_ClosedProfit="TFX_ClosedProfit_NZDJPY";Magic_Number=1918;}