Question for someone good at mathematics - page 4

 
No optimization at all. Just deductive reasoning.
 
rbhauer:
No optimization at all. Just deductive reasoning.

impressive...
 

I combined Ubzen's with Vinin's strategy game.

extern bool MMM_lots=1;
int      Dir;
double   Min,Price,lotc,profit,loss,spr;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
int init(){
    Min=MarketInfo(Symbol(),MODE_LOTSTEP);lotc=Min;profit=AccountBalance();loss=profit;
    return(0);
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
int start(){
    Dir=-1;
    if(Close[1]<Open[1] && Bid<Open[0])Dir=OP_BUY;
    if(Close[1]>Open[1] && Bid>Open[0])Dir=OP_SELL;
    if(Dir>-1){spr=Ask-Bid;if(OrdersTotal()>0)Stop();if(OrdersTotal()<1)Send();}
    return(0);
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
int Send(){
    if(Dir==0)Price=Ask;if(Dir==1)Price=Bid;
    int Ticket=OrderSend(Symbol(),Dir,LotsCalc(),Price,999,0.0,0.0,"",0,0);return(Ticket);
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bool Stop(){
    OrderSelect(OrdersTotal()-1,SELECT_BY_POS);
    Price=MathAbs(OrderOpenPrice()-OrderClosePrice());
    if(OrderType()!=Dir&&Price>spr)
    OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),999);return(0);
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
double LotsCalc(){
   if(!MMM_lots)return(lotc);
   if(profit>AccountBalance()||loss>profit)lotc+=Min;  else {lotc=Min;loss=profit;}
   profit=AccountBalance();return(lotc);
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 
rfb:

I combined Ubzen's with Vinin's strategy game.

Nice codes and cool stuff :-)
 

FWIW, I'm not too proud of the drop in sample quantity. But this is basically robust decision tree filtering from the previous screenshot's entries. There are 4 phases: A,B,C determines the entry conditions. A is at the top, B may revert to A or proceed to C. ABC are opposing vector sequences based on A magnitude. When A, B, and C are true, then trade is taken. D is trailing phase (making sure that the trade sustains trajectory direction). No prediction at all, just classification. I think to increase trade quantity, I should work with the ignored branches of the tree and assign each setup/signal with its risk portion as dictated by the profit factor (in Kelly unit). It will backtest similarly (not exactly but consistent enough) using M1 open price for further optimization study if needed.

Surprising fact: the same algo did not work out in AUDUSD and USDJPY, but the good news is the losing pattern is consistent. My initial hunch is due to different zigzag sequence behavior (hence why I investigated further into ABCD decision tree). So far 124 lines of code, so nothing really fancy.


 
rbhauer: I think to increase trade quantity, I should work with the ignored branches of the tree and assign each setup/signal with its risk portion as dictated by the profit factor (in Kelly unit).
Excellent posts Rbhauer. How do you intend to accomplish the above?
 

GBP likes to be tickled a bit. No crazy tweaking here. Notice the PF boost to 1.77 from 1.38. Higher signal quality, less frequency. All consistent so far. These are all non-compounded (constant risk value to a static bankroll).

Compounded @ 38% maxDD, 50K start


 
rbhauer:

GBP likes to be tickled a bit. No crazy tweaking here. Notice the PF boost to 1.77 from 1.38. Higher signal quality, less frequency. All consistent so far. These are all non-compounded (constant risk value to a static bankroll).

Compounded @ 38% maxDD, 50K start


This is impressive. Could you share? I tested my strategy on GBDUSD with not-so-impressive results, it roughly broke even. Other currency pairs do work better.

I am trying to addapt bill-wiliams trading system into a 30M - 1H scalper using ATR as a measurement of SL and BE. Keep you posted.

 
rbhauer:

GBP likes to be tickled a bit. No crazy tweaking here. Notice the PF boost to 1.77 from 1.38. Higher signal quality, less frequency. All consistent so far. These are all non-compounded (constant risk value to a static bankroll).

Compounded @ 38% maxDD, 50K start


This looks promising. Could you please share what you have written?

I have been working with a successful modified martingale strategy in manual mode, and starting to write the EA for it. It would be great to compare with yours.

 

Went into lower TF to see if the same phenomenon can be exploited. So far it seems likely. Signal freq is significantly boosted to 1137 over the last 8 years (avg 150 signals per annum) which is good for statistical assurance. Equity DD doesn't seem to be too jumpy. Now to investigate the extended flat period in the middle and see if the overal market theme can be bagged and identified for a slightly different setup tweak.

Reason: