//Open Buy Order, instant signal is tested first RefreshRates(); if (Cross( 0 , iStochastic ( NULL , PERIOD_CURRENT , 34 , 3 , 3 , MODE_SMA , 0 ,MODE_MAIN, 0 )> iStochastic ( NULL , PERIOD_CURRENT , 34 , 3 , 3 , MODE_SMA , 0 ,MODE_SIGNAL, 0 )) ) { RefreshRates(); price=Ask;
currently, using this date1 = StringSubstr (date1, 0 , 4 ) + "-" + StringSubstr (date1, 5 , 2 ) + "-" + StringSubstr (date1, 8 , 2 ); string time1 = TimeToStr( iTime (ccy,tf,i), TIME_MINUTES ); FileWrite (handle, date1 + " " + time1); which gives me, for example, this 2018 - 07 - 20 21
For example is it possible to use iVolume on just the EUR and not the EURUSD or just the USD and not the EURUSD? Thanks
int return_price( int ttype) { //function that returns price int price= 0 ; for ( int cnt= 0 ;cnt< OrdersTotal ();cnt++) { bool result= OrderSelect (cnt,SELECT_BY_POS,MODE_TRADES); if (OrderType()==ttype && OrderMagicNumber()!= 666 && OrderMagicNumber()!= 667 )
Im facing this error when I try to retrieve the oldest ticket in my current pool of trades using the functions below, int EarliestOpenSellTicket() { datetime EarliestSellTime = TimeCurrent (); //initialize it to the current server time. You will have no orders newer than that. int
void hedger() { int buy_trades_number = _get_number_of_trades( OP_BUY ); int sell_trades_number = _get_number_of_trades( OP_SELL ); int numberofhedgedbuys = _get_number_of_trades_hedge_buy( OP_BUY ); int numberofhedgedsells = _get_number_of_trades_hedge_sell( OP_SELL ); for ( int n=
for ( int n= 0 ; n<total; n++ ){ if ( ! OrderSelect (n, SELECT_BY_POS , MODE_TRADES ) ) if ( OrderMagicNumber ()!= 333 && number_of_buys == 7 ) OrderSend ( Symbol (), OP_SELL , 50 , Bid , 3 , 0 , 0 , "hedged" , 333 , 0 , clrRed ); if ( OrderMagicNumber ()!= 334 && number_of_sells
int Close1B() { int Close1B=- 1 ; // None open. for ( int cnt= OrdersTotal ()- 1 ;cnt>= 0 ;cnt--) { OrderSelect (cnt, SELECT_BY_POS , MODE_TRADES ); //if( ! OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES) ) continue; if ( OrderSymbol ()== Symbol ()
So I have a system where I open a new trade every 10 pips and close out the last trade. The last trade is also modified to set the stop loss to 10 pips. Currently, I have a function that does this: void TradeCloser(){ //start int total = OrdersTotal (); if (total > 0 )