//+------------------------------------------------------------------+
//| MyHandler.mqh                                                    |
//|                                                                  |
//| Example RiskGateHandler implementation.                          |
//| Rename this class and file, then implement OnSignal() with your  |
//| own risk rules and position sizing logic.                        |
//+------------------------------------------------------------------+

//--- Use the below include with KnitPkg
//#include "../knitpkg/flat/RiskGateHandlerDep_flat.mqh"

//--- Using this include instead. Are you serious?! Give KnitPkg a try ;-)
#include "RiskGateHandlerDep_flat.mqh"

//+------------------------------------------------------------------+
class MyHandler : public douglasrechia::RiskGateHandler
  {
   //+------------------------------------------------------------------+
   //| Minimal implementation for demonstration purposes.               |
   //| Replace this with your own risk rules and position sizing logic. |
   //+------------------------------------------------------------------+
   void              OnSignal(CJAVal& signal,
                              CJAVal& response) override
     {
      string symbol = signal["symbol"].ToStr();
      response["approved"] = true;
      response["lot"]      = 0.01;
      response["reason"]   = "";
     }
   string            Name() override { return "MyHandler"; }

  };
//+------------------------------------------------------------------+
