Ocean theory based experts - page 5

 

Big Joe,

interesting,and yes some peoples are habitual to loud speaking and mostly fake truth,nothing practical behind,for their sake of mind and make abnormal and greedy to others,just misleading.any way your release will be waited.;)

regards

 

Hello all,

Here is the ea, i have again some problems.

When the ea closes a bad trade with color reversal, it should open immediately the new trade corresponding to the new color. But on backtests and on demo test, the expert closes the order but doesn't open the new trade.

Altoronto, can you check my code please ? The trade process begins at line 1267. The trade close begins at line 1648.

I do my best to integrate your code, but it's not easy for noob like me. Thanks !

 

Hello Altoronto,

I upload again my EA.

When the ea closes a bad trade with color reversal, it should open immediately the new trade corresponding to the new color. But on backtests and on demo test, the expert closes the order but doesn't open the new trade.

I'm scractching my head to find a solution, but nothing ...

The trade process begins at line 1267. The trade close begins at line 1648.

Thanks !

 
Big Joe:
Hello Altoronto,

I upload again my EA.

When the ea closes a bad trade with color reversal, it should open immediately the new trade corresponding to the new color. But on backtests and on demo test, the expert closes the order but doesn't open the new trade.

I'm scractching my head to find a solution, but nothing ...

The trade process begins at line 1267. The trade close begins at line 1648.

Thanks !

Hi Big Joe,

thanks for posting EA,very interesting with a lot of features that usually rare traders knows,i guess a lot of pieces of EAs or of functions gathers here in,do you think it is not a complicated too for a normal user (who is not advanced user) for to understand and use.

regards

 
altoronto:
Big Joe. here you go.

Hi altoronto,

bundle of thanks for this very interesting EA,more features and ability to control a lot of necessary options,fantastic.i tried 2 hours and hardly found how it works,:).now working well with me,still needs more to explore and understand for to properly use it.....one thing i think is missing,when current trade closed because of BE or stop loss (in some profit) but still trend is valid in current direction and conditions met,so it might take/execute an other trade in current trend.as for now the EA is keeping quit/silent till opposite trend occurs......again much thanks and appreciations.

regards

 

Big Joe, here you go.

 

Hello Altoronto,

Thanks for the fix, i'm testing it.

Now the LAST problem, we miss an essential function of the ea : the recover.

Here is my idea (after long months of live testing) :

If previous trades were in loss (here we have multi posibilities) :

- Losses < 30 pips, so the next TP will be the size of the loss ( if lose was 25 pips, the TP will be 25 pips), in 1 trade we recover the loss.

- Losses > 30 pips, so the next TP will be 25 pips till we recover ( if loss was 50 pips, the 2 next TP will be 25 pips each) for this we can use something like this : if OverallProfit < 0 so TP = 25 pips

- Losses > 70 pips, (here like the first exemple), so the next TP will be the size of the loss.

Here some code for the modified TP after loss :

double ReCalulateTakeProfitVariable()

{

//Recalculate TakeProfit if the previous trade was a loser.

if (OrdersHistoryTotal() == 0)

return(TakeProfitPips);

//Find the most recent trade and store its ticket no

int ticket = -1;

double tp = TakeProfitPips;

int closetime = 0;

for (int cc = OrdersHistoryTotal() - 1; cc >= 0; cc--)

{

if (!OrderSelect(cc, SELECT_BY_POS, MODE_HISTORY) ) continue;

if (OrderSymbol() != Symbol() ) continue;

if (OrderMagicNumber() != MagicNumber) continue;

if (TimeDayOfWeek(OrderCloseTime()) < TimeDayOfWeek(iTime(Symbol(), TradingTimeFrame, 0) ) ) continue;

if (OrderCloseTime() > closetime)

{

closetime = OrderCloseTime();

ticket = OrderTicket();

}//if (OrderCloseTime() > closetime)

}//for (int cc = OrdersTotal() - 1; cc >= 0; cc--)

if (ticket > -1)

if (OrderSelect(ticket, SELECT_BY_TICKET, MODE_HISTORY) )

if (OrderSwap() + OrderCommission() + OrderProfit() < 0)

tp = MathAbs((OrderOpenPrice() - OrderClosePrice()) * factor);

return(tp);

}//End double ReCalulateTakeProfitVariable()

Altoronto, take a look when you'll have some free time, nothing hurry here

 

Hello Mntiwina,

Yes it's hard to use, but it's good exercise, no ?

And please stop to add things, to a already complex ea. This ea will be a good one, believe me.Open your thread if you want ....

Thanks !

 
Big Joe:
Hello Mntiwina,

Yes it's hard to use, but it's good exercise, no ?

And please stop to add things, to a already complex ea. This ea will be a good one, believe me.Open your thread if you want ....

Thanks !

good idea and advice,for a new thread,:) .if things will be going like this then hundreds more thread might be opened as man to man differ in ideas,opinions and requirements,but dont worry plz,just be easy,nobody will be disturb you,;)

regards