whats the problem with the arrays?
zzuegg:
whats the problem with the arrays?
whats the problem with the arrays?
{ OrderClose(OrderTicket(),OrderLots()/2,MarketInfo(OrderSymbol(),MODE_BID),3,Violet); last_close_time=TimeCurrent(); new_trade=false; //Alert(GetLastError()," 3 ",MarketInfo(OrderSymbol(),MODE_BID)," ",OrderTicket()," ",OrderLots()); Alert(GetLastError()," BUY/TP/S1"," ",OrderTicket()," ",Bid-OrderOpenPrice()); s2_orders(OrderTicket(),"add"); GlobalVariableSet(s2,OrderTicket()); }
everything worked when the ea was like this above, it was closing 50%, then moving stop to breakeven and storing the fact that "s2=true" when stop had moved to breakeven.
read the code i posted you might see the problem? hope you can. cheers.
basically what i need here is; when xzy happens on a position, stoploss is moved to breakeven. this then changes the bool s2 to "s2=true". the fact that s2 is then true need to be stored, so if the platform is restarted it will still be true until that order is deleted. s2 may be true on one curreny piar but false on another at the same time.
i hope this helps
any helpers with this

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The following code is fully working. it closes 50% of a open trade. It then moves stoploss to breakeven point. It stores the fact that stop has noved to breakeven. "s2=true".
What i need is some changes so that the code will move stoploss to breakeven only and remember this if the platform is restarted. I do not want partial close. There is prob some mods to be made in the "s2 array", i dont know what.
If someone can sort this for me i will reward them with a payment if the wish. I need to get this sorted asap.
thanks