Validate Me framework
My interpretation of how to code a robot using market buy and sell orders to cope with market validation. This framework deals with some checks that a trading robot must pass before it is published on the market. For educational purposes.
code example BUY
ask=MarketInfo(_Symbol,MODE_ASK); Â Â Â Â Â Â Â Â bid=MarketInfo(_Symbol,MODE_BID); Â Â Â Â Â Â Â Â sl=(OrderStopPips==0)?0.0:bid-ExtOrderStop; Â Â Â Â Â Â Â Â if(sl!=0.0 && ExtOrderStop<StopLevel) Â Â Â Â Â Â Â Â Â Â Â Â sl=bid-StopLevel; Â Â Â Â Â Â Â Â tp=(OrderTakePips==0)?0.0:ask+ExtOrderTake; Â Â Â Â Â Â Â Â if(tp!=0.0 && ExtOrderTake<StopLevel) Â Â Â Â Â Â Â Â Â Â Â Â tp=ask+StopLevel; Â Â Â Â Â Â Â Â GetLot=CheckVolumeValue(Lots); Â Â Â Â Â Â Â Â if(!CheckStopLoss_Takeprofit(OP_BUY,ExtOrderStop,ExtOrderTake)) Â Â Â Â Â Â Â Â Â Â Â Â return; Â Â Â Â Â Â Â Â if(CheckMoneyForTrade(GetLot,OP_BUY)) Â Â Â Â Â Â Â Â Â Â Â Â order=OrderSend(_Symbol,OP_BUY,GetLot,ask,10,sl,tp,"FrameWork",678,0,Blue);
Framework inputs