pls help
bool Fun_New_Bar() { static datetime New_Time=0; bool New_Bar=false; if(New_Time!=Time[0]) { New_Time=Time[0]; New_Bar=true; } return(New_Bar); } .... if (tr>sd&&Fun_New_Bar()&&buy==0) ...
bool Fun_New_Bar() { static datetime New_Time=0; bool New_Bar=false; if(New_Time!=Time[0]) { New_Time=Time[0]; New_Bar=true; } return(New_Bar); } .... if (tr>sd&&Fun_New_Bar()&&buy==0) ...
You agree to website policy and terms of use
pls can someone tell me the code for new bar? Actually i know of this:
void Fun_New_Bar()
{
static datetime New_Time=0;
New_Bar=false;
if(New_Time!=Time[0])
{
New_Time=Time[0];
New_Bar=true;
}
}
But my problem is that i dont know if it is correct or not, and if it is correct, how am i going to refer to it ?
is it going to be in this form?
if (tr>sd&&New_Bar=true&&buy==0)
{
OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Ask-StopLoss*Point, TP,"F",0,0,Red);
}
THANKS