Christos Papageorgiou:
I'm trying to pause the Back Testing from the EA. Can anyone help? MQL5
DebugBreak()I'm trying to pause the Back Testing from the EA. Can anyone help? MQL5
No that doesn't Pause the Back Testing.
if(trade.Buy(LotSize,NULL,Ask,(Bid-StopLoss)-(50*Point()),0,"Neural Network Indicator Signal")) { DebugBreak(); //Create Label ObjectCreate(ChartID(),(string)PositionLabel,OBJ_TEXT,0,TimeCurrent(),Bid-indATR14PriceArray[0]*4); ObjectSetString(ChartID(),(string)PositionLabel,OBJPROP_TEXT,"NN"); ObjectSetInteger(ChartID(),(string)PositionLabel,OBJPROP_COLOR,clrLime); ObjectSetDouble(ChartID(),(string)PositionLabel,OBJPROP_ANGLE,90); ObjectSetInteger(ChartID(),(string)PositionLabel,OBJPROP_BACK,false); ObjectSetInteger(ChartID(),(string)PositionLabel,OBJPROP_SELECTABLE,false); PositionLabel = PositionLabel+1; //Take ScreenShot string name=Symbol()+" "+(string)TimeCurrent()+".jpg"; int replaced=StringReplace(name,":"," "); if(PrintScreen==true)ChartScreenShot(ChartID(),name,1700,1080,ALIGN_RIGHT); //Remember Current Time Stamp for Next Time TimeStampLastCheck = TimeStampCurrentCandle; } else { Print("Error Opening the Position: ",GetLastError()," - ",ErrorDescription(GetLastError())); }
No that doesn't Pause the Back Testing.
Thanks again.
I'm trying to find a way to pause the Strategy Tester on Visualization Mode when an Order is executed.
Is there anyway just to send a keystroke "space";
#import "user32.dll" void keybd_event(int bVk, int bScan, int dwFlags,int dwExtraInfo); #import #define VK_SPACE 0x20 //Space #define VK_RETURN 0x0D //Return - Enter Key #define KEYEVENTF_KEYUP 0x0002 //Key up //Pause During Test if(MQLInfoInteger(MQL_TESTER) && MQLInfoInteger(MQL_VISUAL_MODE)) { keybd_event(VK_SPACE, 0, 0, 0); keybd_event(VK_SPACE, 0, KEYEVENTF_KEYUP , 0); }In Case Someone else is looking for a solution!!!
@Christos Papageorgiou what Alain Verleyen said is working.
Just add DebugBreak(); after you open the position, select Visualize and Start debugging. See attached screenshots (I don't know how to embed them).
You agree to website policy and terms of use
Is there any way to send keystrokes such as space key from the EA?
(Don't want to use the Debug MODE)