Martingale EA - page 88

 

Check it with LastEntryFilter true...

Taking Wifey to Sushi..be back later

 
ElectricSavant:
Check it with LastEntryFilter true...

You were right ES. I now see what you mean. I have fixed this problem. You areTHE MAN when it comes to finding and reporting bugs. Thank you!

Have a look at picture with LastEntryFilter set to true in fixed code:

Files:
v1_8_lef.gif  70 kb
 
kayvan:
this case may always happen .and we must find a solution for it . fortunately. there is a simple solution for filtering the additional orders .i told about Tom De Mark rules ,before .

He says for entering the trend . we must have one candle , that it`s close is higher(for buy) and lower(for sell). than it`s 8 previous bars . and wait till 4 candles couldn't`t do that . in this case ,then we are waiting for going the opposite way ,

sma 5 acts nearly like T.D.M rules . when a bar closed above ma 5 we go for long . and if a candle closed below the sma5 now after trigger it`s time to go short . otherwise we always will have such a problems.

Kayvan,

We will address these ideas after I fix current bugs. This should be soon.

 
BigBoppa:
Puh, i just wake up and there are 5 new pages to read! You guys have to slow down with an old man...

Thanks for the interest BigBoppa! Please share any ideas or concerns.

 
ElectricSavant:
Entry is not correct in 1.8..

You added or subtracted when you should of done the opposite...we are getting entries at 2 pips inside the bar...or else the lookback did not lookback correctly...

ES

This is the last thing I want to be on the "same page" with, before I post the (hopefully) corrected v1_8.

Let me explain what I tried to do:

All long ordersend commands must use the ask.

OrderSend(Symbol(),OP_BUY,Lot_Size,Ask,Slippage,NULL,NULL,"TFX_LONG_ADDITIONAL",Magic_Number,0,Green);[/PHP]

All short ordersend commands must use the bid.

OrderSend(Symbol(),OP_SELL,Lot_Size,Bid,Slippage,NULL,NULL,"TFX_SHORT_ADDITIONAL",Magic_Number,0,Red);[/PHP]

When you see an arrow on a chart for an opened long order, that arrow is the ask. The ask is the price you're long order opened at.

When you see an arrow on a chart for an opened short order, that arrow is the bid. The bid is the price you're short order opened at.

At least this is how I understand things.

So, in the code all the entry possibilities for a long I used the Ask:

[PHP]if (((Pyramid==true)&&(Use_MA_Entry==false)&&(Ask >= Next_Buy)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==false))||

((Pyramid==false)&&(Use_MA_Entry==false)&&(Ask <= Next_Buy)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==false))||

((Pyramid==true)&&(Use_MA_Entry==false)&&(Ask >= Next_Buy)&&(Ask>Last_Buy)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==true))||

((Pyramid==true)&&(Use_MA_Entry==false)&&(Ask >= Next_Buy)&&(OTL(Magic_Number)==0)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==true))||

((Pyramid==false)&&(Use_MA_Entry==false)&&(Ask <= Next_Buy)&&(Ask<Last_Buy)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==true))||

((Pyramid==false)&&(Use_MA_Entry==false)&&(Ask <= Next_Buy)&&(OTL(Magic_Number)==0)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==true)))

{

In the code all the entry possibilities for a short I used the Bid:

[PHP]if (((Pyramid==true)&&(Use_MA_Entry==false)&&(Bid <= Next_Sell)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==false))||

((Pyramid==false)&&(Use_MA_Entry==false)&&(Bid >= Next_Sell)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==false))||

((Pyramid==true)&&(Use_MA_Entry==false)&&(Bid <= Next_Sell)&&(Bid<Last_Sell)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==true))||

((Pyramid==true)&&(Use_MA_Entry==false)&&(Bid <= Next_Sell)&&(OTS(Magic_Number)==0)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==true))||

((Pyramid==false)&&(Use_MA_Entry==false)&&(Bid >= Next_Sell)&&(Bid>Last_Sell)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==true))||

((Pyramid==false)&&(Use_MA_Entry==false)&&(Bid >= Next_Sell)&&(OTS(Magic_Number)==0)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==true)))

{

This is what made sense to me, maybe I'm wrong though.

I tried to make it so when you enter 2 for your EntryLag_Long, the "arrow" is opened at 2 pips above the high, and when you enter 2 for your EntryLag_Short, the "arrow" is opened 2 pips below the low.

Now you know my reasoning and how I coded this, so is it right?

 

I will test...Thank you wolfe. Can I have some of those "smart pills" you are taking...What is your secret to keeping such a consistently nimble mind?

Your reasoning seems as sharp as a tack...

ES

wolfe:
This is the last thing I want to be on the "same page" with, before I post the (hopefully) corrected v1_8.

Let me explain what I tried to do:

All long ordersend commands must use the ask.

OrderSend(Symbol(),OP_BUY,Lot_Size,Ask,Slippage,NULL,NULL,"TFX_LONG_ADDITIONAL",Magic_Number,0,Green);[/PHP]

All short ordersend commands must use the bid.

OrderSend(Symbol(),OP_SELL,Lot_Size,Bid,Slippage,NULL,NULL,"TFX_SHORT_ADDITIONAL",Magic_Number,0,Red);[/PHP]

When you see an arrow on a chart for an opened long order, that arrow is the ask. The ask is the price you're long order opened at.

When you see an arrow on a chart for an opened short order, that arrow is the bid. The bid is the price you're short order opened at.

At least this is how I understand things.

So, in the code all the entry possibilities for a long I used the Ask:

[PHP]if (((Pyramid==true)&&(Use_MA_Entry==false)&&(Ask >= Next_Buy)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==false))||

((Pyramid==false)&&(Use_MA_Entry==false)&&(Ask <= Next_Buy)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==false))||

((Pyramid==true)&&(Use_MA_Entry==false)&&(Ask >= Next_Buy)&&(Ask>Last_Buy)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==true))||

((Pyramid==true)&&(Use_MA_Entry==false)&&(Ask >= Next_Buy)&&(OTL(Magic_Number)==0)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==true))||

((Pyramid==false)&&(Use_MA_Entry==false)&&(Ask <= Next_Buy)&&(Ask<Last_Buy)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==true))||

((Pyramid==false)&&(Use_MA_Entry==false)&&(Ask <= Next_Buy)&&(OTL(Magic_Number)==0)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==true)))

{

In the code all the entry possibilities for a short I used the Bid:

[PHP]if (((Pyramid==true)&&(Use_MA_Entry==false)&&(Bid <= Next_Sell)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==false))||

((Pyramid==false)&&(Use_MA_Entry==false)&&(Bid >= Next_Sell)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==false))||

((Pyramid==true)&&(Use_MA_Entry==false)&&(Bid <= Next_Sell)&&(Bid<Last_Sell)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==true))||

((Pyramid==true)&&(Use_MA_Entry==false)&&(Bid <= Next_Sell)&&(OTS(Magic_Number)==0)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==true))||

((Pyramid==false)&&(Use_MA_Entry==false)&&(Bid >= Next_Sell)&&(Bid>Last_Sell)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==true))||

((Pyramid==false)&&(Use_MA_Entry==false)&&(Bid >= Next_Sell)&&(OTS(Magic_Number)==0)&&(Last_Type==OP_BUY)&&(Last_Entry_Filter==true)))

{

This is what made sense to me, maybe I'm wrong though.

I tried to make it so when you enter 2 for your EntryLag_Long, the "arrow" is opened at 2 pips above the high, and when you enter 2 for your EntryLag_Short, the "arrow" is opened 2 pips below the low.

Now you know my reasoning and how I coded this, so is it right?
 
ElectricSavant:
I will test...Thank you wolfe. Can I have some of those "smart pills" you are taking...What is your secret to keeping such a consistently nimble mind?

Your reasoning seems as sharp as a tack...

ES

I'll post it tonight.

 

I like how it works with pyramid true, and LastEntryFilter true.

I DO NOT like the setting of pyramid false, and LastEntryFilter true. Be aware of this setting! I think it could hurt.

 

you guys...when wolfe gets done with the "LastEntryFilter corrected EA", I hope to illustrate how powerful it can be with the 5 MINUTE TF...

Visualize how it will work in pyramid mode...there will never be a subsequent Long entry after the opening long which will be lower than the opening long. The opening long will become the lowest of the upper grid....and vice versa for the Short..

hey this might even work better with Guppy!!

set the trail for 2 bucks at 50% ...

ES

 

RE_POST OF v1_8

*Please re-install if you have downloaded v1_8 previously!*

Files:
tfx_v1_8.mq4  63 kb