int file_handle = FileOpen (InpFileName, FILE_READ | FILE_WRITE | FILE_CSV ); datetime curr = TimeCurrent (); if (file_handle!= INVALID_HANDLE ){ if (curr >= 0 ){ FileWrite (file_handle,curr,spread,Ask,Bid,ask_bid_diff);
When am using my EA on crash1000 and I opened a buy position, the ea will not stop at stop loss if there is rapid bearish candle, it passes sl and closes down sl by far. Which code can I use to make sure that my EA stop at sl and not pass because even if i use position close below sl or does not
bool Tradeallowed(){ bool hastraded = false ; for ( int a = PositionsTotal ()- 1 ;a>= 0 ;a--){ string symbol1 = PositionGetSymbol (a); if ( Symbol () == symbol1){ ulong pticket1 = PositionGetTicket (a); double
How can I make a function that only allow 1 trade or open position per candle not only at the beginning of the candle but until new candle forms. The newbar function only allows at beginning of new candle only
if am using two MA indicator for buy and sell, if a buy condition is met the EA does not stop opening order on the buy condition even after tp or sl has been hit and i want it to only open once (1) everytime the condition is met