//+------------------------------------------------------------------+ //| 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
Instead we suggest setting up a forex trading company, or remaining as an IB also known as an introducing broker. For those not convinced, consider some compelling reasons why you should avoid trying to obtain a gray label: Why We Don’t Recommend Obtaining an MT4/MT5 Gray Label. The first reason you’ll have trouble starting a grey label is that many brokers are not willing to risk their ... Essentially, a forex broker offering a grey label allows the potential partner to promote their business using the direct name of the broker, instead of a branded, white label name. Unlike an IB relationship, a gray label partner has greater control over customization and the client relationship, hence the appeal. I advise everyone to spend 5 minutes reading the short document embedded below – it’s a prime example of what kind of people we sometime have to deal with in this market. December 6, Chicago – National Futures Association (NFA) has barred Robert F. Gray from NFA membership for a period of ten years. Gray … Continued Gray Label. Gray Label partnership program is designed for companies that have their own client base. With GC you can expand your range of services by offering Internet trading. Gray Label partner attracts clients under its own brand, while MPLUSFX provides all the necessary software and a number of other instruments for successful business. If you want to start your own business in the online trading industry then White Label is a perfect solution for you. CUSTOMER RELATIONSHIP MANAGEMENT - CRM CRM specializes in managing the relationships of Forex company and its customers. Trading foreign exchange on margin carries a high level of risk, and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to trade foreign exchange you should carefully consider your investment objectives, level of experience and risk appetite. The possibility exists that you could sustain a loss of some or all of your ... MT5 Grey label costs lower than the Forex White label solution yet offers an optimum range of solutions to start up a Forex Trading Business and grow over time. Its cost largely varies from one provider to another. Moreover, it largely depends on the addition of tools and services like CRM, Trader’s Room, PAMM, MAM, Liquidity, and etc.
[index] [4399] [16668] [22479] [11385] [8832] [5756] [8083] [19277] [11979] [8311]
Get Unrestricted Private Label Rights to 2 PLR Twitter videos simply by visiting the above site. Limited Offer Hurry Now! plr articles www.theplrdoctor.com shane purcell private label rights ... tattoo black and grey forex trading system garden landscape design private label rights länger durchhalten im bett forex day trading vorzeitiger samenerguss verhindern vending business länger ... David Gray 42,345 views. 45:31. 95% Winning Forex Trading Formula - Beat The Market Maker📈 - Duration: 37:53. TRADE ATS 729,161 views. 37:53. How To Paint Furniture Tutorial: Paint Dry Brush ... 95% Winning Forex Trading Formula - Beat The Market Maker📈 - Duration: 37:53. TRADE ATS Recommended for you. 37:53 . Converting Labels to Annotation - Duration: 2:19. NIFC FireAviation ... Amazon FBA Profit - Fetcher - Tool for Private Label Sellers ... LIVE Forex Trading - NY Session 27th ... The Gray Bearded Green Beret Recommended for you. 18:54. How To Fix Forward Head Posture ... Ei-san FOREX Trader 6,706 ... The Gray Bearded Green Beret Recommended for you. 18:54. อายุน้อยร้อยล้าน ธุรกิจ ... ATR Label: def atr = ATR(66); AddLabel(yes, "ATR = " + ROUND(atr, 2) + " ", Color.DARK_GRAY); Check out our other courses: Full Options Trading Course: Part 1 - Introduction to Call Options: https ...