sammcdj:
Check here
The checks a trading robot must pass before publication in the Market
- www.mql5.com
Before any product is published in the Market, it must undergo compulsory preliminary checks in order to ensure a uniform quality standard. This article considers the most frequent errors made by developers in their technical indicators and trading robots. An also shows how to self-test a product before sending it to the Market.
sammcdj:
If you can post what is written in the Expert tab here, an easier solution can be found.
input double paramStopLossPoints = 20; input double paramTakeProfitPoints = 40; ...... void OnTick() { ...... double OurLotSize = 0.01; string OurComment = "GoldBond"; long OurMagicNumber = 1453535434253; color bullColor = Green; double brokerStopLevel = SymbolInfoInteger(Symbol(), SYMBOL_TRADE_FREEZE_LEVEL) * Point; int acceptableSlippage = (Digits == 5)?10:3; double ourStopLoss = paramStopLossPoints * Point; double ourTakeProfit = paramTakeProfitPoints * Point; double longBreakoutPrice = High[1] + 15 * Point; double entryPrice = MathMax(Ask + brokerStopLevel, longBreakoutPrice) + Point; ordTicket = OrderSend(Symbol(), OP_BUYSTOP, OurLotSize , entryPrice, acceptableSlippage , MathMin(entryPrice - brokerStopLevel, Low [1] - ourStopLoss) , MathMax(entryPrice + brokerStopLevel, High[1] + ourTakeProfit) , OurComment, OurMagicNumber, 0, bullColor); Print(" Price " , entryPrice, " Slipage ", acceptableSlippage , " Stop ",MathMin(entryPrice - brokerStopLevel, Low [1] - ourStopLoss) ," TP ", MathMax(entryPrice + brokerStopLevel, High[1] + ourTakeProfit) } ...... }
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