Martingale EA - page 34

 
lcfxtrader:
Wolfe,

Let me know when you are up to the task on the correlation grid ea.

LCFX

O.K.

 
ajk:
The programming can be challenging to allow in a martingale. -- I have not reviewed this ea yet... are your orders are individually closed? if so, it is doable.

TFX v1_5 has a Double_Lotsize option in the external variables. Select true if you want each lot size double the previous order.

Pretty risky to do this though.

[Deleted]  

wolfe,

read the reply you quoted...the word was DOable not double..

ES

wolfe:
TFX v1_5 has a Double_Lotsize option in the external variables. Select true if you want each lot size double the previous order. Pretty risky to do this though.
 

You can probably change the 2 to 1.5 on the lot size.

 
ElectricSavant:
wolfe,

read the reply you quoted...the word was DOable not double..

ES

Woops! You're right!

Well to answer the actual question:

TFX closes all the orders in a close all loop. Such as this:

int CBM(int intMagic)//CloseByMagic

{

int intOffset=0;

int Count = OTBM(intMagic);

while(OTBM(intMagic)>0 && Count > 0)

{

OrderSelect(intOffset,SELECT_BY_POS);

if(OrderMagicNumber()==intMagic)

{

if(OrderType()==OP_BUY) OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_BID),999,Red);

else if(OrderType()==OP_SELL) OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_ASK),999,Orange);

Count--;

}

else {

intOffset++;

}

}

return(0);

}

Don't know if that's exactly what ajk was asking, but that's how the EA closes orders.

 

Another back test to illustrate the implementation of a trailing stop used to close the cycle.

In this test after your profit was >= $10.00, a trailing stop was initiated, and would close all orders if you lost more than 50% of your HIGHEST total orders positive profit.

Should be fun to test, still have some work to do. Notice the HUGE draw down spike towards the end.

Files:
ph4.gif  11 kb
ph4.htm  374 kb
 

Martingales when they hit the tp usually combine a bunch of open orders and close them and "tie them together:. Ea's like bilksem for example

allowes the orders to be managed individually. The weekness of martingales, is basically what you described... letting your profits run. I like this type of ea.. .I just don't know yet on what to do with it.

Also, with Bilksem or with an ea like predator,,, it was only a martingale on the negative after the entry. This is a positive.

These martingales are "beast" and typically blow out---its just the way it is. ..You always have a loser and it goes against you so somehow you have to entend your wins. The programming of that is very, very hard.

[Deleted]  

I do not mean to be a downer here...I have toi first find something that goes positive to EVEN consider a TS..

I like the indicator dependent entry idea better..

ES

wolfe:
Another back test to illustrate the implementation of a trailing stop used to close the cycle.

In this test after your profit was >= $10.00, a trailing stop was initiated, and would close all orders if you lost more than 50% of your HIGHEST total orders positive profit.

Should be fun to test, still have some work to do. Notice the HUGE draw down spike towards the end.
 
ElectricSavant:
I do not mean to be a downer here...I have toi first find something that goes positive to EVEN consider a TS..

I like the indicator dependent entry idea better..

ES

This does use an indicator dependent entry, only uses TS as an exit AFTER you have achieved a certain profit level.

It's more of a "profit protection" method than a TS. It is using your profit levels, takes into account every new high, and protects a set percentage of your profits. Hopefully allowing them to increase, rather than just settling for a small TP level. That was the idea anyway.

Would you rather use an indicator for exit as well as entry? Or, just stick with a set TP level?

Here is another example of this feature:

Files:
ph410.gif  11 kb
ph410.htm  403 kb
[Deleted]  

no no no...carry on...I like it

wolfe:
This does use an indicator dependent entry, only uses TS as an exit AFTER you have achieved a certain profit level.

It's more of a "profit protection" method than a TS. It is using your profit levels, takes into account every new high, and protects a set percentage of your profits. Hopefully allowing them to increase, rather than just settling for a small TP level. That was the idea anyway.

Would you rather use an indicator for exit as well as entry? Or, just stick with a set TP level?

Here is another example of this feature: