EA for manual backtest with MT4 strategy tester Forex ...

My home-made bar replay for MT4

I made a home-made bar replay for MT4 as an alternative to the tradingview bar replay. You can change timeframes and use objects easily. It just uses vertical lines to block the future candles. Then it adjusts the vertical lines when you change zoom or time frames to keep the "future" bars hidden.
I am not a professional coder so this is not as robust as something like Soft4fx or Forex Tester. But for me it gets the job done and is very convenient. Maybe you will find some benefit from it.

Here are the steps to use it:
1) copy the text from the code block
2) go to MT4 terminal and open Meta Editor (click icon or press F4)
3) go to File -> New -> Expert Advisor
4) put in a title and click Next, Next, Finish
5) Delete all text from new file and paste in text from code block
6) go back to MT4
7) Bring up Navigator (Ctrl+N if it's not already up)
8) go to expert advisors section and find what you titled it
9) open up a chart of the symbol you want to test
10) add the EA to this chart
11) specify colors and start time in inputs then press OK
12) use "S" key on your keyboard to advance 1 bar of current time frame
13) use tool bar buttons to change zoom and time frames, do objects, etc.
14) don't turn on auto scroll. if you do by accident, press "S" to return to simulation time.
15) click "buy" and "sell" buttons (white text, top center) to generate entry, TP and SL lines to track your trade
16) to cancel or close a trade, press "close order" then click the white entry line
17) drag and drop TP/SL lines to modify RR
18) click "End" to delete all objects and remove simulation from chart
19) to change simulation time, click "End", then add the simulator EA to your chart with a new start time
20) When you click "End", your own objects will be deleted too, so make sure you are done with them
21) keep track of your own trade results manually
22) use Tools-> History center to download new data if you need it. the simulator won't work on time frames if you don't have historical data going back that far, but it will work on time frames that you have the data for. If you have data but its not appearing, you might also need to increase max bars in chart in Tools->Options->Charts.
23) don't look at status bar if you are moused over hidden candles, or to avoid this you can hide the status bar.


Here is the code block.
//+------------------------------------------------------------------+ //| Bar Replay V2.mq4 | //| Copyright 2020, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2020, MetaQuotes Software Corp." #property link "https://www.mql5.com" #property version "1.00" #property strict #define VK_A 0x41 #define VK_S 0x53 #define VK_X 0x58 #define VK_Z 0x5A #define VK_V 0x56 #define VK_C 0x43 #define VK_W 0x57 #define VK_E 0x45 double balance; string balance_as_string; int filehandle; int trade_ticket = 1; string objectname; string entry_line_name; string tp_line_name; string sl_line_name; string one_R_line_name; double distance; double entry_price; double tp_price; double sl_price; double one_R; double TP_distance; double gain_in_R; string direction; bool balance_file_exist; double new_balance; double sl_distance; string trade_number; double risk; double reward; string RR_string; int is_tp_or_sl_line=0; int click_to_cancel=0; input color foreground_color = clrWhite; input color background_color = clrBlack; input color bear_candle_color = clrRed; input color bull_candle_color = clrSpringGreen; input color current_price_line_color = clrGray; input string start_time = "2020.10.27 12:00"; input int vertical_margin = 100; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { Comment(""); ChartNavigate(0,CHART_BEGIN,0); BlankChart(); ChartSetInteger(0,CHART_SHIFT,true); ChartSetInteger(0,CHART_FOREGROUND,false); ChartSetInteger(0,CHART_AUTOSCROLL,false); ChartSetInteger(0,CHART_SCALEFIX,false); ChartSetInteger(0,CHART_SHOW_OBJECT_DESCR,true); if (ObjectFind(0,"First OnInit")<0){ CreateStorageHLine("First OnInit",1);} if (ObjectFind(0,"Simulation Time")<0){ CreateTestVLine("Simulation Time",StringToTime(start_time));} string vlinename; for (int i=0; i<=1000000; i++){ vlinename="VLine"+IntegerToString(i); ObjectDelete(vlinename); } HideBars(SimulationBarTime(),0); //HideBar(SimulationBarTime()); UnBlankChart(); LabelCreate("New Buy Button","Buy",0,38,foreground_color); LabelCreate("New Sell Button","Sell",0,41,foreground_color); LabelCreate("Cancel Order","Close Order",0,44,foreground_color); LabelCreate("Risk To Reward","RR",0,52,foreground_color); LabelCreate("End","End",0,35,foreground_color); ObjectMove(0,"First OnInit",0,0,0); //--- create timer EventSetTimer(60); return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- destroy timer EventKillTimer(); } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- } //+------------------------------------------------------------------+ //| ChartEvent function | //+------------------------------------------------------------------+ void OnChartEvent(const int id, const long &lparam, const double &dparam, const string &sparam) { if (id==CHARTEVENT_CHART_CHANGE){ int chartscale = ChartGetInteger(0,CHART_SCALE,0); int lastchartscale = ObjectGetDouble(0,"Last Chart Scale",OBJPROP_PRICE,0); if (chartscale!=lastchartscale){ int chartscale = ChartGetInteger(0,CHART_SCALE,0); ObjectMove(0,"Last Chart Scale",0,0,chartscale); OnInit(); }} if (id==CHARTEVENT_KEYDOWN){ if (lparam==VK_S){ IncreaseSimulationTime(); UnHideBar(SimulationPosition()); NavigateToSimulationPosition(); CreateHLine(0,"Current Price",Close[SimulationPosition()+1],current_price_line_color,1,0,true,false,false,"price"); SetChartMinMax(); }} if(id==CHARTEVENT_OBJECT_CLICK) { if(sparam=="New Sell Button") { distance = iATR(_Symbol,_Period,20,SimulationPosition()+1)/2; objectname = "Trade # "+IntegerToString(trade_ticket); CreateHLine(0,objectname,Close[SimulationPosition()+1],foreground_color,2,5,false,true,true,"Sell"); objectname = "TP for Trade # "+IntegerToString(trade_ticket); CreateHLine(0,objectname,Close[SimulationPosition()+1]-distance*2,clrAqua,2,5,false,true,true,"TP"); objectname = "SL for Trade # "+IntegerToString(trade_ticket); CreateHLine(0,objectname,Close[SimulationPosition()+1]+distance,clrRed,2,5,false,true,true,"SL"); trade_ticket+=1; } } if(id==CHARTEVENT_OBJECT_CLICK) { if(sparam=="New Buy Button") { distance = iATR(_Symbol,_Period,20,SimulationPosition()+1)/2; objectname = "Trade # "+IntegerToString(trade_ticket); CreateHLine(0,objectname,Close[SimulationPosition()+1],foreground_color,2,5,false,true,true,"Buy"); objectname = "TP for Trade # "+IntegerToString(trade_ticket); CreateHLine(0,objectname,Close[SimulationPosition()+1]+distance*2,clrAqua,2,5,false,true,true,"TP"); objectname = "SL for Trade # "+IntegerToString(trade_ticket); CreateHLine(0,objectname,Close[SimulationPosition()+1]-distance,clrRed,2,5,false,true,true,"SL"); trade_ticket+=1; } } if(id==CHARTEVENT_OBJECT_DRAG) { if(StringFind(sparam,"TP",0)==0) { is_tp_or_sl_line=1; } if(StringFind(sparam,"SL",0)==0) { is_tp_or_sl_line=1; } Comment(is_tp_or_sl_line); if(is_tp_or_sl_line==1) { trade_number = StringSubstr(sparam,7,9); entry_line_name = trade_number; tp_line_name = "TP for "+entry_line_name; sl_line_name = "SL for "+entry_line_name; entry_price = ObjectGetDouble(0,entry_line_name,OBJPROP_PRICE,0); tp_price = ObjectGetDouble(0,tp_line_name,OBJPROP_PRICE,0); sl_price = ObjectGetDouble(0,sl_line_name,OBJPROP_PRICE,0); sl_distance = MathAbs(entry_price-sl_price); TP_distance = MathAbs(entry_price-tp_price); reward = TP_distance/sl_distance; RR_string = "RR = 1 : "+DoubleToString(reward,2); ObjectSetString(0,"Risk To Reward",OBJPROP_TEXT,RR_string); is_tp_or_sl_line=0; } } if(id==CHARTEVENT_OBJECT_CLICK) { if(sparam=="Cancel Order") { click_to_cancel=1; Comment("please click the entry line of the order you wish to cancel."); } } if(id==CHARTEVENT_OBJECT_CLICK) { if(sparam!="Cancel Order") { if(click_to_cancel==1) { if(ObjectGetInteger(0,sparam,OBJPROP_TYPE,0)==OBJ_HLINE) { entry_line_name = sparam; tp_line_name = "TP for "+sparam; sl_line_name = "SL for "+sparam; ObjectDelete(0,entry_line_name); ObjectDelete(0,tp_line_name); ObjectDelete(0,sl_line_name); click_to_cancel=0; ObjectSetString(0,"Risk To Reward",OBJPROP_TEXT,"RR"); } } } } if (id==CHARTEVENT_OBJECT_CLICK){ if (sparam=="End"){ ObjectsDeleteAll(0,-1,-1); ExpertRemove(); }} } //+------------------------------------------------------------------+ void CreateStorageHLine(string name, double value){ ObjectDelete(name); ObjectCreate(0,name,OBJ_HLINE,0,0,value); ObjectSetInteger(0,name,OBJPROP_SELECTED,false); ObjectSetInteger(0,name,OBJPROP_SELECTABLE,false); ObjectSetInteger(0,name,OBJPROP_COLOR,clrNONE); ObjectSetInteger(0,name,OBJPROP_BACK,true); ObjectSetInteger(0,name,OBJPROP_ZORDER,0); } void CreateTestHLine(string name, double value){ ObjectDelete(name); ObjectCreate(0,name,OBJ_HLINE,0,0,value); ObjectSetInteger(0,name,OBJPROP_SELECTED,false); ObjectSetInteger(0,name,OBJPROP_SELECTABLE,false); ObjectSetInteger(0,name,OBJPROP_COLOR,clrWhite); ObjectSetInteger(0,name,OBJPROP_BACK,true); ObjectSetInteger(0,name,OBJPROP_ZORDER,0); } bool IsFirstOnInit(){ bool bbb=false; if (ObjectGetDouble(0,"First OnInit",OBJPROP_PRICE,0)==1){return true;} return bbb; } void CreateTestVLine(string name, datetime timevalue){ ObjectDelete(name); ObjectCreate(0,name,OBJ_VLINE,0,timevalue,0); ObjectSetInteger(0,name,OBJPROP_SELECTED,false); ObjectSetInteger(0,name,OBJPROP_SELECTABLE,false); ObjectSetInteger(0,name,OBJPROP_COLOR,clrNONE); ObjectSetInteger(0,name,OBJPROP_BACK,false); ObjectSetInteger(0,name,OBJPROP_ZORDER,3); } datetime SimulationTime(){ return ObjectGetInteger(0,"Simulation Time",OBJPROP_TIME,0); } int SimulationPosition(){ return iBarShift(_Symbol,_Period,SimulationTime(),false); } datetime SimulationBarTime(){ return Time[SimulationPosition()]; } void IncreaseSimulationTime(){ ObjectMove(0,"Simulation Time",0,Time[SimulationPosition()-1],0); } void NavigateToSimulationPosition(){ ChartNavigate(0,CHART_END,-1*SimulationPosition()+15); } void NotifyNotEnoughHistoricalData(){ BlankChart(); Comment("Sorry, but there is not enough historical data to load this time frame."+"\n"+ "Please load more historical data or use a higher time frame. Thank you :)");} void UnHideBar(int barindex){ ObjectDelete(0,"VLine"+IntegerToString(barindex+1)); } void BlankChart(){ ChartSetInteger(0,CHART_COLOR_FOREGROUND,clrNONE); ChartSetInteger(0,CHART_COLOR_CANDLE_BEAR,clrNONE); ChartSetInteger(0,CHART_COLOR_CANDLE_BULL,clrNONE); ChartSetInteger(0,CHART_COLOR_CHART_DOWN,clrNONE); ChartSetInteger(0,CHART_COLOR_CHART_UP,clrNONE); ChartSetInteger(0,CHART_COLOR_CHART_LINE,clrNONE); ChartSetInteger(0,CHART_COLOR_GRID,clrNONE); ChartSetInteger(0,CHART_COLOR_ASK,clrNONE); ChartSetInteger(0,CHART_COLOR_BID,clrNONE);} void UnBlankChart(){ ChartSetInteger(0,CHART_COLOR_FOREGROUND,foreground_color); ChartSetInteger(0,CHART_COLOR_CANDLE_BEAR,bear_candle_color); ChartSetInteger(0,CHART_COLOR_CANDLE_BULL,bull_candle_color); ChartSetInteger(0,CHART_COLOR_BACKGROUND,background_color); ChartSetInteger(0,CHART_COLOR_CHART_DOWN,foreground_color); ChartSetInteger(0,CHART_COLOR_CHART_UP,foreground_color); ChartSetInteger(0,CHART_COLOR_CHART_LINE,foreground_color); ChartSetInteger(0,CHART_COLOR_GRID,clrNONE); ChartSetInteger(0,CHART_COLOR_ASK,clrNONE); ChartSetInteger(0,CHART_COLOR_BID,clrNONE);} void HideBars(datetime starttime, int shift){ int startbarindex = iBarShift(_Symbol,_Period,starttime,false); ChartNavigate(0,CHART_BEGIN,0); if (Time[WindowFirstVisibleBar()]>SimulationTime()){NotifyNotEnoughHistoricalData();} if (Time[WindowFirstVisibleBar()]=0; i--){ vlinename="VLine"+IntegerToString(i); ObjectCreate(0,vlinename,OBJ_VLINE,0,Time[i],0); ObjectSetInteger(0,vlinename,OBJPROP_COLOR,background_color); ObjectSetInteger(0,vlinename,OBJPROP_BACK,false); ObjectSetInteger(0,vlinename,OBJPROP_WIDTH,vlinewidth); ObjectSetInteger(0,vlinename,OBJPROP_ZORDER,10); ObjectSetInteger(0,vlinename,OBJPROP_FILL,true); ObjectSetInteger(0,vlinename,OBJPROP_STYLE,STYLE_SOLID); ObjectSetInteger(0,vlinename,OBJPROP_SELECTED,false); ObjectSetInteger(0,vlinename,OBJPROP_SELECTABLE,false); } NavigateToSimulationPosition(); SetChartMinMax();} }//end of HideBars function void SetChartMinMax(){ int firstbar = WindowFirstVisibleBar(); int lastbar = SimulationPosition(); int lastbarwhenscrolled = WindowFirstVisibleBar()-WindowBarsPerChart(); if (lastbarwhenscrolled>lastbar){lastbar=lastbarwhenscrolled;} double highest = High[iHighest(_Symbol,_Period,MODE_HIGH,firstbar-lastbar,lastbar)]; double lowest = Low[iLowest(_Symbol,_Period,MODE_LOW,firstbar-lastbar,lastbar)]; ChartSetInteger(0,CHART_SCALEFIX,true); ChartSetDouble(0,CHART_FIXED_MAX,highest+vertical_margin*_Point); ChartSetDouble(0,CHART_FIXED_MIN,lowest-vertical_margin*_Point); } void LabelCreate(string labelname, string labeltext, int row, int column, color labelcolor){ int ylocation = row*18; int xlocation = column*10; ObjectCreate(0,labelname,OBJ_LABEL,0,0,0); ObjectSetString(0,labelname,OBJPROP_TEXT,labeltext); ObjectSetInteger(0,labelname,OBJPROP_COLOR,labelcolor); ObjectSetInteger(0,labelname,OBJPROP_FONTSIZE,10); ObjectSetInteger(0,labelname,OBJPROP_ZORDER,10); ObjectSetInteger(0,labelname,OBJPROP_BACK,false); ObjectSetInteger(0,labelname,OBJPROP_CORNER,CORNER_LEFT_UPPER); ObjectSetInteger(0,labelname,OBJPROP_ANCHOR,ANCHOR_LEFT_UPPER); ObjectSetInteger(0,labelname,OBJPROP_XDISTANCE,xlocation); ObjectSetInteger(0,labelname,OBJPROP_YDISTANCE,ylocation);} double GetHLinePrice(string name){ return ObjectGetDouble(0,name,OBJPROP_PRICE,0); } void CreateHLine(int chartid, string objectnamey, double objectprice, color linecolor, int width, int zorder, bool back, bool selected, bool selectable, string descriptionn) { ObjectDelete(chartid,objectnamey); ObjectCreate(chartid,objectnamey,OBJ_HLINE,0,0,objectprice); ObjectSetString(chartid,objectnamey,OBJPROP_TEXT,objectprice); ObjectSetInteger(chartid,objectnamey,OBJPROP_COLOR,linecolor); ObjectSetInteger(chartid,objectnamey,OBJPROP_WIDTH,width); ObjectSetInteger(chartid,objectnamey,OBJPROP_ZORDER,zorder); ObjectSetInteger(chartid,objectnamey,OBJPROP_BACK,back); ObjectSetInteger(chartid,objectnamey,OBJPROP_SELECTED,selected); ObjectSetInteger(chartid,objectnamey,OBJPROP_SELECTABLE,selectable); ObjectSetString(0,objectnamey,OBJPROP_TEXT,descriptionn); } //end of code 
submitted by Learning_2 to Forex [link] [comments]

Is forex tick data streamed from one broker enough to gauge an approximation of the "real volume"?

Forex is decentralized so it's very hard to gauge the real volume of the pairs. I can't imagine streaming tick data from multiple major forex brokers to aggregate their data just to determine the volume. It'd be too much work for an individual trader like me, and too much work for my computer, too.
So I was instead thinking of using the tick data streamed from the one broker that I'm using to derive approximate volume, which I hope will be close enough to the actual volume.
I thought of a few ways to use the tick data streamed from my broker's MT4:
A. calculate the sum of the number of ticks from a given time window (ex: number of ticks from the last 30 seconds)
B. calculate the sum of the "Volume" values of the ticks from a given time window (in this case, the "Volume" means MQL4's built-in variable Volume, not the actual volume)
And then do some further calculations, such as generating moving averages on A or B.
One possible problem that will probably degrade the quality of the above calculations would be that MT4's EA can drop newer ticks if the previous onTick() event is still running when the newer ticks arrive.
I am not using any live data yet. Currently, I'm only using historical tick data downloaded from truefx.com and histdata.com to do my back tests; both websites' tick data seem to be good enough for me.
Has anyone used tick volume from a single data source to derive approximate volume with acceptable level of accuracy successfully? How reliable is my method of gauging forex volume?
submitted by twistedmush to algotrading [link] [comments]

Former investment bank FX trader: Risk management part II

Former investment bank FX trader: Risk management part II
Firstly, thanks for the overwhelming comments and feedback. Genuinely really appreciated. I am pleased 500+ of you find it useful.
If you didn't read the first post you can do so here: risk management part I. You'll need to do so in order to make sense of the topic.
As ever please comment/reply below with questions or feedback and I'll do my best to get back to you.
Part II
  • Letting stops breathe
  • When to change a stop
  • Entering and exiting winning positions
  • Risk:reward ratios
  • Risk-adjusted returns

Letting stops breathe

We talked earlier about giving a position enough room to breathe so it is not stopped out in day-to-day noise.
Let’s consider the chart below and imagine you had a trailing stop. It would be super painful to miss out on the wider move just because you left a stop that was too tight.

Imagine being long and stopped out on a meaningless retracement ... ouch!
One simple technique is simply to look at your chosen chart - let’s say daily bars. And then look at previous trends and use the measuring tool. Those generally look something like this and then you just click and drag to measure.
For example if we wanted to bet on a downtrend on the chart above we might look at the biggest retracement on the previous uptrend. That max drawdown was about 100 pips or just under 1%. So you’d want your stop to be able to withstand at least that.
If market conditions have changed - for example if CVIX has risen - and daily ranges are now higher you should incorporate that. If you know a big event is coming up you might think about that, too. The human brain is a remarkable tool and the power of the eye-ball method is not to be dismissed. This is how most discretionary traders do it.
There are also more analytical approaches.
Some look at the Average True Range (ATR). This attempts to capture the volatility of a pair, typically averaged over a number of sessions. It looks at three separate measures and takes the largest reading. Think of this as a moving average of how much a pair moves.
For example, below shows the daily move in EURUSD was around 60 pips before spiking to 140 pips in March. Conditions were clearly far more volatile in March. Accordingly, you would need to leave your stop further away in March and take a correspondingly smaller position size.

ATR is available on pretty much all charting systems
Professional traders tend to use standard deviation as a measure of volatility instead of ATR. There are advantages and disadvantages to both. Averages are useful but can be misleading when regimes switch (see above chart).
Once you have chosen a measure of volatility, stop distance can then be back-tested and optimised. For example does 2x ATR work best or 5x ATR for a given style and time horizon?
Discretionary traders may still eye-ball the ATR or standard deviation to get a feeling for how it has changed over time and what ‘normal’ feels like for a chosen study period - daily, weekly, monthly etc.

Reasons to change a stop

As a general rule you should be disciplined and not change your stops. Remember - losers average losers. This is really hard at first and we’re going to look at that in more detail later.
There are some good reasons to modify stops but they are rare.
One reason is if another risk management process demands you stop trading and close positions. We’ll look at this later. In that case just close out your positions at market and take the loss/gains as they are.
Another is event risk. If you have some big upcoming data like Non Farm Payrolls that you know can move the market +/- 150 pips and you have no edge going into the release then many traders will take off or scale down their positions. They’ll go back into the positions when the data is out and the market has quietened down after fifteen minutes or so. This is a matter of some debate - many traders consider it a coin toss and argue you win some and lose some and it all averages out.
Trailing stops can also be used to ‘lock in’ profits. We looked at those before. As the trade moves in your favour (say up if you are long) the stop loss ratchets with it. This means you may well end up ‘stopping out’ at a profit - as per the below example.

The mighty trailing stop loss order
It is perfectly reasonable to have your stop loss move in the direction of PNL. This is not exposing you to more risk than you originally were comfortable with. It is taking less and less risk as the trade moves in your favour. Trend-followers in particular love trailing stops.
One final question traders ask is what they should do if they get stopped out but still like the trade. Should they try the same trade again a day later for the same reasons? Nope. Look for a different trade rather than getting emotionally wed to the original idea.
Let’s say a particular stock looked cheap based on valuation metrics yesterday, you bought, it went down and you got stopped out. Well, it is going to look even better on those same metrics today. Maybe the market just doesn’t respect value at the moment and is driven by momentum. Wait it out.
Otherwise, why even have a stop in the first place?

Entering and exiting winning positions

Take profits are the opposite of stop losses. They are also resting orders, left with the broker, to automatically close your position if it reaches a certain price.
Imagine I’m long EURUSD at 1.1250. If it hits a previous high of 1.1400 (150 pips higher) I will leave a sell order to take profit and close the position.
The rookie mistake on take profits is to take profit too early. One should start from the assumption that you will win on no more than half of your trades. Therefore you will need to ensure that you win more on the ones that work than you lose on those that don’t.

Sad to say but incredibly common: retail traders often take profits way too early
This is going to be the exact opposite of what your emotions want you to do. We are going to look at that in the Psychology of Trading chapter.
Remember: let winners run. Just like stops you need to know in advance the level where you will close out at a profit. Then let the trade happen. Don’t override yourself and let emotions force you to take a small profit. A classic mistake to avoid.
The trader puts on a trade and it almost stops out before rebounding. As soon as it is slightly in the money they spook and cut out, instead of letting it run to their original take profit. Do not do this.

Entering positions with limit orders

That covers exiting a position but how about getting into one?
Take profits can also be left speculatively to enter a position. Sometimes referred to as “bids” (buy orders) or “offers” (sell orders). Imagine the price is 1.1250 and the recent low is 1.1205.
You might wish to leave a bid around 1.2010 to enter a long position, if the market reaches that price. This way you don’t need to sit at the computer and wait.
Again, typically traders will use tech analysis to identify attractive levels. Again - other traders will cluster with your orders. Just like the stop loss we need to bake that in.
So this time if we know everyone is going to buy around the recent low of 1.1205 we might leave the take profit bit a little bit above there at 1.1210 to ensure it gets done. Sure it costs 5 more pips but how mad would you be if the low was 1.1207 and then it rallied a hundred points and you didn’t have the trade on?!
There are two more methods that traders often use for entering a position.
Scaling in is one such technique. Let’s imagine that you think we are in a long-term bulltrend for AUDUSD but experiencing a brief retracement. You want to take a total position of 500,000 AUD and don’t have a strong view on the current price action.
You might therefore leave a series of five bids of 100,000. As the price moves lower each one gets hit. The nice thing about scaling in is it reduces pressure on you to pick the perfect level. Of course the risk is that not all your orders get hit before the price moves higher and you have to trade at-market.
Pyramiding is the second technique. Pyramiding is for take profits what a trailing stop loss is to regular stops. It is especially common for momentum traders.

Pyramiding into a position means buying more as it goes in your favour
Again let’s imagine we’re bullish AUDUSD and want to take a position of 500,000 AUD.
Here we add 100,000 when our first signal is reached. Then we add subsequent clips of 100,000 when the trade moves in our favour. We are waiting for confirmation that the move is correct.
Obviously this is quite nice as we humans love trading when it goes in our direction. However, the drawback is obvious: we haven’t had the full amount of risk on from the start of the trend.
You can see the attractions and drawbacks of both approaches. It is best to experiment and choose techniques that work for your own personal psychology as these will be the easiest for you to stick with and build a disciplined process around.

Risk:reward and win ratios

Be extremely skeptical of people who claim to win on 80% of trades. Most traders will win on roughly 50% of trades and lose on 50% of trades. This is why risk management is so important!
Once you start keeping a trading journal you’ll be able to see how the win/loss ratio looks for you. Until then, assume you’re typical and that every other trade will lose money.
If that is the case then you need to be sure you make more on the wins than you lose on the losses. You can see the effect of this below.

A combination of win % and risk:reward ratio determine if you are profitable
A typical rule of thumb is that a ratio of 1:3 works well for most traders.
That is, if you are prepared to risk 100 pips on your stop you should be setting a take profit at a level that would return you 300 pips.
One needn’t be religious about these numbers - 11 pips and 28 pips would be perfectly fine - but they are a guideline.
Again - you should still use technical analysis to find meaningful chart levels for both the stop and take profit. Don’t just blindly take your stop distance and do 3x the pips on the other side as your take profit. Use the ratio to set approximate targets and then look for a relevant resistance or support level in that kind of region.

Risk-adjusted returns

Not all returns are equal. Suppose you are examining the track record of two traders. Now, both have produced a return of 14% over the year. Not bad!
The first trader, however, made hundreds of small bets throughout the year and his cumulative PNL looked like the left image below.
The second trader made just one bet — he sold CADJPY at the start of the year — and his PNL looked like the right image below with lots of large drawdowns and volatility.
Would you rather have the first trading record or the second?
If you were investing money and betting on who would do well next year which would you choose? Of course all sensible people would choose the first trader. Yet if you look only at returns one cannot distinguish between the two. Both are up 14% at that point in time. This is where the Sharpe ratio helps .
A high Sharpe ratio indicates that a portfolio has better risk-adjusted performance. One cannot sensibly compare returns without considering the risk taken to earn that return.
If I can earn 80% of the return of another investor at only 50% of the risk then a rational investor should simply leverage me at 2x and enjoy 160% of the return at the same level of risk.
This is very important in the context of Execution Advisor algorithms (EAs) that are popular in the retail community. You must evaluate historic performance by its risk-adjusted return — not just the nominal return. Incidentally look at the Sharpe ratio of ones that have been live for a year or more ...
Otherwise an EA developer could produce two EAs: the first simply buys at 1000:1 leverage on January 1st ; and the second sells in the same manner. At the end of the year, one of them will be discarded and the other will look incredible. Its risk-adjusted return, however, would be abysmal and the odds of repeated success are similarly poor.

Sharpe ratio

The Sharpe ratio works like this:
  • It takes the average returns of your strategy;
  • It deducts from these the risk-free rate of return i.e. the rate anyone could have got by investing in US government bonds with very little risk;
  • It then divides this total return by its own volatility - the more smooth the return the higher and better the Sharpe, the more volatile the lower and worse the Sharpe.
For example, say the return last year was 15% with a volatility of 10% and US bonds are trading at 2%. That gives (15-2)/10 or a Sharpe ratio of 1.3. As a rule of thumb a Sharpe ratio of above 0.5 would be considered decent for a discretionary retail trader. Above 1 is excellent.
You don’t really need to know how to calculate Sharpe ratios. Good trading software will do this for you. It will either be available in the system by default or you can add a plug-in.

VAR

VAR is another useful measure to help with drawdowns. It stands for Value at Risk. Normally people will use 99% VAR (conservative) or 95% VAR (aggressive). Let’s say you’re long EURUSD and using 95% VAR. The system will look at the historic movement of EURUSD. It might spit out a number of -1.2%.

A 5% VAR of -1.2% tells you you should expect to lose 1.2% on 5% of days, whilst 95% of days should be better than that
This means it is expected that on 5 days out of 100 (hence the 95%) the portfolio will lose 1.2% or more. This can help you manage your capital by taking appropriately sized positions. Typically you would look at VAR across your portfolio of trades rather than trade by trade.
Sharpe ratios and VAR don’t give you the whole picture, though. Legendary fund manager, Howard Marks of Oaktree, notes that, while tools like VAR and Sharpe ratios are helpful and absolutely necessary, the best investors will also overlay their own judgment.
Investors can calculate risk metrics like VaR and Sharpe ratios (we use them at Oaktree; they’re the best tools we have), but they shouldn’t put too much faith in them. The bottom line for me is that risk management should be the responsibility of every participant in the investment process, applying experience, judgment and knowledge of the underlying investments.Howard Marks of Oaktree Capital
What he’s saying is don’t misplace your common sense. Do use these tools as they are helpful. However, you cannot fully rely on them. Both assume a normal distribution of returns. Whereas in real life you get “black swans” - events that should supposedly happen only once every thousand years but which actually seem to happen fairly often.
These outlier events are often referred to as “tail risk”. Don’t make the mistake of saying “well, the model said…” - overlay what the model is telling you with your own common sense and good judgment.

Coming up in part III

Available here
Squeezes and other risks
Market positioning
Bet correlation
Crap trades, timeouts and monthly limits

***
Disclaimer:This content is not investment advice and you should not place any reliance on it. The views expressed are the author's own and should not be attributed to any other person, including their employer.
submitted by getmrmarket to Forex [link] [comments]

Is forex tick data streamed from one broker enough to gauge an approximation of the "real volume"?

Forex is decentralized so it's very hard to gauge the real volume of the pairs. I can't imagine streaming tick data from multiple major forex brokers to aggregate their data just to determine the volume. It'd be too much work for an individual trader like me, and too much work for my computer, too.
So I was instead thinking of using the tick data streamed from the one broker that I'm using to derive approximate volume, which I hope will be close enough to the actual volume.
I thought of a few ways to use the tick data streamed from my broker's MT4:
A. calculate the sum of the number of ticks from a given time window (ex: number of ticks from the last 30 seconds)
B. calculate the sum of the "Volume" values of the ticks from a given time window (in this case, the "Volume" means the MQL4's built-in variable Volume, not the actual volume)
And then do some further calculations, such as generating moving averages on A or B.
One possible problem that will probably degrade the quality of the above calculations would be that MT4's EA can drop newer ticks if the previous onTick() event is still running when the newer ticks arrive.
I am not using any live data yet. Currently, I'm only using historical tick data downloaded from truefx.com and histdata.com to do my back tests; both websites' tick data seem to be good enough for me.
Has anyone used tick volume from a single data source to derive approximate volume with acceptable level of accuracy successfully? How reliable is my method of gauging forex volume?
submitted by twistedmush to Forex [link] [comments]

Is forex tick data streamed from one broker enough to gauge an approximation of the "real volume"?

Forex is decentralized so it's very hard to gauge the real volume of the pairs. I can't imagine streaming tick data from multiple major forex brokers to aggregate their data just to determine the volume. It'd be too much work for an individual trader like me, and too much work for my computer, too.
So I was instead thinking of using the tick data streamed from the one broker that I'm using to derive approximate volume, which I hope will be close enough to the actual volume.
I thought of a few ways to use the tick data streamed from my broker's MT4:
A. calculate the sum of the number of ticks from a given time window (ex: number of ticks from the last 30 seconds)
B. calculate the sum of the "Volume" values of the ticks from a given time window (in this case, the "Volume" means MQL4's built-in variable Volume, not the actual volume)
And then do some further calculations, such as generating moving averages on A or B.
One possible problem that will probably degrade the quality of the above calculations would be that MT4's EA can drop newer ticks if the previous onTick() event is still running when the newer ticks arrive.
I am not using any live data yet. Currently, I'm only using historical tick data downloaded from truefx.com and histdata.com to do my back tests; both websites' tick data seem to be good enough for me.
Has anyone used tick volume from a single data source to derive approximate volume with acceptable level of accuracy successfully? How reliable is my method of gauging forex volume?
submitted by twistedmush to quant [link] [comments]

Is forex tick data streamed from one broker enough to gauge an approximation of the "real volume"?

Forex is decentralized so it's very hard to gauge the real volume of the pairs. I can't imagine streaming tick data from multiple major forex brokers to aggregate their data just to determine the volume. It'd be too much work for an individual trader like me, and too much work for my computer, too.
So I was instead thinking of using the tick data streamed from the one broker that I'm using to derive approximate volume, which I hope will be close enough to the actual volume.
I thought of a few ways to use the tick data streamed from my broker's MT4:
A. calculate the sum of the number of ticks from a given time window (ex: number of ticks from the last 30 seconds)
B. calculate the sum of the "Volume" values of the ticks from a given time window (in this case, the "Volume" means MQL4's built-in variable Volume, not the actual volume)
And then do some further calculations, such as generating moving averages on A or B.
One possible problem that will probably degrade the quality of the above calculations would be that MT4's EA can drop newer ticks if the previous onTick() event is still running when the newer ticks arrive.
I am not using any live data yet. Currently, I'm only using historical tick data downloaded from truefx.com and histdata.com to do my back tests; both websites' tick data seem to be good enough for me.
Has anyone used tick volume from a single data source to derive approximate volume with acceptable level of accuracy successfully? How reliable is my method of gauging forex volume?
submitted by twistedmush to Daytrading [link] [comments]

Making the jump: how to leave day job and concentrate on trading instead

Hi everyone...
I've been thinking about this topic for a while now but never really addressed it with some serious thought.
Currently I'm employed full time by a consulting firm and it's a nice job indeed (well payed, nice benefits, great colleagues, soon-to-become junior partner). Nevertheless I still feel it doesn't tick all the boxes for me:
That said, I'm starting to think a regular job will never fit with these requirements and I'm looking at alternatives: this is where trading comes in. I've been interested in trading for a few years now and my current situation on the topic is the following:
On one end I feel if only I could have enough time to focus and concentrate on this I think I might be successful, on the other end not I'm well aware I could easily lose all my money and the uncertainty of the income scares me.
As of now, I'm defining something that resambles a plan to jump ship and it looks like the following:
  1. Define starting capital i need before quitting my job (probably around 20k€ for the markets + 5k€ as rainy days fund)
  2. Define how much I need to make each month to survive and keep on trading (somewhere between 1.5k€/2k€ at least)
  3. Define "point of no return" (how much of said capital I'm ok to burn before reverting back to searching for a regular job)
  4. Feasibility check
  5. Define exit plan from current job
So, in order to converge to a conclusion, I need advice from people that may have found themeselves in my same spot. How did you make the jump? How did you cope with fear and uncertainty? How did you prepare to switch? Is there something major I'm missing?
Thanks for all your feedbacks!
submitted by iig560745 to Trading [link] [comments]

Which is the best auto trading robot for forex market?

I would not dare to say that there is any best auto trading robot for Forex Market. There may be in the world, but it probably not for sales nor for the public. If you have been in the forex market for a while, you will naturally become curious about automating your trades when you have a strategy and money management that bring profitability consistently.
I am an active signals follower and been in this industry for years thus these are a few tips before choosing a profitable robot in the market.
Drawdown
It is common that you study drawdown before diving into any EA. As this is the likely losses you will incur in the strategy you are engaging. The certain trading robot drawdown could get as high as 80% which I would not recommend. A safe drawdown would range 10%-20%, while max drawdown would range within 35%-50% depending on your risk appetite.
Martingale/Grid
This is a strategy which projects a clean curve on every portfolio. The only downside is that the stacked trades one day may backfire and margin call your account in a single day. In my opinion, such a strategy has its pro and con and it would be difficult to even debate if it is suitable for investment since such a strategy is more towards probability game/ gambling with formula.
View the Best Forex EAs, the reviews and proven results and select the best FX Expert Advisors for Metatrader MT4 for your needs: https://www.best-forex-robots.com/l/broker-profit/
Read the Reviews
Before you settle on a forex robot, check out the reviews. You can assess the credibility of a forex robot by visit forex trading forums. Here, you can ask for advice about the forex robot you like or you can read posts about the robot by other members. Researching carefully can help you understand if a forex robot will be suited to your particular trading style and level of experience.
Ask for Back Testing Data
Any EA will have the back-testing data for more than 10 years. It would be tested on different pairs to ensure it is profitable on different market condition and best used on which currency pairs.
Check out the Live Trading Results
Request for live verified results. Usually, you can find real verified results either on myfxbook or FX Blue. Sometime EA developer will provide investor password for you to review their performance on a live account. I will only stick to EA with verified results since this is the only way to ensure profitability.
Summary Forex Robot is not a get rich quick solution, always ensure you have set up stable and consistent risk management on every EA to ensure long-lasting profitable trading experience. Forex is already considered as a high-risk product, therefore you should always do your money management properly to avoid over-leveraging.
submitted by Rohitpure to u/Rohitpure [link] [comments]

Common Trading Mistakes: How Trend Strategies Lose Edges in Corrections.

Common Trading Mistakes: How Trend Strategies Lose Edges in Corrections.
Losing consistently in a trend is frustrating. It tends to make people feel either stupid or conspired against. The market always goes up ... until you buy. What's with that?

If you find yourself getting the run around in trending moves, this post should help.

We'll start with having a look at the areas common styles of trend following can generate losing signals '/ stop losses. The two main types of trend trading are breakouts and retracements. Here we can see the areas they are likely to generate losing trades in a typical trend formation.

https://preview.redd.it/14c7t96ufbj31.png?width=637&format=png&auto=webp&s=ca52ae781d968c106609808963ff2202e0cfcce9
On the left, we have breakout loses. On the right we have retracement losses.
The trades on the right are not too much of a problem. If you had a sold trend trading strategy using breakouts and maintained it with good money management, you'd be doing well. Having some strings of small losses would not matter relative to the trend moves you catch. It's this red bit. This is where things get sketchy. Here a lot of false signals will be generated. In a larger picture for retracement traders, but also on short term false breakouts.

Strategies that would have been very profitable ran through the blue area can become breakeven or losing strategies in the red area. This is actually (in my view) likely the reason most trend based EAs that can be designed easily or bought have limited long term profitability even if they produce great short term results. To make money in a blue market, the EA needs you to tell it how to do two things. Not get stopped out, and sell. There may be bumpy bits, but it will make money so long as that market condition continues.

This is all well and good, but the reality of having to deal with risk control in adverse market conditions will inevitably come along. When this happens, not adapting your trend strategy to filter out the losing streaks that most strategies will generate seriously hampers your net profitability and can even turn a good strategy bad.

In the early week gap and brief breakout on USDJPY, I thought it was likely we were switching from a blue market to a red market. So I activated the trend followers of different variations on my Shorting Noobs strategy, and waited to see if they'd pick up the worst signals (giving me ideal entries).
https://www.reddit.com/Forex/comments/cvki79/shorting_noobs_fake_news_false_breakouts_and_the/

https://preview.redd.it/v34h1n0sgbj31.png?width=1017&format=png&auto=webp&s=ae7055bf385ee44465b3d2afb42246998bac1114

I explained what I thought the best trade pan for the sort of price action we'd see in the coming trading sessions would be.
https://preview.redd.it/x9qmvoqwgbj31.png?width=763&format=png&auto=webp&s=34a250cf147cda489629c824cd4addb93118701b
My theory here is if you put a bunch of okay strategies (and these are not horrible traders. They have rules, and follow them. Do overall okay) into the very worst conditions, they'll do the worst thing. Which saves me the effort of being here doing what I think is the best thing. To look for big drops, and then it have a little false breakout. Buy this and take profits into spikes.

Here that is a bit closer.

https://preview.redd.it/1vgi23ohibj31.png?width=805&format=png&auto=webp&s=cb13f88ed34431c1e23a0da04fcf3c00f849ee0a
Particularly where the red mark is, this has produce a perfect counter signal. Sharp drop, false breakout. Buy and take profit into spike up.

The interesting thing about this for me, is I do not find too much to be critical about with many of these positions if we are to look at the market from the perspective of a seller. Their stop losses seem to make sense from much of the stop loss rules commonly used (and ones working for them okay in other times of the strategy), but they're commonly being stopped out at the highs.

The main problem most strategies have is the recurrence of what can be increasingly strong looking sell signals. When using solid rules, this is a limited problem (can still be big), but without this and with there being emotional decisions made, this is a really hard time to trade. It's easy to lose all your money trying to follow the trend here, without really doing too much wrong other than starting to chase a loss or refuse to accept a loss. Then things happen so quickly, and that's it. Being a revenge seller selling into the bear engulfing bars right before the 50 pips 1 minute candles does not go well a few times in a row (tried and tested, would not recommend).

As I mentioned in the comments for the OP of this analysis, I stopped selling at 106.05. I stopped copying most of the strategies there because I didn't want them accumulating sells at a possible high. All through the consolidation period their have been sells accumulating and obviously the stops are above the highs, which is exactly the area I'd expect to spike out and reverse from in this pattern. It's what my manual trade plan inverts.
https://preview.redd.it/3488sp3hlbj31.png?width=692&format=png&auto=webp&s=3cbc46de4a1b121526421d27568fe0d7f30d86f8
So at this point these strategies that have been doing well over the blue period (which has been a longer time) have lost most of gains. If the trend continues from here in the main they will breakeven on this red section (would be okay). If there are spike outs of the highs they will generate a lot more losing signals. By the end of this, strategies that have been profitable for 3 months will have leaked back a substantial amount of that in only 4 - 5 days.

Learning to remove these correction weeks from their trading patterns would very much benefit most trend following systems.

Here's the overall results from betting against either trend following or trend reversal mistakes like this.
https://preview.redd.it/6f8v4vgumbj31.png?width=818&format=png&auto=webp&s=7bc8049fedf69a447597695a15e9ff1510d3a515
submitted by whatthefx to Forex [link] [comments]

Unsure if this is the correct sub. I have a question about MT4 EAs.

I'm unsure if this is the correct sub for my questions. I have questions regarding creating & using EAs in MT4 to automate the back testing & forward testing of my trading ideas. From the sub's description that seems a little elementary for this sub, not nearly rising to the level of quantitative trading or machine learning.
Is this the right place to get my questions answered, or should I piss off back to Forex?
(When I started asking my questions there, I was met with a rousing chorus of "Algos don't ever work," so take that for what it is.)
submitted by phydaux4242 to algotrading [link] [comments]

Kin Swap FAQ + Video Tutorials + Guides (Multiple Languages)

FAQs:

1) Do I need to swap?
Yes. Kin is migrating to its own Blockchain which will be the only system connected to their SDKs.
If you do not transfer your Kin you will be left with the ERC-20 tokens. The Kin Foundation claims there will be an on-going one way swap method manually via Kin's support staff in the future if you miss the swap window. We have no further details on how this process will work, how long it will take or if it will always be available. Kin ERC20 tokens will not be used in the main Kin blockchain, SDK or apps.
2) Can't I swap back?
No. The original plan was to have a programmatic 1:1 swap always available. This was abandoned.
This is a one-time swap. It is only available through exchange partners.
3) Do I need to swap my Kin if it is in an app like Kik, Kinit, Kinny, Swelly or MadLipz?
No. This Kin is being migrated for you.
4) Do I need to swap my Kin if I have it in an exchange?
Yes. If your exchange is not:
Or you were not previously holding Kin on:
Then you MUST move your Kin in order to swap it. It will not swap automatically.
5) Will other exchanges support the swap?
We don't know. The Kin documentation is unclear, and it seems unlikely based on the time constraints set. If they do, there is no guarantee that there will not be a fee.
6) Are their fees for the transaction?
Kin's documentation has said partners are not charging fees. There still may be network fees. You should talk to the customer support of each service before swapping if you are worried about fees.
7) If my Kin is in a wallet like Jaxx, MEW, Coinimi, etc do I have to swap?
Yes. You must manually swap.
8) Is there any way to swap that is not an exchange?
Yes. CoinSwitch and Changelly are technically not exchanges but also support the swap.
9) Is there anyway to swap that is not a third-party service?
No.
10) How much time do I have?
For the current exchanges you have until April 10th. (EST)
For CoinSwitch and Changelly you have until June 12th.
11) What happens after June 12th?
We have no idea. We are told there will be a manual swap method available for individuals who were unable to swap prior to that time. What this looks like is still unclear.
12) How do I swap?
Right now we are in Phase 2 of the swap, there are less options for swapping currently. You can see the Phase 2 guide here: http://nufi.io/how-to-swap-your-kin-with-p2pb2b/
13) Should I use FreeWallet, AtomicWallet or TrustWallet?
Both of those services come with risks. FreeWallet is centralized and is owned by HitBTC a controversial exchange commonly accused of scamming.
AtomicWallet requires running third-party software on your system.
Neither are ideal or recommended. If you are using a wallet you should consider buying a Ledger device, or Creating a Paper Wallet?. If neither of those are an option then you can use TrustWallet by Binance.
14) Which exchange is the safest?
That is a matter of personal opinion. Right now your only option is P2PB2B
15) Should I use CoinSwitch?
CoinSwitch is an unknown and fairly new team from India. The process of switching has been smooth for some people so far, but, it is worth proceeding with caution. Multiple virus scanners such as F-Secure and McAffee also suggest it is an unsafe site.
The main problem is that to use Changelly or CoinSwitch you must either manually set up your Ledger to support Kin, or use AtomicWallet or FreeWallet - which is not advisable.
16) When will I get my Kin?
If you use the instant switching from CoinSwitch or Changelly you should get the Kin3 within a few minutes.
If you use Lykke or LAToken you will get your Kin3 March 26th.
If you use any of the other exchanges you will get your Kin3 on March 21st.
For Phase 2 using P2PB2B you will get your coins on April 12th or 13th.
17) Is Trezor supported?
No.
18) If my Kin are in HitBTC do I need to do anything?
Technically no. But, HitBTC has very expensive withdraw fees and a pretty bad reputation. You should check out the guide below for other options.
19) If I am out of the country and away from my hardware wallet for 3-6+ months how will I deal with the swap?
This has been discussed with Kin support, they claim they will have a manual email service for people who are in this situation. No further information has been given at this time. It is unclear if any proof is required or what the process involves. It is unclear if the process is only for ICO holders.
20) What if I have Kin on Stellar from Stellarport etc?
Stellar assets like that are issued as "IOUs" from the Stellar Anchor you bought them at. They are not tokens. In theory, who ever sold you the IOU should have Kin1 tokens that they are holding in balance when issued. They should swap these tokens to Kin3 and provide you with a Kin3 IOU or the Kin3 itself. You will need to contact the support at your Stellar Anchor to confirm more.
21) Are more exchanges coming?
Yes. We know more exchanges are coming, but we have no idea when, or which exchanges.
22) I'm doing your tutorial on How to Build Manual Ledger Transactions but getting the error code op_no_destination?
This means the wallet you are trying to send to isn't activated yet. Wallets on Stellar don't get created when the keypair is generated, they get created by another wallet activating and funding them. You must use the operation "CreateAccount" rather than "Payment" when building the transaction.
23) I'm doing your tutorial on How to Build Manual Ledger Transactions but getting the error code Unsupported Media Type?
Most likely you are on the Kin test network and not the main network. Check the upper right hand corner of the lab and switch to the public network.
24) How do I transfer from MEW?
Simply follow either the How to Swap Kin with Exchanges (Beginners) or How to Swap Kin with Ledger (Advanced Users Only) but instead of sending from a Ledger send the tokens from your MEW wallet. If you choose to do the instant swap you'll need to have a Kin3 compatible wallet such as a paper wallet (How to create a Kin Paper Wallet/What is a Paper Wallet?)
24) I have other questions not answered here?
I've set up a specific Question Thread to better keep track of issues.
25) Where can I stay up to date on this stuff?
Since there hasn't been much official guidance, I've been tweeting about important updates as they develop. You can follow the account I set up here: @crypto_adamsc1

Guides:

International Guides:

Videos:

Kin FAQ in other languages:

submitted by AdamSC1 to KinFoundation [link] [comments]

How to get started in Forex - A comprehensive guide for newbies

Almost every day people come to this subreddit asking the same basic questions over and over again. I've put this guide together to point you in the right direction and help you get started on your forex journey.

A quick background on me before you ask: My name is Bob, I'm based out of western Canada. I started my forex journey back in January 2018 and am still learning. However I am trading live, not on demo accounts. I also code my own EA's. I not certified, licensed, insured, or even remotely qualified as a professional in the finance industry. Nothing I say constitutes financial advice. Take what I'm saying with a grain of salt, but everything I've outlined below is a synopsis of some tough lessons I've learned over the last year of being in this business.

LET'S GET SOME UNPLEASANTNESS OUT OF THE WAY

I'm going to call you stupid. I'm also going to call you dumb. I'm going to call you many other things. I do this because odds are, you are stupid, foolish,and just asking to have your money taken away. Welcome to the 95% of retail traders. Perhaps uneducated or uninformed are better phrases, but I've never been a big proponent of being politically correct.

Want to get out of the 95% and join the 5% of us who actually make money doing this? Put your grown up pants on, buck up, and don't give me any of this pc "This is hurting my feelings so I'm not going to listen to you" bullshit that the world has been moving towards.

Let's rip the bandage off quickly on this point - the world does not give a fuck about you. At one point maybe it did, it was this amazing vision nicknamed the American Dream. It died an agonizing, horrible death at the hand of capitalists and entrepreneurs. The world today revolves around money. Your money, my money, everybody's money. People want to take your money to add it to theirs. They don't give a fuck if it forces you out on the street and your family has to live in cardboard box. The world just stopped caring in general. It sucks, but it's the way the world works now. Welcome to the new world order. It's called Capitalism.

And here comes the next hard truth that you will need to accept - Forex is a cruel bitch of a mistress. She will hurt you. She will torment you. She will give you nightmares. She will keep you awake at night. And then she will tease you with a glimmer of hope to lure you into a false sense of security before she then guts you like a fish and shows you what your insides look like. This statement applies to all trading markets - they are cruel, ruthless, and not for the weak minded.

The sooner you accept these truths, the sooner you will become profitable. Don't accept it? That's fine. Don't bother reading any further. If I've offended you I don't give a fuck. You can run back home and hide under your bed. The world doesn't care and neither do I.

For what it's worth - I am not normally an major condescending asshole like the above paragraphs would suggest. In fact, if you look through my posts on this subreddit you will see I am actually quite helpful most of the time to many people who come here. But I need you to really understand that Forex is not for most people. It will make you cry. And if the markets themselves don't do it, the people in the markets will.

LESSON 1 - LEARN THE BASICS

Save yourself and everybody here a bunch of time - learn the basics of forex. You can learn the basics for free - BabyPips has one of the best free courses online which explains what exactly forex is, how it works, different strategies and methods of how to approach trading, and many other amazing topics.

You can access the BabyPips course by clicking this link: https://www.babypips.com/learn/forex

Do EVERY course in the School of Pipsology. It's free, it's comprehensive, and it will save you from a lot of trouble. It also has the added benefit of preventing you from looking foolish and uneducated when you come here asking for help if you already know this stuff.

If you still have questions about how forex works, please see the FREE RESOURCES links on the /Forex FAQ which can be found here: https://www.reddit.com/Forex/wiki/index

Quiz Time
Answer these questions truthfully to yourself:

-What is the difference between a market order, a stop order, and a limit order?
-How do you draw a support/resistance line? (Demonstrate it to yourself)
-What is the difference between MACD, RSI, and Stochastic indicators?
-What is fundamental analysis and how does it differ from technical analysis and price action trading?
-True or False: It's better to have a broker who gives you 500:1 margin instead of 50:1 margin. Be able to justify your reasoning.

If you don't know to answer to any of these questions, then you aren't ready to move on. Go back to the School of Pipsology linked above and do it all again.

If you can answer these questions without having to refer to any kind of reference then congratulations, you are ready to move past being a forex newbie and are ready to dive into the wonderful world of currency trading! Move onto Lesson 2 below.

LESSON 2 - RANDOM STRANGERS ARE NOT GOING TO HELP YOU GET RICH IN FOREX

This may come as a bit of a shock to you, but that random stranger on instagram who is posting about how he is killing it on forex is not trying to insprire you to greatness. He's also not trying to help you. He's also not trying to teach you how to attain financial freedom.

99.99999% of people posting about wanting to help you become rich in forex are LYING TO YOU.

Why would such nice, polite people do such a thing? Because THEY ARE TRYING TO PROFIT FROM YOUR STUPIDITY.

Plain and simple. Here's just a few ways these "experts" and "gurus" profit from you:


These are just a few examples. The reality is that very few people make it big in forex or any kind of trading. If somebody is trying to sell you the dream, they are essentially a magician - making you look the other way while they snatch your wallet and clean you out.

Additionally, on the topic of fund managers - legitimate fund managers will be certified, licensed, and insured. Ask them for proof of those 3 things. What they typically look like are:

If you are talking to a fund manager and they are insisting they have all of these, get a copy of their verification documents and lookup their licenses on the directories of the issuers to verify they are valid. If they are, then at least you are talking to somebody who seems to have their shit together and is doing investment management and trading as a professional and you are at least partially protected when the shit hits the fan.


LESSON 3 - UNDERSTAND YOUR RISK

Many people jump into Forex, drop $2000 into a broker account and start trading 1 lot orders because they signed up with a broker thinking they will get rich because they were given 500:1 margin and can risk it all on each trade. Worst-case scenario you lose your account, best case scenario you become a millionaire very quickly. Seems like a pretty good gamble right? You are dead wrong.

As a new trader, you should never risk more than 1% of your account balance on a trade. If you have some experience and are confident and doing well, then it's perfectly natural to risk 2-3% of your account per trade. Anybody who risks more than 4-5% of their account on a single trade deserves to blow their account. At that point you aren't trading, you are gambling. Don't pretend you are a trader when really you are just putting everything on red and hoping the roulette ball lands in the right spot. It's stupid and reckless and going to screw you very quickly.

Let's do some math here:

You put $2,000 into your trading account.
Risking 1% means you are willing to lose $20 per trade. That means you are going to be trading micro lots, or 0.01 lots most likely ($0.10/pip). At that level you can have a trade stop loss at -200 pips and only lose $20. It's the best starting point for anybody. Additionally, if you SL 20 trades in a row you are only down $200 (or 10% of your account) which isn't that difficult to recover from.
Risking 3% means you are willing to lose $60 per trade. You could do mini lots at this point, which is 0.1 lots (or $1/pip). Let's say you SL on 20 trades in a row. You've just lost $1,200 or 60% of your account. Even veteran traders will go through periods of repeat SL'ing, you are not a special snowflake and are not immune to periods of major drawdown.
Risking 5% means you are willing to lose $100 per trade. SL 20 trades in a row, your account is blown. As Red Foreman would call it - Good job dumbass.

Never risk more than 1% of your account on any trade until you can show that you are either consistently breaking even or making a profit. By consistently, I mean 200 trades minimum. You do 200 trades over a period of time and either break-even or make a profit, then you should be alright to increase your risk.

Unfortunately, this is where many retail traders get greedy and blow it. They will do 10 trades and hit their profit target on 9 of them. They will start seeing huge piles of money in their future and get greedy. They will start taking more risk on their trades than their account can handle.

200 trades of break-even or profitable performance risking 1% per trade. Don't even think about increasing your risk tolerance until you do it. When you get to this point, increase you risk to 2%. Do 1,000 trades at this level and show break-even or profit. If you blow your account, go back down to 1% until you can figure out what the hell you did differently or wrong, fix your strategy, and try again.

Once you clear 1,000 trades at 2%, it's really up to you if you want to increase your risk. I don't recommend it. Even 2% is bordering on gambling to be honest.


LESSON 4 - THE 500 PIP DRAWDOWN RULE

This is a rule I created for myself and it's a great way to help protect your account from blowing.

Sometimes the market goes insane. Like really insane. Insane to the point that your broker can't keep up and they can't hold your orders to the SL and TP levels you specified. They will try, but during a flash crash like we had at the start of January 2019 the rules can sometimes go flying out the window on account of the trading servers being unable to keep up with all the shit that's hitting the fan.

Because of this I live by a rule I call the 500 Pip Drawdown Rule and it's really quite simple - Have enough funds in your account to cover a 500 pip drawdown on your largest open trade. I don't care if you set a SL of -50 pips. During a flash crash that shit sometimes just breaks.

So let's use an example - you open a 0.1 lot short order on USDCAD and set the SL to 50 pips (so you'd only lose $50 if you hit stoploss). An hour later Trump makes some absurd announcement which causes a massive fundamental event on the market. A flash crash happens and over the course of the next few minutes USDCAD spikes up 500 pips, your broker is struggling to keep shit under control and your order slips through the cracks. By the time your broker is able to clear the backlog of orders and activity, your order closes out at 500 pips in the red. You just lost $500 when you intended initially to only risk $50.

It gets kinda scary if you are dealing with whole lot orders. A single order with a 500 pip drawdown is $5,000 gone in an instant. That will decimate many trader accounts.

Remember my statements above about Forex being a cruel bitch of a mistress? I wasn't kidding.

Granted - the above scenario is very rare to actually happen. But glitches to happen from time to time. Broker servers go offline. Weird shit happens which sets off a fundamental shift. Lots of stuff can break your account very quickly if you aren't using proper risk management.


LESSON 5 - UNDERSTAND DIFFERENT TRADING METHODOLOGIES

Generally speaking, there are 3 trading methodologies that traders employ. It's important to figure out what method you intend to use before asking for help. Each has their pros and cons, and you can combine them in a somewhat hybrid methodology but that introduces challenges as well.

In a nutshell:

Now you may be thinking that you want to be a a price action trader - you should still learn the principles and concepts behind TA and FA. Same if you are planning to be a technical trader - you should learn about price action and fundamental analysis. More knowledge is better, always.

With regards to technical analysis, you need to really understand what the different indicators are tell you. It's very easy to misinterpret what an indicator is telling you, which causes you to make a bad trade and lose money. It's also important to understand that every indicator can be tuned to your personal preferences.

You might find, for example, that using Bollinger Bands with the normal 20 period SMA close, 2 standard deviation is not effective for how you look at the chart, but changing that to say a 20 period EMA average price, 1 standard deviation bollinger band indicator could give you significantly more insight.


LESSON 6 - TIMEFRAMES MATTER

Understanding the differences in which timeframes you trade on will make or break your chosen strategy. Some strategies work really well on Daily timeframes (i.e. Ichimoku) but they fall flat on their face if you use them on 1H timeframes, for example.

There is no right or wrong answer on what timeframe is best to trade on. Generally speaking however, there are 2 things to consider:


If you are a total newbie to forex, I suggest you don't trade on anything shorter than the 1H timeframe when you are first learning. Trading on higher timeframes tends to be much more forgiving and profitable per trade. Scalping is a delicate art and requires finesse and can be very challenging when you are first starting out.


LESSON 7 - AUTOBOTS...ROLL OUT!

Yeah...I'm a geek and grew up with the Transformers franchise decades before Michael Bay came along. Deal with it.

Forex bots are called EA's (Expert Advisors). They can be wonderous and devastating at the same time. /Forex is not really the best place to get help with them. That is what /algotrading is useful for. However some of us that lurk on /Forex code EA's and will try to assist when we can.

Anybody can learn to code an EA. But just like how 95% of retail traders fail, I would estimate the same is true for forex bots. Either the strategy doesn't work, the code is buggy, or many other reasons can cause EA's to fail. Because EA's can often times run up hundreds of orders in a very quick period of time, it's critical that you test them repeatedly before letting them lose on a live trading account so they don't blow your account to pieces. You have been warned.

If you want to learn how to code an EA, I suggest you start with MQL. It's a programming language which can be directly interpretted by Meta Trader. The Meta Trader terminal client even gives you a built in IDE for coding EA's in MQL. The downside is it can be buggy and glitchy and caused many frustrating hours of work to figure out what is wrong.

If you don't want to learn MQL, you can code an EA up in just about any programming language. Python is really popular for forex bots for some reason. But that doesn't mean you couldn't do it in something like C++ or Java or hell even something more unusual like JQuery if you really wanted.

I'm not going to get into the finer details of how to code EA's, there are some amazing guides out there. Just be careful with them. They can be your best friend and at the same time also your worst enemy when it comes to forex.

One final note on EA's - don't buy them. Ever. Let me put this into perspective - I create an EA which is literally producing money for me automatically 24/5. If it really is a good EA which is profitable, there is no way in hell I'm selling it. I'm keeping it to myself to make a fortune off of. EA's that are for sale will not work, will blow your account, and the developer who coded it will tell you that's too darn bad but no refunds. Don't ever buy an EA from anybody.

LESSON 8 - BRING ON THE HATERS

You are going to find that this subreddit is frequented by trolls. Some of them will get really nasty. Some of them will threaten you. Some of them will just make you miserable. It's the price you pay for admission to the /Forex club.

If you can't handle it, then I suggest you don't post here. Find a more newbie-friendly site. It sucks, but it's reality.

We often refer to trolls on this subreddit as shitcunts. That's your word of the day. Learn it, love it. Shitcunts.


YOU MADE IT, WELCOME TO FOREX!

If you've made it through all of the above and aren't cringing or getting scared, then welcome aboard the forex train! You will fit in nicely here. Ask your questions and the non-shitcunts of our little corner of reddit will try to help you.

Assuming this post doesn't get nuked and I don't get banned for it, I'll add more lessons to this post over time. Lessons I intend to add in the future:
If there is something else you feel should be included please drop a comment and I'll add it to the above list of pending topics.

Cheers,

Bob



submitted by wafflestation to Forex [link] [comments]

Features of Forex InControl Reborn

Forex expert advisors are in demand in the Forex market these days, due to the myriad of advantages they provide. It allows trading with several EAs on one account without getting big drawdowns. It also includes trading history for the last 14 years.
submitted by fxroboreview to u/fxroboreview [link] [comments]

Stock Market Week Ahead for the trading week beginning February 4th, 2019 (News, Earnings, etc.)

Hey what's up stocks! Good morning and happy Sunday to all of you on this subreddit. I hope everyone made out pretty decent last week in the market, and are ready for the new trading week ahead! :)
Here is everything you need to know to get you ready for the trading week beginning February 4th, 2019.

Jobs report removes some fear, but market still in 'tug of war' over how much growth is slowing - (Source)

After January's strong jobs report calmed some recession fears, investors will be picking through the next wave of earnings reports and economic data for clues on just how much the U.S. economy could be slowing.
Dozens of earnings, from companies like Alphabet, Disney and Eli Lily, report in the week ahead, and there are just a few economic reports like trade data and ISM services on Tuesday. Investors will also be watching the outcome of Treasury auctions for $84 billion in Treasury notes and bonds Tuesday through Thursday, after the Fed's dovish tone helped put a lid on interest rates in the past week.
Nearly half the S&P 500 companies had reported for the fourth quarter by Friday morning, and 71 percent beat earnings estimates, while 62 percent have beaten revenue estimates. But earnings growth forecasts for the first quarter continue to decline as more companies report, and they are currently barely breaking even at under 1 percent growth, versus the 15 percent growth in the fourth quarter, according to Refinitiv.
"Granted the more we hear from companies, and particularly in terms of their guidance and projections on revenues, things can slowly change. The first thing companies do is they stop spending money. Cap spending slows down, and if revenue growth does not pick up, they let people go. This is still wait and see," said Quincy Krosby, chief market strategist at Prudential Financial.
Krosby said the 304,000 jobs added in January did ease some concerns about a slowing economy, as did a stronger than expected ISM manufacturing report Friday. But the view of the first quarter is still unclear, as many economic reports were missed during the government shutdown. Economists expect growth in the first quarter of just above 2 percent, after growth of about 2.9 percent in the fourth quarter.
Stocks closed out January with a sharp gain on Thursday, and started February on Friday on a flattish note. The S&P 500 has rebounded about 15 percent from its Dec. 24 closing low. Last month's 7.9 percent gain was the best performance for January in more than 30 years. The old Wall Street adage says 'so goes January, so goes the year.' If that holds, stocks could finish 2019 higher. But February is another story, and on average, it is a flat month for the S&P 500.
"The tug of war that you saw in the market, that was going on in the last half of last year is playing out in the data. Some of the data is a bit lower, but some of the economic surprises are picking up to the upside rather than downside," said Krosby.
Peter Boockvar, chief investment strategist at Bleakley Advisory Group, said the ISM may have improved but it reflected very low exports and flat backlogs, even though there was a snap back in new orders.
"I would fade the jobs report," said Boockvar, noting the level of growth may have been inflated by government workers taking on part-time jobs during the government shutdown.
Boocvkar said the jobs report also looked strong on the surface, but he's concerned the unemployment rate ticked up to 4 percent from 3.9 percent.
"The question of whether we go into a recession or not is how does the stock market affect confidence?" Boockvar said. Confidence readings in the past week were low, and consumer sentiment Friday was its lowest since before President Donald Trump took office.
Krosby said stocks could test recent lows or put in a higher low. If there's a big selloff, "That would not necessarily mean it was a clue a recession is coming. It's just a normal testing mechanism," she said.
The Fed removed a big concern from the markets in the past week, when its post-meeting statement and Fed Chairman Jerome Powell's briefing tilted dovish, assuring markets the Fed would pause in its interest rate hiking. Investors had feared the Fed would hurt the softening economy with its rate hikes. Now, the biggest fears are about the trade war between the U.S. and China and slowing Chinese growth.
The jobs report, and the ISM manufacturing data were also important because the lack of data during the government's 35 day shutdown has left gaps in the economic picture.
"This is really a sign the Fed stole the thunder from the economic data. By saying they're patient plasters over any kind of economic data in the near term, and I suspect the near term lasts through the first quarter because of the government shutdown, the weather, weak GDP," said Marc Chandler, chief market strategist at Bannockburn Global Forex.
Chandler said the markets will be hanging on any news on the trade talks with China. "Even if it's not the all encompassing trade deal we were promised, it's a return to where we were before with China promising to buy energy and farm products. We'll continue to have some kind of talks with the China, like we had under Obama and Bush," said Chandler.

This past week saw the following moves in the S&P:

(CLICK HERE FOR THE FULL S&P TREE MAP FOR THE PAST WEEK!)

Major Indices for this past week:

(CLICK HERE FOR THE MAJOR INDICES FOR THE PAST WEEK!)

Major Futures Markets as of Friday's close:

(CLICK HERE FOR THE MAJOR FUTURES INDICES AS OF FRIDAY!)

Economic Calendar for the Week Ahead:

(CLICK HERE FOR THE FULL ECONOMIC CALENDAR FOR THE WEEK AHEAD!)

Sector Performance WTD, MTD, YTD:

(CLICK HERE FOR FRIDAY'S PERFORMANCE!)
(CLICK HERE FOR THE WEEK-TO-DATE PERFORMANCE!)
(CLICK HERE FOR THE MONTH-TO-DATE PERFORMANCE!)
(CLICK HERE FOR THE 3-MONTH PERFORMANCE!)
(CLICK HERE FOR THE YEAR-TO-DATE PERFORMANCE!)
(CLICK HERE FOR THE 52-WEEK PERFORMANCE!)

Percentage Changes for the Major Indices, WTD, MTD, QTD, YTD as of Friday's close:

(CLICK HERE FOR THE CHART!)

S&P Sectors for the Past Week:

(CLICK HERE FOR THE CHART!)

Major Indices Pullback/Correction Levels as of Friday's close:

(CLICK HERE FOR THE CHART!)

Major Indices Rally Levels as of Friday's close:

(CLICK HERE FOR THE CHART!)

Most Anticipated Earnings Releases for this week:

(CLICK HERE FOR THE CHART!)

Here are the upcoming IPO's for this week:

(CLICK HERE FOR THE CHART!)

Friday's Stock Analyst Upgrades & Downgrades:

(CLICK HERE FOR CHART LINK #1!)
(CLICK HERE FOR CHART LINK #2!)

Now What?

What a year it has been. After the worst December for stocks in 87 years that contributed to the worst fourth quarter since the 2008–09 financial crisis, stocks have bounced back in spectacular fashion. In fact, with a day to go, stocks are looking at their best first month of the year in 30 years.
What could happen next? “We like to say that the easy 10% has been made off the lows and the next 10% will be much tougher,” explained LPL Senior Market Strategist Ryan Detrick. “Things like Fed policy, China uncertainty, and overall global growth concerns all will play a part in where equity markets go from here.”
With the S&P 500 Index about 10% away from new highs, we do think new highs are quite possible at some point this year. Positive news from the Federal Reserve (Fed) and China trade talks, as well as the realization by investors that the odds of a recession in 2019 are quite low could spark potential new highs. Remember, fiscal spending as a percentage of overall gross domestic product (GDP) is higher this year than it was last year. Many think the tax cut and fiscal policies in play last year were a one-time sugar high. We don’t see it that way and expect the benefits from fiscal policy to help extend this economic cycle at least another year—likely more.
As we head into February, note that it hasn’t been one of the best months for stocks. In fact, as our LPL Chart of the Day shows, since 1950, February has been virtually flat, and over the past 20 years only June and September have shown worse returns. Overall, the market gains have been quite impressive since the December 24 lows, but we wouldn’t be surprised at all to see a near-term consolidation or pullback.
(CLICK HERE FOR THE CHART!)

A Fed Pause and the Flattening Yield Curve

Investors have increasingly positioned for a Federal Reserve (Fed) pause, which could portend a shift in fixed income markets. Fed fund futures are pricing in about a 70% probability that the Fed will keep rates unchanged for the rest of 2019, and the market’s dovish tilt has weighed on short-term rates.
As shown in the LPL Chart of the Day, the 2-year yield has typically followed the fed funds rate since policymakers began raising rates in December 2015. While we expect one or two more hikes this cycle, there is a possibility that the Fed’s December hike was its last, which will likely cap short-term rates.
(CLICK HERE FOR THE CHART!)
Short-term yields have outpaced longer-term yields over the past few years, flattening the yield curve and raising concerns that U.S. economic progress may not be able to keep up with the Fed’s tightening. The spread between the 2-year and 10-year yield has fallen negative before every single U.S. recession since 1970.
If the Fed pauses, the curve will likely reverse course and steepen as solid economic growth and quickening (but manageable) inflation drives longer-term yields higher. As mentioned in our Outlook 2019, FUNDAMENTAL: How to Focus on What Really Matters in the Markets, we’re forecasting the 10-year Treasury yield will increase significantly from current levels and trade within a range of 3.25–3.75% in 2019.
“We remain optimistic about U.S. economic growth prospects, and recent data show inflation remains at manageable levels,” said LPL Research Chief Investment Strategist John Lynch. “Because of this, we expect the data-dependent Fed to be less aggressive than initially feared, as policymakers juggle these factors with the impacts of trade tensions and tepid global growth.”
To be clear, investors shouldn’t fear a flattening yield curve given the backdrop of solid economic growth and modest inflation. Historically, the yield curve has remained relatively flat or inverted for years before some recessions started. Since 1970, the United States has entered a recession an average of 21 months after the yield curve inverted.

Jobless Claims’ Historic Significance

Jobless claims have dropped to a 49-year low. Based on historical trends, this could signal that a U.S. economic recession is further off than many expect.
Data released January 24 showed jobless claims fell to 199K in the week ending January 18, the lowest number since 1969 and far below consensus estimates of 218K. As shown in the LPL Chart of the Day, current jobless claims have been significantly lower than those in the 12-month periods preceding each recession since the early 1970s.
(CLICK HERE FOR THE CHART!)
Jobless claims have fallen out of the spotlight as the economic cycle has matured, but they could prove important again as investors’ recessionary fears increase. While most labor-market data serve as lagging indicators of U.S. economic health, jobless claims are a leading indicator. Historically, a 75–100K increase in claims over a 26-week period has been associated with a recession.
“Last week’s jobless claims print was particularly impressive given the partial government shutdown and weakening corporate sentiment,” said LPL Research Chief Investment Strategist John Lynch. “The U.S. labor market remains strong and will help buoy consumer health and output growth this year.”
Other predictive data sets have signaled U.S. recessionary odds are low. Data last week showed the Conference Board’s Leading Economic Index (LEI), based on 10 leading economic indicators (like jobless claims, manufacturers’ new orders, and stock prices), grew 4.3% year over year in December. In contrast, the LEI has turned negative year over year before all economic recessions since 1970. Because of its solid predictive ability, the LEI is a component of our Recession Watch Dashboard.

Best S&P January Since 1987

Most major U.S. stock indexes rallied to new recovery and year-to-date highs today shrugging off some misses and weakness from Microsoft, DuPont and Visa. S&P 500 finished the month strong with a 7.9% gain. This is the best S&P January since 1987. This is also the third January Trifecta in a row.
Last year the S&P 500 crumbled in the fourth quarter under the weight of triple threats from a hawkish and confusing Fed, a newly divided Congress and the U.S. trade battle with China, finishing in the red. 2017’s Trifecta was followed by a full-year gain of 19.4%, including a February-December gain of 17.3%. As you can see in the table below, the long term track record of the Trifecta is rather impressive, posting full-year gains in 27 of the 30 prior years with an average gain for the S&P 500 of 17.1%.
Devised by Yale Hirsch in 1972, the January Barometer has registered ten major errors since 1950 for an 85.5% accuracy ratio. This indicator adheres to propensity that as the S&P 500 goes in January, so goes the year. Of the ten major errors Vietnam affected 1966 and 1968. 1982 saw the start of a major bull market in August. Two January rate cuts and 9/11 affected 2001.The market in January 2003 was held down by the anticipation of military action in Iraq. The second worst bear market since 1900 ended in March of 2009 and Federal Reserve intervention influenced 2010 and 2014. In 2016, DJIA slipped into an official Ned Davis bear market in January. Including the eight flat years yields a .739 batting average.
Our January Indicator Trifecta combines the Santa Claus Rally, the First Five Days Early Warning System and our full-month January Barometer. The predicative power of the three is considerably greater than any of them alone; we have been rather impressed by its forecasting prowess. This is the 31st time since 1949 that all three January Indicators have been positive and the twelfth time (previous eleven times highlighted in grey in table below) this has occurred in a pre-election year.
(CLICK HERE FOR THE CHART!)
With the Fed turning more dovish and President Trump tacking to the center and meeting with China and market internals improving along with the gains, the market is tracking Base Case and Best Case scenarios outlined in our 2019 Annual Forecast. Next eleven month and full-year 2019 performance is expected to be more in line with typical Pre-Election returns.

February Almanac: Small-Caps Tend to Outperform

Even though February is right in the middle of the Best Six Months, its long-term track record, since 1950, is not all that stellar. February ranks no better than seventh and has posted paltry average gains except for the Russell 2000. Small cap stocks, benefiting from “January Effect” carry over; tend to outpace large cap stocks in February. The Russell 2000 index of small cap stocks turns in an average gain of 1.1% in February since 1979—just the seventh best month for that benchmark.
In pre-election years, February’s performance generally improves with average returns all positive. NASDAQ performs best, gaining an average 2.8% in pre-election-year Februarys since 1971. Russell 2000 is second best, averaging gains of 2.5% since 1979. DJIA, S&P 500 and Russell 1000, the large-cap indices, tend to lag with average advances of around 1.0%.
(CLICK HERE FOR THE CHART!)

5% Months

7%? Bulls will take it! After an abysmal December, the S&P 500 is currently set to finish the month with its best January return since 1987. This month’s gain will mark the 16th time since the lows of the Financial Crisis in March 2009 that the S&P 500 has rallied more than 5% in a given month. The table below highlights each of the 15 prior months where the S&P 500 rallied more than 5% and shows how much the S&P 500 gained on the month as well as its performance on the last trading day of the month and the first trading day of the subsequent month.
When looking at the table, a few things stand out. First, the first trading day of a month that follows a month where the S&P 500 rallied more than 5% has been extremely positive as the S&P 500 averages a gain of 0.84% (median: 1.01%) with positive returns 13 out of 15 times! In addition to the positive tendency of markets on the first day of the new month, there has also been a clear tendency for the S&P 500 to decline on the last trading day of the strong month. The average decline on the last trading day of a strong month has been 0.09% with positive returns less than half of the time. This is no doubt related to the fact that funds are forced to rebalance out of equities to get back inline with their benchmark weights. However, on those five prior months where the S&P 500 bucked the trend and was positive on the last trading day of a 5%+ month, the average gain on the first trading day of the next month was even stronger at 1.52% with gains five out of six times.
(CLICK HERE FOR THE CHART!)

STOCK MARKET VIDEO: Stock Market Analysis Video for February 1st, 2019

([CLICK HERE FOR THE YOUTUBE VIDEO!]())
(VIDEO NOT YET UP!)

STOCK MARKET VIDEO: ShadowTrader Video Weekly 2.3.19

([CLICK HERE FOR THE YOUTUBE VIDEO!]())
(VIDEO NOT YET UP!)
Here are the most notable companies reporting earnings in this upcoming trading month ahead-
  • $GOOGL
  • $TWTR
  • $SNAP
  • $CLF
  • $TTWO
  • $ALXN
  • $DIS
  • $BP
  • $CLX
  • $SYY
  • $GM
  • $GILD
  • $CMG
  • $GRUB
  • $EA
  • $STX
  • $SPOT
  • $AMG
  • $SAIA
  • $RL
  • $CNC
  • $EL
  • $UFI
  • $GLUU
  • $MTSC
  • $JOUT
  • $PM
  • $GPRO
  • $LITE
  • $FEYE
  • $SWKS
  • $LLY
  • $MPC
  • $BDX
  • $REGN
  • $VIAB
  • $ONVO
  • $HUM
  • $ARRY
  • $PBI
  • $ADM
  • $BSAC
(CLICK HERE FOR NEXT WEEK'S MOST NOTABLE EARNINGS RELEASES!)
(CLICK HERE FOR NEXT WEEK'S HIGHEST VOLATILITY EARNINGS RELEASES!)
(CLICK HERE FOR NEXT WEEK'S BIGGEST DECLINE IN EARNINGS EXPECTATIONS!)
(CLICK HERE FOR NEXT WEEK'S HIGHEST INCREASE IN EARNINGS EXPECTATIONS!)
Below are some of the notable companies coming out with earnings releases this upcoming trading week ahead which includes the date/time of release & consensus estimates courtesy of Earnings Whispers:

Monday 2.4.19 Before Market Open:

(CLICK HERE FOR MONDAY'S PRE-MARKET EARNINGS TIME & ESTIMATES!)

Monday 2.4.19 After Market Close:

(CLICK HERE FOR MONDAY'S AFTER-MARKET EARNINGS TIME & ESTIMATES!)

Tuesday 2.5.19 Before Market Open:

(CLICK HERE FOR TUESDAY'S PRE-MARKET EARNINGS TIME & ESTIMATES LINK #1!)
(CLICK HERE FOR TUESDAY'S PRE-MARKET EARNINGS TIME & ESTIMATES LINK #2!)

Tuesday 2.5.19 After Market Close:

(CLICK HERE FOR TUESDAY'S AFTER-MARKET EARNINGS TIME & ESTIMATES LINK #1!)
(CLICK HERE FOR TUESDAY'S AFTER-MARKET EARNINGS TIME & ESTIMATES LINK #2!)

Wednesday 2.6.19 Before Market Open:

(CLICK HERE FOR WEDNESDAY'S PRE-MARKET EARNINGS TIME & ESTIMATES!)

Wednesday 2.6.19 After Market Close:

(CLICK HERE FOR WEDNESDAY'S AFTER-MARKET EARNINGS TIME & ESTIMATES LINK #1!)
(CLICK HERE FOR WEDNESDAY'S AFTER-MARKET EARNINGS TIME & ESTIMATES LINK #2!)

Thursday 2.7.19 Before Market Open:

(CLICK HERE FOR THURSDAY'S PRE-MARKET EARNINGS TIME & ESTIMATES LINK #1!)
(CLICK HERE FOR THURSDAY'S PRE-MARKET EARNINGS TIME & ESTIMATES LINK #1!)

Thursday 2.7.19 After Market Close:

(CLICK HERE FOR THURSDAY'S AFTER-MARKET EARNINGS TIME & ESTIMATES LINK #1!)
(CLICK HERE FOR THURSDAY'S AFTER-MARKET EARNINGS TIME & ESTIMATES LINK #2!)

Friday 2.8.19 Before Market Open:

(CLICK HERE FOR FRIDAY'S PRE-MARKET EARNINGS TIME & ESTIMATES!)

Friday 2.8.19 After Market Close:

([CLICK HERE FOR FRIDAY'S AFTER-MARKET EARNINGS TIME & ESTIMATES!]())
NONE.

Alphabet, Inc. -

Alphabet, Inc. (GOOGL) is confirmed to report earnings at approximately 4:05 PM ET on Monday, February 4, 2019. The consensus earnings estimate is $11.08 per share on revenue of $31.28 billion and the Earnings Whisper ® number is $11.03 per share. Investor sentiment going into the company's earnings release has 71% expecting an earnings beat. Consensus estimates are for year-over-year earnings growth of 14.23% with revenue decreasing by 3.23%. Short interest has decreased by 6.6% since the company's last earnings release while the stock has drifted higher by 6.7% from its open following the earnings release to be 0.7% below its 200 day moving average of $1,127.05. Overall earnings estimates have been revised lower since the company's last earnings release. On Thursday, January 24, 2019 there was some notable buying of 1,493 contracts of the $1,200.00 call expiring on Friday, February 15, 2019. Option traders are pricing in a 5.2% move on earnings and the stock has averaged a 3.8% move in recent quarters.

(CLICK HERE FOR THE CHART!)

Twitter, Inc. $33.19

Twitter, Inc. (TWTR) is confirmed to report earnings at approximately 7:00 AM ET on Thursday, February 7, 2019. The consensus earnings estimate is $0.25 per share on revenue of $871.59 million and the Earnings Whisper ® number is $0.29 per share. Investor sentiment going into the company's earnings release has 73% expecting an earnings beat. Consensus estimates are for year-over-year earnings growth of 38.89% with revenue increasing by 19.14%. Short interest has decreased by 54.7% since the company's last earnings release while the stock has drifted higher by 6.0% from its open following the earnings release to be 3.1% below its 200 day moving average of $34.24. Overall earnings estimates have been revised higher since the company's last earnings release. On Monday, December 31, 2018 there was some notable buying of 45,575 contracts of the $34.00 call expiring on Friday, March 15, 2019. Option traders are pricing in a 13.4% move on earnings and the stock has averaged a 13.9% move in recent quarters.

(CLICK HERE FOR THE CHART!)

Snap Inc. $6.91

Snap Inc. (SNAP) is confirmed to report earnings at approximately 4:10 PM ET on Tuesday, February 5, 2019. The consensus estimate is for a loss of $0.08 per share on revenue of $376.64 million and the Earnings Whisper ® number is ($0.04) per share. Investor sentiment going into the company's earnings release has 31% expecting an earnings beat The company's guidance was for revenue of $355.00 million to $380.00 million. Consensus estimates are for year-over-year earnings growth of 27.27% with revenue increasing by 31.83%. Short interest has decreased by 1.8% since the company's last earnings release while the stock has drifted higher by 12.7% from its open following the earnings release to be 33.6% below its 200 day moving average of $10.40. Overall earnings estimates have been revised higher since the company's last earnings release. On Thursday, January 3, 2019 there was some notable buying of 29,739 contracts of the $7.00 call expiring on Friday, February 15, 2019. Option traders are pricing in a 15.7% move on earnings and the stock has averaged a 19.2% move in recent quarters.

(CLICK HERE FOR THE CHART!)

Cleveland-Cliffs Inc $10.53

Cleveland-Cliffs Inc (CLF) is confirmed to report earnings at approximately 8:00 AM ET on Friday, February 8, 2019. The consensus earnings estimate is $0.57 per share on revenue of $713.61 million and the Earnings Whisper ® number is $0.63 per share. Investor sentiment going into the company's earnings release has 87% expecting an earnings beat. Consensus estimates are for year-over-year earnings growth of 119.23% with revenue increasing by 18.76%. Short interest has increased by 4.6% since the company's last earnings release while the stock has drifted lower by 9.8% from its open following the earnings release to be 11.2% above its 200 day moving average of $9.47. Overall earnings estimates have been revised lower since the company's last earnings release. On Monday, January 7, 2019 there was some notable buying of 10,030 contracts of the $8.00 call expiring on Thursday, April 18, 2019. Option traders are pricing in a 9.4% move on earnings and the stock has averaged a 7.0% move in recent quarters.

(CLICK HERE FOR THE CHART!)

Take-Two Interactive Software, Inc. $104.95

Take-Two Interactive Software, Inc. (TTWO) is confirmed to report earnings at approximately 7:00 AM ET on Wednesday, February 6, 2019. The consensus earnings estimate is $2.72 per share on revenue of $1.46 billion and the Earnings Whisper ® number is $2.82 per share. Investor sentiment going into the company's earnings release has 84% expecting an earnings beat The company's guidance was for earnings of $0.31 to $0.41 per share. Consensus estimates are for year-over-year earnings growth of 106.06% with revenue increasing by 203.64%. Short interest has increased by 37.1% since the company's last earnings release while the stock has drifted lower by 18.7% from its open following the earnings release to be 9.9% below its 200 day moving average of $116.52. Overall earnings estimates have been revised higher since the company's last earnings release. On Wednesday, January 23, 2019 there was some notable buying of 2,067 contracts of the $120.00 call expiring on Friday, February 15, 2019. Option traders are pricing in a 9.2% move on earnings and the stock has averaged a 8.3% move in recent quarters.

(CLICK HERE FOR THE CHART!)

Alexion Pharmaceuticals, Inc. $126.28

Alexion Pharmaceuticals, Inc. (ALXN) is confirmed to report earnings at approximately 6:35 AM ET on Monday, February 4, 2019. The consensus earnings estimate is $1.82 per share on revenue of $1.06 billion and the Earnings Whisper ® number is $1.95 per share. Investor sentiment going into the company's earnings release has 67% expecting an earnings beat. Consensus estimates are for year-over-year earnings growth of 23.81% with revenue increasing by 16.52%. Short interest has decreased by 16.7% since the company's last earnings release while the stock has drifted higher by 0.4% from its open following the earnings release to be 5.8% above its 200 day moving average of $119.40. On Friday, February 1, 2019 there was some notable buying of 1,235 contracts of the $130.00 call expiring on Friday, February 15, 2019. Option traders are pricing in a 7.8% move on earnings and the stock has averaged a 6.5% move in recent quarters.

(CLICK HERE FOR THE CHART!)

Walt Disney Co $111.30

Walt Disney Co (DIS) is confirmed to report earnings at approximately 4:05 PM ET on Tuesday, February 5, 2019. The consensus earnings estimate is $1.57 per share on revenue of $15.18 billion and the Earnings Whisper ® number is $1.62 per share. Investor sentiment going into the company's earnings release has 71% expecting an earnings beat. Consensus estimates are for earnings to decline year-over-year by 16.93% with revenue decreasing by 1.11%. Short interest has increased by 7.2% since the company's last earnings release while the stock has drifted lower by 5.8% from its open following the earnings release to be 1.9% above its 200 day moving average of $109.22. Overall earnings estimates have been revised lower since the company's last earnings release. On Friday, February 1, 2019 there was some notable buying of 8,822 contracts of the $110.00 put expiring on Friday, February 8, 2019. Option traders are pricing in a 3.1% move on earnings and the stock has averaged a 2.2% move in recent quarters.

(CLICK HERE FOR THE CHART!)

BP p.l.c $41.34

BP p.l.c (BP) is confirmed to report earnings at approximately 5:25 AM ET on Tuesday, February 5, 2019. The consensus earnings estimate is $0.77 per share on revenue of $60.72 billion and the Earnings Whisper ® number is $0.75 per share. Investor sentiment going into the company's earnings release has 65% expecting an earnings beat. Consensus estimates are for year-over-year earnings growth of 20.31% with revenue decreasing by 13.28%. Short interest has increased by 6.5% since the company's last earnings release while the stock has drifted lower by 1.6% from its open following the earnings release to be 3.9% below its 200 day moving average of $43.01. Overall earnings estimates have been revised lower since the company's last earnings release. On Thursday, January 17, 2019 there was some notable buying of 2,010 contracts of the $33.00 put expiring on Friday, January 17, 2020. Option traders are pricing in a 3.3% move on earnings and the stock has averaged a 2.1% move in recent quarters.

(CLICK HERE FOR THE CHART!)

Clorox Co. $149.86

Clorox Co. (CLX) is confirmed to report earnings at approximately 6:30 AM ET on Monday, February 4, 2019. The consensus earnings estimate is $1.32 per share on revenue of $1.48 billion and the Earnings Whisper ® number is $1.34 per share. Investor sentiment going into the company's earnings release has 63% expecting an earnings beat. Consensus estimates are for year-over-year earnings growth of 7.32% with revenue increasing by 4.52%. Short interest has decreased by 9.8% since the company's last earnings release while the stock has drifted higher by 3.5% from its open following the earnings release to be 5.9% above its 200 day moving average of $141.57. Overall earnings estimates have been revised lower since the company's last earnings release. On Friday, January 18, 2019 there was some notable buying of 1,025 contracts of the $152.50 put expiring on Friday, February 8, 2019. Option traders are pricing in a 4.7% move on earnings and the stock has averaged a 3.3% move in recent quarters.

(CLICK HERE FOR THE CHART!)

SYSCO Corp. $63.57

SYSCO Corp. (SYY) is confirmed to report earnings at approximately 8:00 AM ET on Monday, February 4, 2019. The consensus earnings estimate is $0.72 per share on revenue of $14.85 billion and the Earnings Whisper ® number is $0.73 per share. Investor sentiment going into the company's earnings release has 63% expecting an earnings beat. Consensus estimates are for year-over-year earnings growth of 9.09% with revenue increasing by 3.04%. Short interest has decreased by 1.0% since the company's last earnings release while the stock has drifted lower by 2.0% from its open following the earnings release to be 5.6% below its 200 day moving average of $67.34. Overall earnings estimates have been revised lower since the company's last earnings release. On Friday, February 1, 2019 there was some notable buying of 1,691 contracts of the $66.00 call expiring on Friday, February 8, 2019. Option traders are pricing in a 4.5% move on earnings and the stock has averaged a 4.8% move in recent quarters.

(CLICK HERE FOR THE CHART!)

DISCUSS!

What are you all watching for in this upcoming trading week ahead?
Have a fantastic Sunday and a great trading week ahead to all here on stocks! ;)
submitted by bigbear0083 to stocks [link] [comments]

Differences between MetaTrader4 and MetaTrader5

MetaTrader4 (MT4) and MetaTrader5 (MT5) are the industry's two most popular and leading trading platforms for forex trading transactions. MT4 and MT5 both excel in providing automated trading systems with expert advisors. MT4 and MT5 being the platforms for same transactions though are different in their functions and workings. It's just a myth that MT5 is an upgrade of MT4.
MT4 was specifically developed for forex traders and MT5 was developed to provide traders with access to CFDs, stocks and futures. MT4 uses a programming language called MQL4 whereas MT5 uses MQL5. MT5 with MQL5 is considered to be easier to program as it allows 'Blackbox" programming which provides a better framework for users and developers of trading robots and another EA's. However, MetaQuotes have led to initiate this capability in MQL4 too leaving no difference between these two platforms. MQL4 is basically used for developing trading programmed whereas MQL5 is used to add a positional system. MQL4 requires multiple functions at one time to perform a trading transaction whereas MQL5 are faster and more efficient to execute a trading transaction as it requires only one function to work for sending trade requests.
Programs written and framed to function in MT4 cannot run in MT5. Though MT5 retains two of the basic programming advantages over MT4. Firstly, being its back-testing functions where you can test your programmed trading strategies and execute them at higher speed. This would save a lot of time and assist to run large number of back tests. Secondly, it allows multi-currency pair back testing which being together can speed up your back-testing procedures.
MT4 provides convenience to its users to customize the interface according to their trading needs. It also provides a simple and easy interface to operate. Whereas, Mt5 comes up with more additional features with providing the option to trade futures and stocks. Though MT5 has a similar layout but it offers more timeframes, services and advantages.
There are also some technical differences between MT4 and MT5 :-
· MT4 has 3 order execution types whereas MT5 has 4 order execution types.
· MT5 poses an advantage with providing partial order filing which is not in the features of MT4.
· MT5 can be netted whereas MT4 cannot.
· MT5 depicts reports in a proper format of a chart (HTML5) and tables whereas MT4 uses just the tables.
· MT5 promotes automated Log file Zip compression whereas MT4 do not.
Well after coming across various differences between MT4 and MT5 , we can ascertain that MT5 poses a better picture with added features and improved technological upgradations. Though it depends upon your usage i.e. for instance if you are new to trading and are looking to trade forex than MT4 is probable to use for the beginners whereas if you are aiming to have more versatile technology and software with extra added professional features than MT5 is the ideal option.
We here at Tradingstacks provide you option to trade from both MT4 and MT5 to give you wide varieties of platforms to trade and earn you benefits with our fast trading servers. So, what are you waiting for, get your Forex trading plan now from Tradingstacks and earn in milliseconds.
submitted by tradingstacksindia to u/tradingstacksindia [link] [comments]

Auto-trading fun with Bollinger bands [Novice level].

Whilst we have a fair few 'novice' posts about TA and Global Macro (aka "Fundamentals"), there aren't too many involving auto-trading. Seeing as I'm in the middle of teaching myself MQL4, I thought I'd throw this out there as discussion prompter.
By "novice", I mean someone who has moved beyond complete beginner ("what's a FOMC and a NFP?") but still not deploying robust and market ready strategies ("how does market structure affect news event response?"), so constructive criticism, informed commentary or taking the ideas and developing them further are very much the point of sharing in the first place. It's not meant to be a showcase of code, because the code is a mess!
This post got me thinking about how relatively trivial it would be to implement a Bollinger Band mean reversion autotrader.
Project Goals
My interest in the project was as a way to begin development of a skeleton EA that would use a custom indicator to implement trade signals. The point of this would be to allow for faster prototyping of visually based autotrading before taking it to the testing environment. The key advantage of this is that you can see on your charts which entries are being missed, something that is much more laborious to do via visual mode in the strategy tester.
Concept Development
So to begin the project, I sketched out the concept.
One way to trade Bollinger Bands is to trade the reversion to the mean. Intuitively, we expect that wider deviations from the mean will result in more reliable reversions to the mean. To explore this we could enter when price breaches the second SD band and then returns back inside it.
Here's the default Bollinger Band on default settings in MT4, demonstrating this sort of behaviour:
http://i.imgur.com/dK2oDO7.png
Prototyping
I want to use the indicator, and not the EA, to generate trade signals, as this is the point of the project for me. Because I'm lazy and grew up coding in basements, I opt to fiddle with the default indicator code rather than build up from scratch.
My first goal is to add two things.
Firstly, I want to add another layer of bands, because I saw a set up like that a while ago and liked it. (This is not a very good reason, and I think it costs me down the track).
Secondly, I want to add in a way to visually indicate the trade signals before we pass them to the EA.
Adding another set of bands is just a copy and paste of the existing bands. My learning point here is that I need to adjust the amount of buffers to match the number of bands I want. This comes into play for adding the trade signal arrows, as they need to go in the same sort of structure as the second lot of bands.
[I know from reading about the project goals in advance that EAs access custom indicators via iCustom(). This function can only receive the contents of one of the first 8 indicator buffers. Thus the idea will be that the buffer that marks out the trade entries on the indicator will later be used by the EA to mark out where entries should be. It's possible this is not the best way for EAs to access custom indicators , so input from more experienced coders is welcome!]
#property indicator_chart_window #property indicator_buffers 8 // <---- have to set this to match your copy and pasted buffer amount #property indicator_color1 LightSeaGreen #property indicator_color2 LightSeaGreen #property indicator_color3 LightSeaGreen // hack in (make 'em colourful. Turns out I didn't understand how the numbering worked, and indictator_color4 is never visualised) #property indicator_color4 clrWhite #property indicator_color5 clrWhite #property indicator_color6 clrRed #property indicator_color7 clrGreen #property indicator_color8 clrRed //--- indicator parameters input int InpBandsPeriod=50; // Bands Period input int InpBandsShift=0; // Bands Shift input double InpBandsInnerDeviations=1.0; // Add in for our other Band input double InpBandsOuterDeviations=2.0; // Bands Deviations //--- buffers double ExtMovingBuffer[]; double ExtUpperBuffer[]; double ExtLowerBuffer[]; double ExtStdDevBuffer[]; // hack in buffers (these buffers will store our trade signals) double SellSignalBuffer[]; double BuySignalBuffer[]; // these buffers will hold the additional bands. apologies for the naming, I didn't originally intend to share this double ExtUpperUpperBuffer[]; double ExtLowerLowerBuffer[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit(void) { //--- 1 additional buffer used for counting. IndicatorBuffers(8); // don't forget to adjust this to account for the new buffers IndicatorDigits(Digits); //--- middle line SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,ExtMovingBuffer); SetIndexShift(0,InpBandsShift); SetIndexLabel(0,"Bands SMA"); //--- upper band SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1,ExtUpperBuffer); SetIndexShift(1,InpBandsShift); SetIndexLabel(1,"Bands Upper"); //--- lower band SetIndexStyle(2,DRAW_LINE); SetIndexBuffer(2,ExtLowerBuffer); SetIndexShift(2,InpBandsShift); SetIndexLabel(2,"Bands Lower"); SetIndexBuffer(3,ExtStdDevBuffer); //--- Copy and paste from above, and just change the number! Upper outer band is INDEX 4 SetIndexStyle(4,DRAW_LINE); SetIndexBuffer(4,ExtUpperUpperBuffer); SetIndexShift(4,InpBandsShift); SetIndexLabel(4,"Bands Outer Upper"); //--- Copy& paste, lower outer band is INDEX 5 SetIndexStyle(5,DRAW_LINE); SetIndexBuffer(5,ExtLowerLowerBuffer); SetIndexShift(5,InpBandsShift); SetIndexLabel(5,"Bands Outer Lower"); //--- remind myself which is which so I don't forget later: sell signal is INDEX 6!!!! SetIndexStyle(6,DRAW_ARROW); SetIndexArrow(6,218); SetIndexBuffer(6,SellSignalBuffer); SetIndexShift(6,InpBandsShift); SetIndexLabel(6,"Sell Signal"); //--- buy signal is INDEX 7 !!! SetIndexStyle(7,DRAW_ARROW); SetIndexArrow(7,217); SetIndexBuffer(7,BuySignalBuffer); SetIndexShift(7,InpBandsShift); SetIndexLabel(7,"Buy Signal"); //--- check for input parameter if(InpBandsPeriod<=0) { Print("Wrong input parameter Bands Period=",InpBandsPeriod); return(INIT_FAILED); } //--- SetIndexDrawBegin(0,InpBandsPeriod+InpBandsShift); SetIndexDrawBegin(1,InpBandsPeriod+InpBandsShift); SetIndexDrawBegin(2,InpBandsPeriod+InpBandsShift); // hack in our additional buffers, so they also start at the corect point SetIndexDrawBegin(4,InpBandsPeriod+InpBandsShift); SetIndexDrawBegin(5,InpBandsPeriod+InpBandsShift); SetIndexDrawBegin(6,InpBandsPeriod+InpBandsShift); SetIndexDrawBegin(7,InpBandsPeriod+InpBandsShift); //--- initialization done return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Bollinger Bands | //+------------------------------------------------------------------+ // all of this code is from the default indicator int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { int i,pos; //--- if(rates_total<=InpBandsPeriod || InpBandsPeriod<=0) { return(0); } //--- counting from 0 to rates_total ArraySetAsSeries(ExtMovingBuffer,false); ArraySetAsSeries(ExtUpperBuffer,false); ArraySetAsSeries(ExtLowerBuffer,false); ArraySetAsSeries(ExtStdDevBuffer,false); // hack in to make sure our custom buffers run in the same direction ArraySetAsSeries(SellSignalBuffer,false); ArraySetAsSeries(ExtUpperUpperBuffer,false); ArraySetAsSeries(ExtLowerLowerBuffer,false); ArraySetAsSeries(BuySignalBuffer,false); ArraySetAsSeries(close,false); ArraySetAsSeries(high,false); ArraySetAsSeries(low,false); //--- initial zero if(prev_calculated<1) { for(i=0; i1) pos=prev_calculated-1; else pos=0; //--- main cycle for(i=pos; i After a bit of tweaking typos, the indicator now displays two sets of bands, one at 1x SD and one at 2xSD from the mean (moving average). It also has two buffers that will use the DRAW_ARROW style to mark out potential trades.
Adding trade logic
I still can't decide if it's better to isolate the logic code in the Custom Indicator or the EA, in the long run. There seem to be performative, stylistic and redundancy issues, but for the moment the project is to put the logic in the Indicator, so that's what I did.
The fastest way to prototype this idea seems to be identifying when price closes outside of the far band.
This is trivial to achieve. We compare the close to the two outer bands, and if it's outside them, then we set the relevant trade signal buffer.
//
 double tempclose = close[i]; if(tempclose>(ExtUpperUpperBuffer[i]+10*Point)) { SellSignalBuffer[i] = high[i]+(20* Point); } else { SellSignalBuffer[i] = 0; } if(tempclose<(ExtLowerLowerBuffer[i]-10*Point)) { BuySignalBuffer[i] = low[i]-(20*Point); } else { BuySignalBuffer[i]=0; } } 
It works!
http://i.imgur.com/Ak3UkkK.png
Green arrows successfully mark out possible sell entries where price closes above the top band, and red arrows mark out possible buy entries when price closes below the lower band.
The logic can be a lot more complicated than this obviously, but the point of my project is to develop the iCustom technique, rather than make a good autotrader.
Now it's time to switch to the EA.
part two to follow
submitted by alotmorealots to Forex [link] [comments]

I made my first profitable Robot and i have some questions.

I posted this in forex but they told me about this reddit so i will post it here
i have been trading forex for 2 years, tried most of the things out there but still lost my first 2 live accounts
i quite my job 3 months ago so i can be free to explore the possibilities of succeeding in this market and in this period i realized robot trading would be better for me, why?
Technical Analysis require me to be looking at the chart a lot and manual trading in general require my presence at a specific time for the trade to be a good entry, and i lake the discipline for that unfortunately.
On the other hand if i have a strategy with Specific rules then there is no point in manual trading, i can program the robot with my rules and it will do the trading for me and it is way faster to find a bad strategy through the back test and move on to continue searching for a good one.
these are my point of view on that matter please tell me what do you think about it.
Now After Exploring with my old and new strategies i found a strategy that i think should work depending on the backtest results,
if you have experience with EAs Please Review it and tell me if i should go live with it
the strategy only Works on USDJPY M5 time frame, WHY??? I keep asking myself Why would a strategy only works on a specific time frame on a specific pair and won't work on any other pair even the jpy pairs won't succeed with them, i can't understand it, WHY?
the strategy is based on price action with couple of indicators so why it performs different in different pairs?
here is the 10 Years back test results from (20 August 2007 to 20 August 2017).
http://i.imgur.com/JOIMyGn.png
and here is 5 years back test from 20 August 2012 to 20 August 2017
http://i.imgur.com/NpzKKxZ.png
is this a good result to go live with the strategy?
I back tested it with average spread, and found out if i change the spread the results change, why?
I risk only 1% per trade and i have a fixed 2.67R per trade and it's averages a trade a week
should I increase the risk maybe to 5-10% ?
and what is the minimum capital for a strategy like this?
sorry if there are stupid questions i am still new to EAs idea, and if you guys have any other tips please share it, thanks.
submitted by PhDinWastingTime to algotrading [link] [comments]

Traders who depends on ROBOTS, i have some questions.

i have been trading forex for 2 years, tried most of the things out there but still lost my first 2 live accounts
i quite my job 3 months ago so i can be free to explore the possibilities of succeeding in this market and in this period i realized robot trading would be better for me, why?
Technical Analysis require me to be looking at the chart a lot and manual trading in general require my presence at a specific time for the trade to be a good entry, and i lake the discipline for that unfortunately.
On the other hand if i have a strategy with Specific rules then there is no point in manual trading, i can program the robot with my rules and it will do the trading for me and it is way faster to find a bad strategy through the back test and move on to continue searching for a good one.
these are my point of view on that matter please tell me what do you think about it.
Now After Exploring with my old and new strategies i found a strategy that i think should work depending on the backtest results,
if you have experience with EAs Please Review it and tell me if i should go live with it
the strategy only Works on USDJPY M5 time frame, WHY??? I keep asking myself Why would a strategy only works on a specific time frame on a specific pair and won't work on any other pair even the jpy pairs won't succeed with them, i can't understand it, WHY?
the strategy is based on price action with couple of indicators so why it performs different in different pairs?
here is the 10 Years back test results from (20 August 2007 to 20 August 2017)
http://i.imgur.com/JOIMyGn.png
and here is 5 years back test from 20 August 2012 to 20 August 2017
http://i.imgur.com/NpzKKxZ.png
is this a good result to go live with the strategy?
I back tested it with average spread, and found out if i change the spread the results change, why?
I risk only 1% per trade and i have a fixed 2.67R per trade and it's averages a trade a week
should I increase the risk maybe to 5-10% ?
and what is the minimum capital for a strategy like this?
sorry if there are stupid questions i am still new to EAs idea, and if you guys have any other tips please share it, thanks.
submitted by PhDinWastingTime to Forex [link] [comments]

EA (Expert Advisers),What they are and why they are used in Forex

EA (Expert Advisers),What they are and why they are used in Forex


An expert adviser is simply a program which can execute any task it's instructed to do without any direct human involvement required.
They allow the user to automate the trading and analytical process on a given platform such as MT4.If trying to make an EA one needs to use an editor such as Meta Editor on the MT4 terminal. Then the user gives a set of instructions to the program to execute under certain conditions, it can be user to execute multiple trades in seconds or perform analytical process on any given feed/information given on the MT4 platform.
Why EAs are popular and used?
Quick to open positions and react to market volatility:
With so many instruments available to trade and so much analysis to do, humans can not make time for the analysis of the market and cannot open multiple positions to avail all the intraday opportunities in the market. While an EA can analyze a greater number of instruments to make truly a diverse portfolio and react to market volatility much faster.
EA strategies can be back tested:
The set of instructions or the strategy that you code in the EA can be back tested to ensure that it's delivering the results wanted by the developer.
No Emotions to hamper potential profits:
Emotions and psycology plays an important role when the trade goes the wrong way. One of the many benefits of an EA is that it has no emotions as compared to humans and can open close trades based on the parameters given and respond with risk management protocols if trades go wrong.
No rest needed :
Unlike humans the EA doesn't need to eat, sleep, drop kids to school or go to work etc. They start compiling the instruction set whenever the program/EA is executed. It can perform market analysis all the time without break and open trades when there are more potential opportunities in the market which the human trader might be missing because of his busy life.
However traders should be aware of the risks involved with using an EA. There are many good ones giving a substantial return over investment per anum but many of the ones which claim astronomical returns might turn out to be fraudulent. If these astronomical returns were that easy to get using EAs then all banks and hedge funds would just put their money with the EA and the world would be a much richer place :D
While checking for EAs to buy be sure to check their history , user reviews and back tested data before risking your investment. Remember many unethical brokers make fake historical trade data which these fraudulent EA developers market online and entice clients with huge returns.
For more News from the FX Markets visit our website.
We also have on demand webinars for clients who are interested in growing their knowledge in the FX sphere.
submitted by StrattonForex to u/StrattonForex [link] [comments]

EA Backtesting. Since it is a process that measures trading strategy performance using historical data, you have to get those necessary data first. MetaTrader automatically downloads some data. However, to improve the testing quality you should download it either from your broker or form trading platform repository. To do so, go to Options – Historical Center and download the data for all ... If you have heard of Forex backtesting, but always wondered how to do it, then this guide is for you. Just like everything in trading and in life, there is no one-size-fits-all. Backtesting will not work for every trader or every trading system. However, there is nothing that I have seen that has universally helped more people become successful in trading, than backtesting. I consider it vital ... Backtesting. Backtesting a strategy for its accuracy and vulnerability is of eminence. An approach works in the specific market well, say in stocks, but not in other markets like forex. Some strategies perform well only in particular timeframes. Hence a detailed feasibility and viability study of the strategy is made before using it on the live ... What is Backtesting in Forex? In forex, backtesting is when you apply historical currency pair price data to your strategy to evaluate and gauge the effectiveness of the strategy. The assumption behind backtesting is that what worked in the past can also work well in the future. This means that if a strategy is profitable based on past market conditions, there’s a chance that it will be ... Like in any other business, experience is the key in order to be successful in forex trading. Developing a trading strategy over time, that will define the way how you approach trading, is just the first step in becoming a profitable trader.. Your trading strategy might not work the way you imagined, and it can turn out that the strategy is not profitable at all. Forex backtesting software is a type of program that allows traders to test potential trading strategies using historical data. The software recreates the behaviour of trades and their reaction to a Forex trading strategy, and the resulting data can then be used to measure and optimise the effectiveness of a given strategy before applying it to real market conditions. This is a very basic EA I'm working on, here is the first version. You can use it to manually backtest strategies with MT4 Strategy Tester. It only works with Strategy Tester, and only in Visual Mode.

[index] [27292] [293] [857] [8106] [12699] [28766] [18782] [23060] [9856] [3092]

http://arab-binary-option.sucicondige.gq