Forum

Suggest how to fix this code

Please suggest what do I need to change on this code? Idea for code is to place at last bars one BuyStop at high and one SellStop at low. This code is just adding SellStops. extern double lot = 0.1; datetime PreviousBar; // record the candle/bar time bool NewBar() { if(PreviousBar<Time[0]) {

iHigh, definign previous bar high

Have some issues to get previous bar high price. I can not figure out how to shift it. int e; Print("Current bar for EURUSD D1: Time ", iTime(NULL,PERIOD_D1,e),", Open ", iOpen(NULL,PERIOD_D1,e),", High ", iHigh(NULL,PERIOD_D1,e),", Low ", iLow(NULL,PERIOD_D1,e),", Close ", iClose

Where to find a script for closing half position from open order?

If you have seen script like this..please send me a link where I can find it

Can Someone To Guide Me Where To Start With My EA

Hei..I want to start with programming one EA. I have tried to start with EA programming but I am getting lost alone. First thing I want EA to do is Open a trade on (defined) timeframe candle open. (Symbol(),OP_SELL,Lots,Bid,3,0,Bid-TakeProfit*Point,"",0,0,Red);