Experts: CSPA 1.43

 

CSPA 1.43:

CSPA is a multi currency Expert Advisor, it uses the currency strengths to open trades on the best pairs.

Author: Trevor Schuil

 
Automated-Trading:

CSPA 1.43:

Author: Trevor Schuil

How To use it.?
 

You just put it on 1 5m chart only

 In the settings, enable the pairs you want to trade and the pairs you want to use to calculate the currency strengths.

It is 100% automated trading

 

This will be a revolutionary EA one day, when fine tuned!

That's probably one of the most generous contributions to this community. 

 
pedrosimao:

This will be a revolutionary EA one day, when fine tuned!

That's probably one of the most generous contributions to this community. 

It's a pity it is not working yet, and it causes huge DDs. Happily all the bugs will be corrected one day.
 
Hi , why he  ea did not work in strategy tester
 

Interesting EA really.

Can you explain some more about the parameters? Specifically the ones having to do with money management.

I also have the impression it does only trade one pair at a time, but can't find a parm that seems relevant.

Thanks anyway.

EDIT: O I forgot I can see the code :-)

 
Very good idea. Please can you take time to explain more about all the parameters and how to set them base on the users choice of settings.
 
good robot I use it at night time london, anyone know where ponge the code to choose the days of trade, for example trading days in milestone has this code option

  Monday = true

  Friday = false

I appreciate your help
 
retryll34:
good robot I use it at night time london, anyone know where ponge the code to choose the days of trade, for example trading days in milestone has this code option

  Monday = true

  Friday = false

I appreciate your help
void openPosition(){  
if( !DayOfWeek() == 0 && DayOfWeek != 5 ){
   if( ( int ) TimeCurrent() - preventDuplicates > 20 ){ 
      preventDuplicates = ( int ) TimeCurrent();
      if( ( ( totalAccountTrades < MaxTrades && avgOpenTime < LongTimeSeconds ) || ( totalAccountTrades < ExtraTrades && avgOpenTime > LongTimeSeconds ) ) 
         && ( totalAccountLoosers == totalAccountTrades || totalAccountTrades < StarterTrades ) && ( int ) TimeCurrent() - initTime > 20 ){          
         for( int s = 0; s < generalArrayCount; s++ ) { 
            bool isEnabled = pairIsEnabled( sym[s] );
            bool isTradable = pairIsTradable( sym[s] );
            if( isEnabled && isTradable && totalTradesArray[s] == 0 ){ 
               if( ( int ) TimeCurrent() - lastTradeTimeArray[s] > TradeTimeSeconds ){ 
                  double bid = ( double ) MarketInfo( sym[s], MODE_BID );
                  double ask = ( double ) MarketInfo( sym[s], MODE_ASK );   
                  if( openBuyPositionArray[s] || openBuyPositionScalpingArray[s] ){   
                     if( AccountFreeMarginCheck( sym[s], OP_BUY, lotSize ) <= 0 || GetLastError() == 134 ) return;
                     r = OrderSend( sym[s], OP_BUY, lotSize, ask, ( int ) slippage, 0, 0, signalCommentArray[s], MAGIC );
                     if( !r ) Print( "71. Error in OrderSend. Error code=", GetLastError() );     
                     else lastTradeTimeArray[s] = ( int ) TimeCurrent(); 
                     tempTotalTrades++;
                     break;
                  } else if( openSellPositionArray[s] || openSellPositionScalpingArray[s] ){ 
                     if( AccountFreeMarginCheck( sym[s], OP_SELL, lotSize ) <= 0 || GetLastError() == 134 ) return;
                     r = OrderSend( sym[s], OP_SELL, lotSize, bid, ( int ) slippage, 0, 0, signalCommentArray[s], MAGIC );
                     if( !r ) Print( "89. Error in OrderSend. Error code=", GetLastError() );    
                     else lastTradeTimeArray[s] = ( int ) TimeCurrent(); 
                     tempTotalTrades++;
                     break;
                  }
               } 
            }
         }
      } 
   } 
}
}   
 
trevone:
but thats just a quick hack
Reason: