Martingale EA - page 21

 

No errors (except comments) and i began to win a little

wolfe:
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?

Hi again, i have no patience so i don't take many times before trading live with a system which seems good (good EA, good logic behind).

I had no errors except the wrong comments.

Curently i have about 1 078 $ so i had about 4 % of increasing of my balance yesterday ith your EA.

Anyway i just change some settings : 150 pips between trades, 2 % TP, 10 % SL.

i did it cause i want to avoid at maximum the up and down trades and i guess 150 pips is a good way to catch the trend.

 

Wow. Did I not read the instructions correctly? Attached is my experience w/ a period of 2 days w/ M5, EURUSD and FXDD.

Files:
 

I must admit that this is the most promising and exciting (and working) EA I've ever seen in my lifetime. At last an EA that needs just marketmovings - anywhere.

I'm actually playing with optimising "Next trade".

Thank you for the great job, wolfe!

 

almos,

If you find something that works can you post your set file?

ES

Almos:
I must admit that this is the most promising and exciting (and working) EA I've ever seen in my lifetime. At last an EA that needs just marketmovings - anywhere.

I'm actually playing with optimising "Next trade".

Thank you for the great job, wolfe!
 
ElectricSavant:
almos,

If you find something that works can you post your set file?

ES

Of course, I'm following the topic since it's start.

 

Hi, Wolfe - congrats on what you've done and thought these few points might help...

1) you have lots of code replication in v1_3 - you should be able to get a 50% reduction in the number of code lines and do away with the header file in the process - that will also simplify installation/updates for users. If you'd like some help with changing the code then PM me.

2) you don't need to use any global variables at all if you include an open orders checking routine at the beginning of the file - it would actually simplify things and speed up the processing as your routines in the header file are called multiple times during each pass and are replicating the work.

3) you certainly don't need to be changing magic numbers - just check for a combination of magic number and Symbol()

4) to prevent "context busy" issues, you're best to include a wait loop checking for server availability - something like this...

while (!IsTradeAllowed() && !IsStopped())

{

Sleep(1000);

}

if (IsTradeAllowed() && !IsStopped())

{

RefreshRates();

Put order code here.....

}

...and ensure that you use RefreshRates() nearby any order placement command to minimise/prevent requotes

5) your CBM routine will fail if it encounters an order in the order list where no magic numbre was used - some EAs do this and all manually entered orders

6) for any interrogation of the orders list, it's good practice to traverse a known number of entries (use OrdersTotal() - 1 to get the current count)...

...if you are closing / deleting orders then run your loop from the highest to lowest entry. If just reading the information then direction doesn't matter unless your code depends on it for instance, here is some code from one of my other EAs which could be placed at the top of your start() routine and would collect all the information you need in one fell swoop and allow you to dispose of the global variables too...

Orders = OrdersTotal() - 1;

for (Order = 0; Order < Orders; Order++)

{

if (OrderSelect(Order, SELECT_BY_POS))

{

if (OrderMagicNumber() == Reference && OrderSymbol() == Symbol())

{

LastTicket = OrderTicket();

LastPrice = OrderOpenPrice();

LastLots = OrderLots();

Count++;

Profit = Profit + OrderProfit() + OrderSwap() + OrderCommission();

if (OrderType() == OP_BUY)

{

Count_B++;

Profit_B = Profit_B + OrderProfit() + OrderSwap() + OrderCommission();

}

if (OrderType() == OP_SELL)

{

Count_S++;

Profit_S = Profit_S + OrderProfit() + OrderSwap() + OrderCommission();

}

}

}

else

{

Print("Unable to select order in list position: ", Order);

Trade_Allowed = false;

return(0);

}

}

Hope that helps,

Neo

 
bdht:
Wow. Did I not read the instructions correctly? Attached is my experience w/ a period of 2 days w/ M5, EURUSD and FXDD.

Do I see well that you changed the "Next trade" parameter to 5?

This is too low, imagine how many times moves the market as low as 5 pips.

Try to set it at least to 10-15-20 or above to reduce the risk and make it accurate.

Or if you want it to open positions after 5 pips moving, it would be better to increase your closing profit/loss rate - be the loss rate much more than the profit.

 
Almos:
Do I see well that you changed the "Next trade" parameter to 5?

This is too low, imagine how many times moves the market as low as 5 pips.

Try to set it at least to 10-15-20 or above to reduce the risk and make it accurate.

Or if you want it to open positions after 5 pips moving, it would be better to increase your closing profit/loss rate - be the loss rate much more than the profit.

Ok, thanks, Almos. I'll certainly try this method. I usually read the instructions thoroughly. Must've skipped something this time...

 
teldon:
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....

Thanks for the compliments and encouragement teldon.

 
Almos:
I must admit that this is the most promising and exciting (and working) EA I've ever seen in my lifetime. At last an EA that needs just marketmovings - anywhere.

I'm actually playing with optimising "Next trade".

Thank you for the great job, wolfe!

Glad you find TFX to be a viable EA. Please update us on any useful test results.

Reason: