Closing rule is not function!! Please advice
- Function to close orders based on FIFO not closing single orders
- EA Coding Help, Please!!
- Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6.
- "You modified X based on X." Babble
- "it's not function." "Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. There are no mind readers here.
- if(OrdersTotal()==0)Using OrdersTotal directly and/or no Magic number filtering on your OrderSelect loop means your code is incompatible with every EA (including itself on other charts and manual trading.) Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 forum
- NewOrder=OrderSend(Symbol(),OP_BUY,Start_Lot_Size,Ask,slippage,0,0,"Long "+Magic_Number,Magic_Number,0,clrBlue);Check your return codes and find out why. What are Function return values ? How do I use them ? - MQL4 forum and Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
NewOrder=OrderSend(Symbol(),OP_SELL,Start_Lot_Size,Bid,slippage,0,0,"Short "+Magic_Number,Magic_Number,0,clrRed); - if(OrderProfit()<(Start_Step_Size*Point)*-2)What does $23.00 < 0.0123 mean? Currency vs distance is meaningless.
- You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support.
- Account Balance * percent/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Note OOP-OSL includes the SPREAD, and DeltaPerLot is usually around $10/pip)
- Do NOT use TickValue by itself - DeltaPerLot
- You must normalize lots
properly and check against min and max.
- You must also check FreeMargin to avoid stop out
- "You modified X based on X." Babble
- "it's not function." "Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. There are no mind readers here.
- if(OrdersTotal()==0)Using OrdersTotal directly and/or no Magic number filtering on your OrderSelect loop means your code is incompatible with every EA (including itself on other charts and manual trading.) Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 forum
- NewOrder=OrderSend(Symbol(),OP_BUY,Start_Lot_Size,Ask,slippage,0,0,"Long "+Magic_Number,Magic_Number,0,clrBlue);Check your return codes and find out why. What are Function return values ? How do I use them ? - MQL4 forum and Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
NewOrder=OrderSend(Symbol(),OP_SELL,Start_Lot_Size,Bid,slippage,0,0,"Short "+Magic_Number,Magic_Number,0,clrRed); - if(OrderProfit()<(Start_Step_Size*Point)*-2)What does $23.00 < 0.0123 mean? Currency vs distance is meaningless.
Thank you. I mean I change the closing rule to my closing rule since the original one doesn't perform as I want.
I am not a programmer and trying to learn. I'll try to recode what you said because I'm not fully understand all you said. Thank you.
I made changed based on whroeder1's suggestion. But EA still not close the positions. I'm not sure if I've done it correctly. Any further recommend for this issue? Thanks.