HotKeys
EBTURK
plain_text
a year ago
785 B
17
Indexable
//+------------------------------------------------------------------+ //| OneClick.mq5 | //| Copyright 2023, EBTURK | //| https://www.ebturk.com | //+------------------------------------------------------------------+ #include <Trade/Trade.mqh> #define KEY_B 66 #define KEY_S 83 CTrade trade; void OnChartEvent(const int id, const long& lparam, const double& dparam, const string& sparam) { if(id == CHARTEVENT_KEYDOWN){ if(lparam == KEY_B){ Print("BUY"); trade.Buy(0.1); } if(lparam == KEY_S){ Print("SELL"); trade.Sell(0.1); } } }
Editor is loading...