// More information about this indicator can be found at: //https://fxcodebase.com/code/viewtopic.php?f=38&t=71627 //+------------------------------------------------------------------------------------------------+ //| Copyright © 2021, Gehtsoft USA LLC | //| http://fxcodebase.com | //+------------------------------------------------------------------------------------------------+ //| Support our efforts by donating | //| Paypal: https://goo.gl/9Rj74e | //+------------------------------------------------------------------------------------------------+ //| Developed by : Mario Jemic | //| mario.jemic@gmail.com | //| https://AppliedMachineLearning.systems | //| Patreon : https://goo.gl/GdXWeN | //+------------------------------------------------------------------------------------------------+ //+------------------------------------------------------------------------------------------------+ //|SOL Address : 4tJXw7JfwF3KUPSzrTm1CoVq6Xu4hYd1vLk3VF2mjMYh | //|Cardano/ADA : addr1v868jza77crzdc87khzpppecmhmrg224qyumud6utqf6f4s99fvqv | //|Dogecoin Address : DBGXP1Nc18ZusSRNsj49oMEYFQgAvgBVA8 | //|SHIB Address : 0x1817D9ebb000025609Bf5D61E269C64DC84DA735 | //+------------------------------------------------------------------------------------------------+ #property copyright "Copyright © 2021, Gehtsoft USA LLC" #property link "http://fxcodebase.com" #property version "1.0" #property strict extern double Lots = 0.01; // Lot Size int previous_time = 0 ; extern int MAGIC_NUMBER = 12345344; // Magic Number extern bool trade_execution = true; // Trade Execution extern bool alert_send_notification = false ; // Alert - Send Notification //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- // int numberOfText = ObjectsTotal(NULL, 0, OBJ_TEXT); int capture_time = 0 ; string copyright_type = "© GHOST SCALPER PRO"; string signal_type = "NONE"; if(numberOfText != 0) { for(int i = 0; i < numberOfText; i++) { string name = ObjectName(NULL, i, 0, OBJ_TEXT); // Alert ( name , "name goes here" ); // Find the latest one string output[]; int k = StringSplit(name, StringGetCharacter(":", 0), output); if(k > 1) { if(capture_time < StringToInteger (output[1])) { capture_time = StringToInteger (output[1]); signal_type = output[2]; copyright_type = output[0]; } } if(i == numberOfText-1) { if(previous_time == 0) { previous_time = capture_time ; } else if(previous_time != capture_time) { previous_time = capture_time ; string mapping_tp2 = copyright_type + ":" + IntegerToString( capture_time ) + ":" + signal_type + ":" + "tp2" ; string mapping_sl2 = copyright_type + ":" + IntegerToString ( capture_time ) + ":" + signal_type + ":" + "sl2" ; double take_profit = ObjectGetDouble(0,mapping_tp2,OBJPROP_PRICE,0); double stop_loss = ObjectGetDouble(0,mapping_sl2,OBJPROP_PRICE,0); if (trade_execution == true) { fx_take_trade_order(signal_type == "bear" ? 1 : 0, stop_loss, take_profit) ; } if(alert_send_notification == true ) { Alert (signal_type == "bear" ? "Sell" : "Buy" + "@ TP:" + DoubleToStr (take_profit ) + "@ SL:" + DoubleToStr ( stop_loss)); SendNotification(signal_type == "bear" ? "Sell" : "Buy" + "@ TP:" + DoubleToStr( take_profit) + "@ SL:" + DoubleToStr( stop_loss)); } } } } } } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int fx_take_trade_order(int order_type, double stop_loss, double take_profit) { double Spread = MarketInfo(Symbol(), MODE_SPREAD); bool response_order = OrderSend(Symbol(),order_type, Lots,order_type == 0 ? Ask : Bid,10, stop_loss, take_profit,"comment",MAGIC_NUMBER,0,clrNONE); if(!response_order) { Print(GetLastError(), "GetLastError()========================"); } else { // Print("Testing Of Take Trade"); } return 0 ; } //+------------------------------------------------------------------+