i need help Renko
thank you
sorry it's first time to post
but i need help please.
ExistPositions()
LastProfit()>=0
maybe ExistPosition()
or maybe LastProfit < 0
i cant see your code
B.T.W. on the first call NewCandel() can be false but on the second its gonna be always true
& it's not compiling anyway 'b' undeclared identifier
maybe ExistPosition()
or maybe LastProfit < 0
i cant see your code
B.T.W. on the first call NewCandel() can be false but on the second its gonna be always true
& it's not compiling anyway 'b' undeclared identifier
double b =0;
but
my request in other way
how can i code next bar
i tried to put
Close[-1]
but do nothing
what about
bool NewBar () { static datetime LastTime = 0; if (Time[0] != LastTime) { LastTime = Time[0]; return (true); } else return (false); }
Close[-1]
but do nothing
bool NewBar(){ static datetime LastTime = 0; if (Time[0] != LastTime){ LastTime = Time[0]; return (true); } return (false); }
| This is why I recommend not using a function (in this case.) | void OnTick(){ static datetime time0=0; datetime timePre = time0; time0 = Time[0]; bool isNewBar = time0 != timePre; : |
| Both of the above, also return true, mid-bar on initial load. If that isn't wanted: | datetime time0; int OnInit(){ time0 = Time[0]; : } void OnTick(){ datetime timePre = time0; time0 = Time[0]; bool isNewBar = time0 != timePre; : |
any one here can help me to code ea
i need code that mean
open sell order when bar open and last bar Close[1]<Open[1]
close sell order when bar close down "Bear"
and
open buy order when bar open and last bar Close[1]>Open[1]
close buy order when bar close up "Bull"
i can't code this,
when i use newbar open code :
to open order, that's goodbut when i called newbar function again and add condtions"Bear or Bull" to close ... no thing happen
.................................
this is my code .. can any one here help me