Hello everyone, I need a little help. I have a Indicator which has two buttons: Sell & Buy
So, what is my problem? the code worked good, but something happened and I really don't know what! The code doesn't work anymore and I don't know why.
This is my code:
This is my code
Attached Image
So, what is my problem? the code worked good, but something happened and I really don't know what! The code doesn't work anymore and I don't know why.
This is my code:
Inserted Code
if (guiIsClicked(hwnd,BuyButton)) { PlaySound("ok.wav"); int ticket,iSlipPage,iSLPips,iTPPips; double dStopLoss, dTakeProfit; string sText,sArrow,dLots; iSLPips=guiGetText(hwnd,SellStop); //Stop Loss in Pips iTPPips=guiGetText(hwnd,BuyStop); //Take Profit in Pips dLots=guiGetText(hwnd,TradeLots); //Amount of Lots iSlipPage=100; sText="My Order"; //Order Text dStopLoss=Ask-NormalizeDouble(iSLPips*Point,MarketInfo(Symbol(),MODE_DIGITS)); dTakeProfit=Ask+NormalizeDouble(iTPPips*Point,MarketInfo(Symbol(),MODE_DIGITS)); ticket=OrderSend(Symbol(),OP_BUY,dLots,Ask,iSlipPage,dStopLoss, dTakeProfit,sText,000,0); if(ticket<0) { Print("OrderSend failed with error #",GetLastError()); } }
This is my code
"Rule No.1: Never lose money. Rule No.2: Never forget rule No.1." — Warren