anuj71
anuj71
anuj71
Added topic Error 130 & 136 while setting new SL using OrderModify
Hello, I am getting Error 130 and Error 136 when i am trying to add new SL using order Modify. Code : void StopLoss_NewsTrading( int StopLoss_NewsTrading_magic)   { int gNewsTrading_SL = MarketInfo( Symbol (), MODE_STOPLEVEL) + 10 ; // Loop
anuj71
Added topic Candle Timmer using Object
Hello, I am adding a Object to the chart which calculate Time remaining for the candle. Code void Object_Time() { int Object_Time_16 = Time[ 0 ] + 60 * Period () - TimeCurrent ();    double Object_Time_8 = Object_Time_16 / 60.0 ;
anuj71
Added topic How OnTimer work with Oninit
Hello, How OnTimer work with Oninit. Every 60 seconds all four Print will be executed? bool assignVal=True; int OnInit ()   { Print ( "Checking Print 1 with Timer" ); if (MarketInfo( Symbol (), MODE_STOPLEVEL) > 0 )
anuj71
Added topic Error 5011 - File is Empty
Hello, I am trying to store one small value into file. Simple, Rule If file exist, read the value else create new file and store the value When OnTick condition executed, Rewrite the value. But i am getting an error 5011 and when i open the .txt
anuj71
Added topic Does EA Deinit and ReInit when market close and Open back?
Hello, Saturday and Sunday market closed so EA does not performance and Monday market reopened. So between Market close and Market Open does MT4/MT5 Deinit and Reinit automatically? Deinit when market is closed (Saturday) and Reinit when market is
anuj71
Added topic Target Revenue in Percentage using Account Balance and Equity
Hello, I am adding new feature in my EA, which close trade automatically when it fulfilled defined earning set by user and than it redefine with value again with new Account balance . Example : Account Balance = $1000 Target Percentage = 10% (10% of
anuj71
Added topic truncation of constant value - Decimal in Int
Hello, I am changing my EA code from Pips to Point directly. Previously it was like extern double TP = 30.0 ; extern double SL = 253.0 ; int OnInit () {    if ( Digits == 3 || Digits == 5 )       Pips = 10.0 *
anuj71
Added topic EA OnTick() fuction run even when automated Trading is off?
Hello, Even when Automated Trading setting is turned off, EA functions are getting called. Is this normal? or it due to some error?. if ((!Close_Buy_Limit) && Buy_Limit && trades_count(BuyLimitMagic) == 0 && istochastic_16
anuj71
Added topic Error 136 : Off quotes with Orders and Trailing
Hello, I am frequently getting Error 136, specially during news hours. I searched and founded this happens due to Price change faster than EA placing trade. In this forum i saw some post where peoples saying using of  RefreshRates (); will
anuj71
Added topic Warning : Return value of order should be checked
I am getting 28 warning in my code. My EA is working fine on live market. I am not sure what does this warning mean and why i am getting it. For example : Warning : return value of 'OrderSelect' should be checked   
anuj71
Added topic Lot of Errors while Trading High Impact News events with EA
Hello, Today, I traded two news event  AUD - Monetary Policy Meeting Minutes and CAD - Core Consumer Price Index (CPI) both closed in loss because of very high slippage, high spread and StopLevel. Apart from this i get a lot of error in Terminal
anuj71
Added topic What are the list of news events which have high volatility for news trading?
What are the lists of news events that can bring big price strikes and high volatility in the forex market? I personally know two events: NFP and FOMC, which have high volatility
anuj71
Added topic Take Profits and Stop Loss is Int Value or Double Value?
Take Profits and Stop Loss is Int Value or Double Value? extern int TP = 100 ; extern int SL = 100 ; //OR extern double TP = 100 ; extern double SL = 100 ; // ********************************************** // extern int Slippage = 3; pipettes = Point
anuj71
Added topic Handling TP, SL, Pips values based on Stop Level and Digits
Hello, I am editing in EA which is based on scalping, and i am normally using 1 Pips as Take Profits. Some broker have Stop Level above 10 Points / 1 Pips which provide an error to EA Invalid Stop and other getting failed. For this reason, i made
anuj71
Added topic OrderProfit() return value including Commission and Swap?
OrderProfit()   - This will return only Pips value or Final Profit/Loss after calculating swap and commission also. Default Code : double CalculateTradeFloating( int A_magic_0)   {    double CalculatePL= 0 ;    for
anuj71
Added topic int Slippage (or) double Slippage
Slippage is int value or double value? extern int Slippage = 3 ; //OR extern double Slippage = 3.0 ; OrderSend ( Symbol (), OP_BUY, SendOrderBuyLot, Ask, Slippage, BuyStopLoss_SendOrder, BuyTakeProfit_SendOrder, SendOrder_Comment + Li_12
anuj71
Added topic Trailing SL not working with broker have StopLevel greater than 0
Hello, I am using ICMarkets and it have StopLevel = 0 for all currency pairs. I designed the Trailing based on ICMarket and code is really working amazing without any issue.  Working fine with Broker having 0 Stop Level : double
anuj71
Added topic GetLastError with Function name using if statement
Hello, I am adding a GetLastError, which only print if error belongs to particular function. I am trying like : if ( __FUNCTION__ == "TrailingStopLoss" && GetLastError () != 0 )     Print ( __FUNCTION__ + " Returning Error Code
anuj71
Added topic Get the Pips based on symbol digit
Which one should i use. With Point : double Pips;   if ( Digits == 3 || Digits == 5 )       Pips = 10.0 * Point ;    else       Pips = Point ; With Ticksize : 
anuj71
Added topic Is this Good practices for if else statement
Hello, Instead of using classic if-else or nested if-else i am using like this for small conditions double TakeProfit_BuyEntry = (TP != 0 ) ? (Ask + TP * Pips) : 0 ; double BuyLimitOrderDifference = LastOrderPrice(OP_BUY, BuyLimitMagic) -