I'm not good with stats . . . but I don't think you can equate spread and the 0 on the wheel. Spread is paid regardless of win or lose. The 0 on the wheel just means that if you play red or black you have less than a 50% chance of winning . . 18:19 or 48.65%
I guess what you are looking for is what kind of trades would give an effective win rate of 48.65% due to the effect of the spread. I think if your trade was 20 pips and spread was 1 pip that would give you what you are after . . . risk = 21 reward 20 . . . I think, don't quote me though ;-)
Nice that you think different and thats one of the primary question that I'm trying to answer because I believe it can be equated. I do know that for every dollar you wager at roulette there's an Expected Loss which is equivalent to the difference between your win-rate and your 50/50 ratio. For example if you have no 0/Green on the wheel then you'll be playing an even game in the long-run. However with the chance of only 48.65% you'll have a constant loss of something like $1.35 for every $100 dollars wagered.
Only difference between this and the spread is .... with the spreads, you have to pay them every-time you trade regardless if the turnout is going to be a loss or win.
The next step now is for me to run some simulations. The first using random trades which looks for 20-pips stoploss and 20-pips takeprofit (of course not including the 1-pip spread makes the total loss 21 and hopefully creates the odds I'm looking for). Obviously the more trade/samples within this test the better. Hummm, I wonder if anyone think it's not going to give similar results compared to roulette?
Ok, guys we have some data.
color Color; double Sl; double Tp; double Pips; double Price; void start(){ if(OrdersTotal()==0){ int Dir=MathRand()%2; Pips=Point; if(Digits==3){Pips=0.01;}if(Digits==5){Pips=0.0001;} if(Dir==0){Price=Ask; Sl=Ask-20*Pips; Tp=Ask+20*Pips; Color=Blue;} if(Dir==1){Price=Bid; Sl=Bid+20*Pips; Tp=Bid-20*Pips; Color=Red;} int Ticket=OrderSend(Symbol(),Dir,0.1,Price,999,0,0,"",0,0,Color); if(Ticket>-1){ if(OrderSelect(Ticket, SELECT_BY_TICKET)){ OrderModify(Ticket,OrderOpenPrice(),Sl,Tp,0,Color); } } } }
Now sure there are some 19.9x profit and losses in there. However, the profitable trades% speaks for itself.
It turns out to be even worse than roulette but thats due to standard errors, or whatever cushion stats need. Someone else may run it and get slightly higher or lower values however, I believe it's mathematical expectation is the same as roulette. Man, if this doesn't scare the shinisk out of a trader who didn't know this nothing else will.
Anyways, moving on. The next logical step when I taught of it earlier was to do a mql4 simulation of random numbers to see if they land anywhere between 0-36 and if it's even-number add 1$ to my running total (starting at $100,000) or subtract 1$ if its odd or 0. But that'll be a waste of time because everyone and their momma know the odds on roulette. And if they don't, one can just look them up on-line. So, I'll just skip that step.
But anyways, we're traders right, lol. We do-not believe the markets are random and we believe we can predict the market with a certain probability of success. So at least to me the very next step would be to stack-up a forecasting method vs the random entries. But my next question, how do we compare a trading system to this, considering we're not going to have anywhere near that number of samples given all the filters we tend to use in trading?
Ok, I'm still waiting for suggestions to my above question. In the maintime, I'm going to propose 2 systems. One of them I'll refer to as System 14 from http://forex-strategies-revealed.com/simple/simple-trading-with-daily-range. And the other I'll refer to as Oscar's Grind from http://www.blackjackforumonline.com/content/Betting_Systems_Oscars_Blackjack_System.htm.
A few words about System 14: It was the most responsive topic within the advance section of the site which I could find. It's looks pretty simple to code and allot of posters credit it as a winner.
A few words about OscarGrind: Advantage players do-not even like to hear the word progression. However coming from an author who I have much respect for (tho he's not saying it's a sure thing) I'm willing to give it a go within this context.
I'll go ahead and code and post my interpretation of both systems. A pitfall for System-14 here is probably the fact that I'll be forcing it to use a 20-Pip SL-TP. A pitfall for OscarGrind is how to Size-Orders to look for only one unit after a Win. But keep your fingers crossed guys, a profitable system could be confirmed soon.
Ok, Here's System_14. Almost broke-Even, therefore not bad compared to the Random but still allot of room for improvement. Anyhow, here's the codes I just wrote, so might not be error free.
int Magic_S14=14; double Sl; double Tp; double Pips; double Price; color Color; bool Pen_Mode; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void start(){ if(!isNewBar() && !Pen_Mode){return(0);} Pips=Point; if(Digits==3){Pips=0.01;} if(Digits==5){Pips=0.0001;} Check_Pending_Order_Condition(); Set_Trigger_Market_Order_SlTp(); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bool isNewBar(){ static datetime LastBar; datetime CurBar=iTime(Symbol(),PERIOD_D1,0); if(LastBar !=CurBar){LastBar=CurBar; return(true);} } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ double Percent25_Previous_24Hours_Move(){ double High_=iHigh(Symbol(),PERIOD_D1,1); double Low_=iLow(Symbol(),PERIOD_D1,1); double Total_Move=High_-Low_; double Percent_25=NormalizeDouble(Total_Move*0.25,Digits); return(Percent_25); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void Check_Pending_Order_Condition(){ if(Count_Orders_Magic_Symbol_Only()==0){ int Stop_Level=MarketInfo(Symbol(),MODE_STOPLEVEL); double Percent_25=Percent25_Previous_24Hours_Move(); if(Percent_25<Stop_Level*Pips){Percent_25=Stop_Level*Pips;} OrderSend(Symbol(),OP_BUYSTOP,0.1,Ask+Percent_25,999,0,0,"",Magic_S14,0,Blue); OrderSend(Symbol(),OP_SELLSTOP,0.1,Bid-Percent_25,999,0,0,"",Magic_S14,0,Red); if(Count_Orders_Magic_Symbol_Type(1)==2){Pen_Mode=true;} else{Print("Twin_OrderSend_Failed_Error=",GetLastError());} } } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ int Count_Orders_Magic_Symbol_Only(){ int Ans; for(int i=OrdersTotal()-1; i>=0; i--){ if(OrderSelect(i, SELECT_BY_POS) && OrderMagicNumber()==Magic_S14 && OrderSymbol()==Symbol()){Ans++;} }return(Ans); //~~~~~~~~~~~~~~~~~~~~ } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ int Count_Orders_Magic_Symbol_Type(int x){ int Ans; for(int i=OrdersTotal()-1; i>=0; i--){ if(OrderSelect(i, SELECT_BY_POS) && OrderMagicNumber()==Magic_S14 && OrderSymbol()==Symbol() && OrderType()>x){Ans++;} }return(Ans); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bool Set_Trigger_Market_Order_SlTp(){ if(!Pen_Mode){return(0);} for(int i=OrdersTotal()-1; i>=0; i--){ if(OrderSelect(i, SELECT_BY_POS) && OrderMagicNumber()==Magic_S14 && OrderSymbol()==Symbol() && (OrderType()==0 || OrderType()==1) ){int Ot=OrderTicket(); double Op=OrderOpenPrice(); bool Res; if(OrderType()==OP_BUY){Res=OrderModify(Ot,Op,Op-20*Pips,Op+20*Pips,0,Blue);}else if(OrderType()==OP_SELL){Res=OrderModify(Ot,Op,Op+20*Pips,Op-20*Pips,0,Red);} if(!Res){Print("Setting_Sl_Tp_Failed_Error=",GetLastError()); return(Res);} } } if(Res){ for( i=OrdersTotal()-1; i>=0; i--){ if(OrderSelect(i, SELECT_BY_POS) && OrderMagicNumber()==Magic_S14 && OrderSymbol()==Symbol() && (OrderType()==4 || OrderType()==5) ){ Res=OrderDelete(OrderTicket()); if(!Res){Print("Pending_Delete_Failed_Error=",GetLastError()); return(Res);} if(Res){Pen_Mode=false;} return(Res); } } } } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Well the Oscars Grind on Forex is a total failer. I guess there's no goly-grail discovered here. However, somethings to point out. If you're trading a Random System and have Spreads of 1-3, and looking for take profit between <60 Pips, you'd be better off hitting casino roulette. If you're using progressions (martingale or otherwise) it's just a matter of time til you ruin, especially if you have bad forecasting. Stronger forecasting might be the best method of getting the odds in your favor.
Again, tester coding. May contain errors and don't use any of these on Live accounts.
int Magic_OG; color Color; double Sl; double Tp; double Pips; double Price; double Lots; double Bank_Hi; double Last_OrSize; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void start(){ if(Count_Orders_Magic_Symbol_Only()==0){ if(AccountEquity()>Bank_Hi){Bank_Hi=AccountEquity();} int Dir=MathRand()%2; Pips=Point; if(Digits==3){Pips=0.01;}if(Digits==5){Pips=0.0001;} if(Dir==0){Price=Ask; Sl=Ask-20*Pips; Tp=Ask+20*Pips; Color=Blue;} if(Dir==1){Price=Bid; Sl=Bid+20*Pips; Tp=Bid-20*Pips; Color=Red;} Alert(Lot_Size()); int Ticket=OrderSend(Symbol(),Dir,Lot_Size(),Price,999,0,0,"",0,0,Color); if(Ticket>-1){ if(OrderSelect(Ticket, SELECT_BY_TICKET)){ OrderModify(Ticket,OrderOpenPrice(),Sl,Tp,0,Color); } } } } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ int Count_Orders_Magic_Symbol_Only(){ int Ans; for(int i=OrdersTotal()-1; i>=0; i--){ if(OrderSelect(i, SELECT_BY_POS) && OrderMagicNumber()==Magic_OG && OrderSymbol()==Symbol()){Ans++;} }return(Ans); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ double Lot_Size(){ double BkrLotStep= MarketInfo(Symbol(),MODE_LOTSTEP); double BrkMiniLot= MarketInfo(Symbol(),MODE_MINLOT); double BrkMaxiLot= MarketInfo(Symbol(),MODE_MAXLOT); double Tick_Value= MarketInfo(Symbol(),MODE_TICKVALUE); double Tick_Sizes= MarketInfo(Symbol(),MODE_TICKSIZE); if(Digits==2 || Digits==3){ int Pips_2Real=100;} if(Digits==4 || Digits==5){ Pips_2Real=10000;} double Pip_Values=Tick_Value / (Tick_Sizes*Pips_2Real); double AE=AccountEquity(); bool isLastWin=His_LasOrdWin_Magic_Symbol_Only(); if(!isLastWin){Lots=Last_OrSize;} if( isLastWin && AE>=Bank_Hi){Lots=0.1;} if( isLastWin && AE <Bank_Hi){Lots=Last_OrSize+0.1; double Target=20+Bank_Hi-AE; if(Lots*Pip_Values*20>Target){ for(double i=Lots; i>BrkMiniLot; i-=BkrLotStep){ if(i*Pip_Values*20<=Target){Lots=i; break;} } } } if(Lots>BrkMaxiLot){Lots=BrkMaxiLot;} if(Lots<BrkMiniLot){Lots=BrkMiniLot;} return(Lots); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bool His_LasOrdWin_Magic_Symbol_Only(){ if(OrdersHistoryTotal()==0){return(true);} for(int i=OrdersHistoryTotal()-1; i>=0; i--){ if(OrderSelect(i, SELECT_BY_POS,MODE_HISTORY) && OrderMagicNumber()==Magic_OG && OrderSymbol()==Symbol()){ Last_OrSize=OrderLots(); if(OrderProfit()>0){return(true);} } } } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Since you already have the prototye, can you quickly test something?
If you adjust the lotsize very slightly depending on your current Win/Loss ration assuming a negative outcome it should at least increase the result slightly.
Example:
Take your random system and assume a 47% win ratio
Now you get the modifier by: 47/ActualWinningRage
And the lotsize would be (47/ActualWinningRage)*lotsize
I just woke up and decided to give this approach a try.
A crude trick indeed. I think to some extend it's chasing what it already knows :). The Roulette System did suffer-less losses. So I guess thats one one way to improve a system. I'll also consider this a form of negative progression. The money-management code is below, also not bug free.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ double Lot_Size(int Switch){ static int Saved_His_Total; int His_Total=OrdersHistoryTotal(); if(His_Total==0){return(0.1);} if(Saved_His_Total != His_Total){ Saved_His_Total=His_Total; for(int i=His_Total; i>=0; i--){ if(OrderSelect(i, SELECT_BY_POS, MODE_HISTORY) && OrderMagicNumber()==Magic && OrderSymbol()==Symbol() ){ static int Trade_Total; Trade_Total++; static int Buy_Wins; static int Sel_Wins; static int Buy_Loss; static int Sel_Loss; static double Buy_Profit, Buy_Losses; static double Sel_Profit, Sel_Losses; if(OrderType()==OP_BUY && OrderProfit()>0){ Buy_Wins++; Buy_Profit+=OrderProfit();} if(OrderType()==OP_BUY && OrderProfit()<=0){ Buy_Loss++; Buy_Losses+=OrderProfit();} if(OrderType()==OP_SELL && OrderProfit()>0){ Sel_Wins++; Sel_Profit+=OrderProfit();} if(OrderType()==OP_SELL && OrderProfit()<=0){ Sel_Loss++; Sel_Losses+=OrderProfit();} break; } } double Win_Total = Buy_Wins + Sel_Wins; double Loss_Total = Buy_Loss + Sel_Loss; double Profit_Total = Buy_Profit + Sel_Profit; double Losses_Total = Buy_Losses + Sel_Losses; if(Win_Total !=0){double Avg_Profit = Profit_Total / Win_Total;} if(Loss_Total!=0){double Avg_Losses = Losses_Total / Loss_Total;} if(Trade_Total !=0){double W2L_Ratio = Win_Total / Trade_Total;} if(Trade_Total !=0){double L2W_Ratio = Loss_Total / Trade_Total;} if(Avg_Losses !=0){double P2L_Ratio = Avg_Profit / Avg_Losses;} if(Avg_Losses !=0){double Kd=Avg_Profit/Avg_Losses;} //~~~~~~~~~~~~~~~~~~~~~ if(W2L_Ratio !=0){double RvRoulette=(0.47/W2L_Ratio)*0.1;} //~~~~~~~~~~~~~~~~~~~~~ //http://www.trader-soft.com/money-management/index.html if(Kd !=0){double Kelly=(W2L_Ratio-L2W_Ratio)/(Avg_Profit/Avg_Losses);} if(P2L_Ratio!=0){double Optimal_f=((P2L_Ratio + 1)*W2L_Ratio-1)/P2L_Ratio;} //~~~~~~~~~~~~~~~~~~~~~ if(Trade_Total==0){return(0.1);} if(Switch=='R'){return(RvRoulette);} if(Switch=='K'){return(Kelly);} if(Switch=='F'){return(Optimal_f);} //~~~~~~~~~~~~~~~~~~~~~ } } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I included the Kelly and Optimal F because I already had the Stats to calculate them. It's never recommended to use these on small sample sizes imo <100. Also they're in fractions of bank to risk, so you'll need to take your (my preference) account margin * the k or f * your_risk_appetite (0.5 usually). Then you need to make sure the Lots*Pip_Values*Stop_Loss<=Target, I kinda have an example of this within one of the codes above.
Moving On here's the results for Zzuegg's suggestion. I wonder, if it can turn our break-Even System-14 into a winner?
Bars in test 812652 Ticks modelled 10091174 Modelling quality n/a Mismatched charts errors 22023 Initial deposit 100000.00 Total net profit -37756.90 The Losses decreased vs -41832 Gross profit 391593.03 Gross loss -429349.92 Profit factor 0.91 Expected payoff -0.83 Absolute drawdown 38180.64 Maximal drawdown 38280.06 (38.24%) Relative drawdown 38.24% (38280.06) Total trades 45448 Short positions (won %) 22883 (47.54%) Long positions (won %) 22565 (47.90%) Profit trades (% of total) 21687 (47.72%) Loss trades (% of total) 23761 (52.28%) Largest profit trade 46.00 loss trade -42.00 Average profit trade 18.06 loss trade -18.07 Maximum consecutive wins (profit in money) 17 (306.11) consecutive losses (loss in money) 14 (-251.89) Maximal consecutive profit (count of wins) 306.11 (17) consecutive loss (count of losses) -259.64 (13) Average consecutive wins 2 consecutive losses 2
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
If price movement follows a random walk, ( and this forum would be empty if everyone thinks it is ), how many Pips would a trader need to capture/lose in-order to have the same odds as roulette? In this case we'll assume the European wheel with 36 numbers and a single 0. The wager is the Even Money bet of Odds vs Even, 1-to-1 payout. Obviously when you land on 0/green you lose. So basically the 0 or Green serves as the Spreads. And we'll assume the spreads to be 1-Pip.
My thinking thus far is that if I'm looking for a 1-Pip take Profit and have a 1-Pip stop-loss. Assuming again theres no bias on which side the price would go, then I'd be playing with an odds which is much worse then roulette. I don't even think looking for a 10-Pip stoploss vs 10-Pip takeprofit makes trading the better option. I managed to figure out the answer within my head the other day but today, I forgot, + I wasn't sure of my math anyway :).
Someone please help me as I have a hypothesis to test/simulate. Thanks.