Daily Open in EA

 

I'm trying to get the price of Daily Open by a custom indicator ......

I try to use his code but i cannot get where the code should i use.

I want to create an EA but I need the Daily Open price for a broker.

i need your help to help me how to find the daily open price . I include the indicator

Files:
 
Hello, try this
TodayOpenBuffer[shift]= iOpen(Symbol(),PERIOD_D1,shift);
 

i already solve this. I use iBarShift . So i can get the daily open.

but now i have error in OrderSend ... it give me error 103 , that is Stop Level.

I already check my OrderSend there was nothing wrong.

OrderSend(Symbol(),OP_BUYSTOP,Lots,whui+50*Point,0,whui-50*Point,whui+100*Point, "Miara", 0,0,CLR_NONE);

when i check it. I already make my stop loss less 50 pip from the whui(buying price). If i make OP_SELLSTOP , it works welll but not in BUYSTOP

 
Because your calculated Open Price(whui+50*Point) for BY_STOP order below current Ask (I'm sure at this with 99%). Check all prices before each OrderSend(), please.