Forum on trading, automated trading systems and testing trading strategies
When you post code please use the CODE button (Alt-S)!
- mohammad7521: Help Please!!
Use the debugger or print out your variables, including _LastError and prices and find out why. Do you really expect us to debug your code for you?
-
Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum 2019.05.06
Messages Editor
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!
//Entry for Long Positions
if(PriceDataTable[0].close>Kijun_Sen1 && Kijun_Sen1>Kijun_Sen2)
{
if(UseStopLoss)StopLossLevel=CurrentBid+(FinalStopLossPips*_Point)*p;else StopLossLevel=0.0;
if(UseTakeProfit)TakeProfitLevel=CurrentBid+(FinalTakeProfitPips*_Point)*p;else TakeProfitLevel=0.0;
MyTradingControlPanel.PositionOpen(_Symbol,ORDER_TYPE_BUY,lot,CurrentBid,StopLossLevel,TakeProfitLevel);
if (MyTradingControlPanel.ResultRetcode()==10008 || MyTradingControlPanel.ResultRetcode()==10009)
{Print("Entry rules: A Buy order has been successfully placed with Ticket#: ", MyTradingControlPanel.ResultOrder());
}
else
{Print("Entry rules: The Buy order request could not be completed. Error: ", GetLastError());
ResetLastError();
return;
}
}
my long entry is based on price closing above the Ichimoku Kijun sen line but doesn't make any orders.
Help Please!!