need some help here, which is better?
I tried profiling which is very new to me
//+------------------------------------------------------------------+ //| Check Close | //+------------------------------------------------------------------+ void CheckClose() { //--- bool cPos = false; double tmpTP = TP, tmpSL = SL; MqlTick tick; for(int i = PositionsTotal() - 1; i >= 0; i--) { if(position.SelectByIndex(i) && position.Symbol() == _Symbol && position.Magic() == MagicNum) { if(position.PositionType() == POSITION_TYPE_BUY) { if(!SymbolInfoTick(_Symbol, tick)) return; if(tick.bid - position.PriceOpen() > tmpTP * adjustpt) { cPos = true; } if(position.PriceCurrent() - position.PriceOpen() > tmpTP * adjustpt) { cPos = true; } } if(cPos) { } } } //--- }
There is no difference.
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
Hi all,
I'm currently PositionInfo's pricecurrent to check my position for take profit and experiencing sever slippage
will changing to symbolinfotick improves the situation?
Is there any difference between these two method?