Replies

Mocean
05 Oct 2013, 12:55

Instead of trailing it moves the Sl in one jump once a target is reached.

Jumping Stop = Move SL to X pips after Y pips profit. Same theory as Break-Even jump.

Best setup is multiple Jump Stops for Multiple Targets so you can have a reducing SL gap.

Example...TP=100pips

  1. Move SL to 5pips after 25pips profit (or Target in % of TP = 25%)
  2. Move SL to 20pips after 50pips profit
  3. Move SL to 50pips after 75pips profit
  4. Move SL to 80pips after 100pips profit

This is the most advanced Trader Manager MT4 EA - it was derived from an EA which has 20,000+ downloads on Forex Factory. If you want to get serious about competing with MT4 then build these functions into your platform. No one will move unless you can match the free functionality provided for MT4, and no one will be bothered recoding EA's that have 1000 of hours development for cAlgo.

http://www.stevehopwoodforex.com/phpBB3/viewtopic.php?f=21&t=1633

Spotware you need to do the research and the work, not your customers. It's honestly quite frustrating your priority into gimmicky enhancements and slow progress on what real traders want.


@Mocean

Mocean
03 Oct 2013, 06:03

3 months....still waiting?

How much longer?

ZZZzzzzzz - back to MT4 for another 6 months.

Since I was last checking on your progress 6 months ago there have been practically no more Robots added on this site. I think you are losing the "new toy" momentum as traders get frustrated by your prolonged roll-out and development.

Surely you would have thought about these important features for traders 18months ago!


@Mocean

Mocean
02 Oct 2013, 13:55

It's happening on order reversal.
 


@Mocean

Mocean
02 Oct 2013, 12:51

Hello,

When will details of "Spotware Connect API" be available? And when will it Go-Live?

Specific questions:

1) What are the order execution protocols - will this employ LP "last looks" as MT4 does? There is no point having fast execution if LP's can pull their orders.

2) Will Connect be an add-on to cTrader/cAlgo - or will it be a stand alone UI?

3) Will it provide the ability to customise the cTrader platform?

4) What order information is blind to the server/LP/PB - will they see account numbers, SL, TP?

5) Will it provide flexibility to customise execution rules? eg. remove SL cancellation if inside Spread? Streamline execution code?

6) Will there be access to institutional level liquidity?

7) Will there be the ability to trade multiple brokers from the one platform at the same time?

8) Will there be the ability for a syndicate to create a Broker account with their own broker server and deal direct with LP's?

Thanks,

A


@Mocean

Mocean
02 Oct 2013, 12:14

VPS Direct Cross-Connect to Server

Any updates on VPS provider direct cross-connect to cTrader server?

I see you are partnering with Beeks but they said they still don't have direct cross-connect capability?


@Mocean

Mocean
07 Aug 2013, 13:51

Spotware - please elaborate?

That is correct, by setting your stop loss in relative value (pips away), you avoid the risk of the stop loss being invalid because it will be calculated as pips away from the entry price.

What you're saying here is that "relative value" SL will set the SL from the Entry Price, as opposed to a static SL value in the pending order. So a "relative vlue" SL will account for any Slippage on the Entry Price. How does this eliminate the SL from being inside the spread and rejected by your flawed programming?

Our plan is to:

  • introduce what we call Relative Protection for Limit and Stop orders - the same way as we have it done for Market Orders - desired protection levels are defined by users in pips from the executed price which would give us the logical space not to validate

So why is it you can't use the "logical space not to validate" from the SL I set in the Pending Order?

I have exhausted this whole trade and errors with my Broker, here is a summary of the outcome:

  • SL was rejected because it was inside the Spread, instead of closing the position immediately, this let the position run into UNLIMITED loss.

Server applied SL and TP to the created position, but SL was rejected due to SL validation rule: SL price for buy order must be always less than the current price.

  • Spotware's initial claim was to blame the Algo, which had absolutely no bearing on the SL failure - as explained the SL was rejected because it was inside the spread and they have deliberately programmed it this way because -

Due to multiple broker/trader requests the functionality became as follows: 

SL/TP absolute values are validated before being applied (resulting in cancelled SL/TPs in such scenarios). It did make some sense to us - traders were often surprised by a position being live for a fraction of a second, generating an immediate loss, with no option to recover. 

  • Margin Call set at 80% of Margin Level failed - for which Spotware offered to reimburse just enough to cover my Broker's loss on my negative balance.
  • Spotware derived the calculation of the amount to reimburse on their supplied tick data - which amazingly calculated my balance to be  -$1.65.

OK, so the tick data could be legit and coincidentally zeroing my account, but after the string of "errors" that Spotware claim are not errors, I am of the conclusion that nothing is coincidental in FX trading - and errors don't happen, they are intentional.

cTrader offers little, if no transparency in the way of trade logs and tick data - so at the end of the day you are at the mercy of Spotware's honesty. Yes they constantly claim it's in development like everything else to protect traders interests.

I would even go further to reiterate a question I posed to Spotware earlier in this thread -

Spotware – a question I'd be interested to know the answer to, is – do any Prime Brokers or Liquidity Providers have a vested interest or investment in Spotware?

So is cTrader a ECN / STP - or is it another Market Maker platform for Prime Brokers instead of Retail Brokers?

With all the shortcomings of MT4 - at least it works as I instructed it to!


@Mocean

Mocean
22 Jul 2013, 23:52

plus killing the above validation, will be sufficient to achieve what you have described.

 

So you agree, the "validation" function is an error and will be removed?

 
 

@Mocean

Mocean
20 Jul 2013, 06:59

Thanks for your comments Krica.

Just to confirm, the error with this SL not firing had absolutley nothing to do with the Robot. The Robot performed perfectly. I did not create the Robot, I downloaded it from CTDN, and I am not a programmer.

The SL did not fire because of Spotware's core platform logic on exection of Pending Orders.

This is what happened:

  1. Robot placed Pending Order with SL + TP - this is the end of the Robot's involvement in this trade.
  2. Ask price moved and triggered Buy pending order @ 1.51182 / with SL @ 1.51122­
  3. The platform then "verifies" the SL level after the Buy order is executed - as indicated by Spotware 425ms later
  4. SL was inside the spread, therefore higher than the Bid price @ 1.50976. Spotware's platform logic therefore rejects (ignores) the SL altogether and lets the trade run into unlimited loss.

Ask  1.51182  11:30:00.205  // Buy stop order was filled at this price
Bid  1.50983  11:30:00.463  
Ask  1.51062  11:30:00.463
Bid  1.50976  11:30:00.630  // This bid was used to validate SL price

I don't want a platform to consider if my SL is within a range to verify it, I want the SL to execute if the level I specificed is reached, or exceeded, as quickly as possible. Not think about it for 425ms.

Due to multiple broker/trader requests the functionality became as follows: 

SL/TP absolute values are validated before being applied (resulting in cancelled SL/TPs in such scenarios). It did make some sense to us - traders were often surprised by a position being live for a fraction of a second, generating an immediate loss, with no option to recover. 

I would not be "surprised" at all if I set a tight SL, as I did (2pips) and it triggered immediately. That is precisely what I instructed the platform to do. If "traders" are "surprised" then they should be setting a bigger SL level.


@Mocean

Mocean
20 Jul 2013, 02:34

Thanks for the response.

Thinking about this further something painfully obvious occurred to me, and confirmed by your comment.

First of all, I'd rather be "surprised" to take an instant small loss over a rejected SL and unlimited loss any day.

Due to multiple broker/trader requests the functionality became as follows: 

SL/TP absolute values are validated before being applied (resulting in cancelled SL/TPs in such scenarios). It did make some sense to us - traders were often surprised by a position being live for a fraction of a second, generating an immediate loss, with no option to recover. 

Then the logical thing to do to protect TRADERS - is to treat the SL as a primary execution criteria. Meaning, if the SL is within the spread then don't execute the trade at all, rather than executing followed by an instant SL close at a loss.

When I place a SL I am instructing the platform to stop my loss at, or as close to, that level as possible. Having the platform cancel a SL in any scenario is nonsensical.

Our plan is to:
  • introduce what we call Relative Protection for Limit and Stop orders - the same way as we have it done for Market Orders - desired protection levels are defined by users in pips from the executed price which would give us the logical space not to validate

When I set a SL on a Pending Order this is what I believed I was already doing.

Just seems like this whole validating SL is absurd, and a waste of programming speed.

I can't find your explanation of this SL functionality explained anywhere on your site, and could not even locate your Product Disclosure Statement. If you can show me where this is outlined to advise traders, then I will concede. if you cannot then it is fair to assume that your platform functions like others and SL would have been instant in this scenario. And on that basis my request for my account to be refunded stands.


@Mocean

Mocean
19 Jul 2013, 14:13


Thank you all for your comments.

Yes, I fully understand the risks of trading the news - false spikes that trigger your positions and SL before the news is even released, and slippage in a fast moving market or lack of liquidity. It's these risks that actually led me to cTrader / cAlgo, where a STP / ECN platform would reduce, if not eliminate, false spikes; and fast execution to direct market prices should reduce slippage. What I was not expecting was what happened with this trade.

First of all I stand corrected, the "technical error" noted in the cAlgo log was in fact referring to the second pending order. More detail of trade logs should be an absolute priority. If cTrader / cAlgo is going to replace MT4 then you need to at least match their functionality and trade journal.

I also want to note that as I have associated IC Markets in this post I can confirm they have, and continue to, assist investigating this trade. I have found them to be the most legitimate broker I have used and have full confidence they do not trade against me and make their money via commission only.

It took two attempts to request the detailed server log from Spotware. I am surprised the broker does not have direct access to this? The server log was finally supplied, and saying it is complex and difficult to understand is an understatement.

The server log was about 7 pages of information like this, but I believe this to be the execution event.

2013-07-16 08:30:00.597 +0000 DEBUG  Order filled event FilledOrderEvent[orderSnapshot=[­  orderId=528151­  positionId=430594­  type=STOP­  traderId=68017­  bookType=BOOK_A­  symbol=GBPUSD­  tradeSide=BUY­  volume=30000000­  closingOrder=false­  limitPrice=<null>­  stopPrice=151142­  baseSlippagePrice=<null>­  slippageInPips=<null>­  createTimestamp=1373974199302­  utcLastUpdateTimestamp=1373974200595­  expirationTimestamp=1373974210000­  partialFillAllowed=true­  stopLoss=151122­  takeProfit=151442­  stopLossInPips=<null>­  takeProfitInPips=<null>­  deals=[[­  positionId=430594­  key=0,528151,1373974199745,1­  symbol=GBPUSD­  volume=30000000­  type=MARKET­  tradeSide=BUY­  limitPrice=<null>­  retryCount=1­  bookType=BOOK_A­  traderId=68017­  marginRate=164299­  commission=1478­  execution=Execution[feedKey=FeedKey[bookType=BOOK_A,feedId=1],orderId=528151,status=EXECUTED,price=151182,volume=30000000,lpPrice=151182,createTimestamp=2013-07-16 11:30:00.595]­  marketDataEntryKey=MarketDataEntryKey[entryId=04011151148,feedId=1,type=ASK]­  priceSnapshotId=8466­  partialFillAllowed=true­  baseToUsdConversionRate=150954­]]­  status=FILLED­  clientRequestId=2e055995-513b-405e-9148-c7762cc87bdf­  label=<null>­  comment=<null>­  channel=cAlgo­  commission=1478­  executionPrice=151182­  filledVolume=30000000­   marginRate=164299­],sessionId=<null>,clientRequestId=<null>,source=LP]

It states:
stopPrice=151142
stopLoss=151122­
EXECUTED,price=151182

 

As indicated by Spotware's tick data, the spread at time of execution was 18.7pips - I understand it was a news event but this is a pretty big spread for supposedly direct market prices and deep liquidity.

Bid  1.50995  11:30:00.205  
Ask  1.51182  11:30:00.205  // Buy stop order was filled at this price

Spotware has indicated that their platform functions like this - even if a pending order has a SL attached, once the pending order is executed the SL is "verified", meaning the SL is only attached to the position once it's executed. Basically double handing the SL. If the SL is inside the spread it won't trigger and is rejected. Why reject a SL? If the price has moved beyond the SL then it should be triggered immediately - this is called SLIPPAGE. The whole point of a SL is to STOP LOSS - not consider it, then reject it. I see this as a major flaw in Spotware's programming logic and business rules.

How does this =  TRADERS FIRST™

Not obligating a SL = Greater Risk = Greater Losses = PRIME BROKERS FIRST

Spotware – a question I'd be interested to know the answer to, is – do any Prime Brokers or Liquidity Providers have a vested interest or investment in Spotware?

Back to the trade - as mentioned the spread was indicated as 18.7pips, so even if I had a SL of 15pips this SL would still have been rejected and the position would have continued into loss. So what SL is sufficient?

This flaw of SL being rejected if it's inside the spread applies to all orders - whether you use a Robot for high volume trading or scalping with a tight SL, you run the risk of the SL being inside the spread and not firing.

I have traded the news with straddle pending orders on Trading Station and MT4 and never had a SL not fire. Sure I've had slippage but that's trading.

OK, so now to the big kicker. After the SL failed, the trade continued into loss and kept going. The platform failed to initiate a Margin Call and close the trade and it continued into unlimited loss. Luckily I was watching it, as I run cAlgo on a VPS it could have very well been a trade I was not watching. Imagine your surprise to find not only your account is blown but now you're underwater and in debt. My broker is also extremely concerned by this as they would be the one most at risk. Like I'm going to be paying back a negative account that failed to close a trade.

Spotware, in theory your platform has great potential, but in reality you are still in development and Beta testing with people's real money. You've been around for a year now and while you're platform is pretty, it fails to address traders real needs:

  • Trade Protection / Trade Management

I have requested via my broker to have my account refunded, I understand they are still investigating it with Spotware – I await a response and will post it here.


@Mocean

Mocean
14 Jul 2013, 06:33

OK - thanks algotrader! Really appreciate your help.


@Mocean

Mocean
14 Jul 2013, 04:17

Opps - Sorry about that algotrader - here is the corerct code, but again I tried it in 2algo.com and it ddn't work. I did a search for the email routine but couldn't find it?

 

//+------------------------------------------------------------------+
//|                                            MACD_OsMA_ColorLH.mq4 |
//|                      Copyright © 2004, MetaQuotes Software Corp. |
//| mod. Variable MA settings             http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
// 2008forextsd mtf keris f-la  ki
#property  copyright "Copyright © 2004, MetaQuotes Software Corp."
#property  link      "http://www.metaquotes.net/"

//---- indicator settings
#property  indicator_separate_window
#property  indicator_buffers 6
#property  indicator_color1  LimeGreen
#property  indicator_color2  Red
#property  indicator_color3  C'83,0,0' //Maroon
#property  indicator_color4  C'0,66,0' //DarkGreen
#property  indicator_color5  DodgerBlue
#property  indicator_color6  Chocolate

#property  indicator_width1  2
#property  indicator_width2  2
#property  indicator_width3  2
#property  indicator_width4  2
#property  indicator_width5  1
#property  indicator_width6  1

//---- indicator buffers

extern int TimeFrame = 0;
extern int FastMA_Period=12;
extern int SlowMA_Period=26;
extern int SignalMA_Period=9;

extern int FastMA_Mode=1;
extern int SlowMA_Mode=1;
extern int SignalMA_Mode=0;

extern int FastMA_Price=0;
extern int SlowMA_Price=0;
//extern int SignalMA_Price=0;   // ma on array - price Close only
extern   double    OsmaMultiplier  = 2.5;
extern bool ShowOsMA_Histo = true;
extern bool ShowMACD_Histo = false;
extern int MaxBarsToCount   = 1500;

extern string  note_TimeFrames = "M1;5,15,30,60H1;240H4;1440D1;10080W1;43200MN|0-CurrentTF";
extern string  note_AppliedPrice = "0C,1O 2H3L,4Md 5Tp 6WghC: Md(HL/2)4,Tp(HLC/3)5,Wgh(HLCC/4)6";
extern string  note_MA_Mode =  "SMA0 EMA1 SMMA2 LWMA3";
extern string  note_defaults = "AO:34,5;SMA;PriceMedian(4);MACD 12 26 9 EMA Close;SignalLinePrice- Close only(MaOnArray) ";


double     ind_buffer1[], ind_buffer1s[];
double     ind_buffer2[], ind_buffer2s[];
double     ind_buffer3[];
double     ind_buffer4[];
double     ind_buffer5[];
double     ind_buffer6[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//----  additional buffer used for counting.
   IndicatorBuffers(8);
   //---- drawing settings
   SetIndexStyle(0,DRAW_HISTOGRAM);
   SetIndexStyle(1,DRAW_HISTOGRAM);
   SetIndexStyle(2,DRAW_HISTOGRAM);
   SetIndexStyle(3,DRAW_HISTOGRAM);  
 
   SetIndexStyle(4,DRAW_LINE);
   SetIndexStyle(5,DRAW_LINE);  
  
   IndicatorDigits(Digits+2);
  
   SetIndexDrawBegin(0,SlowMA_Period);
   SetIndexDrawBegin(1,SlowMA_Period);
   SetIndexDrawBegin(2,SlowMA_Period);
   SetIndexDrawBegin(3,SlowMA_Period);

   SetIndexDrawBegin(4,SlowMA_Period);
   SetIndexDrawBegin(5,SlowMA_Period);

//---- indicator buffers mapping
  SetIndexBuffer(0,ind_buffer1)  ;

//---- indicator buffers mapping
   if(!SetIndexBuffer(0,ind_buffer1)  &&
      !SetIndexBuffer(1,ind_buffer1s) &&
      !SetIndexBuffer(2,ind_buffer2)  &&
      !SetIndexBuffer(3,ind_buffer2s) &&
      !SetIndexBuffer(4,ind_buffer3)  &&
      !SetIndexBuffer(5,ind_buffer4)  &&
      !SetIndexBuffer(6,ind_buffer5)  &&
      !SetIndexBuffer(7,ind_buffer6))
      Print("cannot set indicator buffers!");


           switch(TimeFrame)
   {
      case 1: string TimeFrameStr = "M1";  break;
      case 5     :   TimeFrameStr = "M5";  break;
      case 15    :   TimeFrameStr = "M15"; break;
      case 30    :   TimeFrameStr = "M30"; break;
      case 60    :   TimeFrameStr = "H1";  break;
      case 240   :   TimeFrameStr = "H4";  break;
      case 1440  :   TimeFrameStr = "D1";  break;
      case 10080 :   TimeFrameStr = "W1";  break;
      case 43200 :   TimeFrameStr = "MN1"; break;
      default :    TimeFrameStr   = "TF0";
   }

//---- name for DataWindow and indicator subwindow label

   SetIndexLabel(0,"");
   SetIndexLabel(1,"");
   SetIndexLabel(2,"");
   SetIndexLabel(3,"");
   SetIndexLabel(4,"MACD");
   SetIndexLabel(5,"SigL");

   IndicatorShortName("MACD_OsMA ["+TimeFrameStr+"] ("+FastMA_Period+","+SlowMA_Period+","+SignalMA_Period+") ");
   if (TimeFrame < Period()) TimeFrame = Period();


//---- initialization done
   return(0);
  }
//+------------------------------------------------------------------+
//| Awesome Oscillator                                               |
//+------------------------------------------------------------------+
int start()
 {
   double prev,current;
   datetime TimeArray[],TimeArray1[];
   int    i,limit,y=0,counted_bars=IndicatorCounted();
//----
   ArrayCopySeries(TimeArray,  MODE_TIME,Symbol(),TimeFrame);

   if(counted_bars<0) return(-1);
   if(counted_bars>0) counted_bars--;

    limit= Bars-counted_bars;
    limit= MathMax(limit,TimeFrame/Period());
    limit= MathMin(limit,MaxBarsToCount);


  for(i=0,y=0; i<limit; i++)
     {

     if (Time[i]<TimeArray[y]) y++;
     ind_buffer3[i]=iMA(NULL,TimeFrame,FastMA_Period,0,FastMA_Mode,FastMA_Price,y)-
                    iMA(NULL,TimeFrame,SlowMA_Period,0,SlowMA_Mode,SlowMA_Price,y);
  
      ind_buffer5[y]= ind_buffer3[i];
     }
  
   limit = MathMin(limit, MaxBarsToCount-SignalMA_Period);
   for(y=0,i=0; i<limit; i++)
        {
     if (Time[i]<TimeArray[y]) y++;

      ind_buffer4[i]=iMAOnArray(ind_buffer5,0,SignalMA_Period,0,SignalMA_Mode,y);
   
      ind_buffer6[i]= (ind_buffer3[i]- ind_buffer4[i])*OsmaMultiplier;
        }

//---- dispatch values between 2 buffers
  bool up=true;
 
    for (i=limit;i>=0;i--)
 
   {

            ind_buffer1[i] =0.0;
            ind_buffer1s[i]=0.0;            
            ind_buffer2[i] =0.0;
            ind_buffer2s[i]=0.0;

    if (ShowOsMA_Histo)
      {
      current=ind_buffer6[i];
      prev=ind_buffer6[i+1];
      }
   if (ShowMACD_Histo)
      {
      current  =ind_buffer3[i];
      prev     =ind_buffer3[i+1];
      }

     
      if(current>prev)  up=true;
      else              up=false;
     
      if(up)
        {
         if(current > 0)
            {
            ind_buffer1[i]=current;
            ind_buffer1s[i]=0.0;            
            ind_buffer2[i] =0.0;
            ind_buffer2s[i]=0.0;
            }       
            else
            {
            ind_buffer1[i] =0.0;
            ind_buffer1s[i]=current;          
            ind_buffer2[i] =0.0;
            ind_buffer2s[i]=0.0;
            }            
         }
        else
         {
         if(current < 0)
           {
            ind_buffer1[i] =0.0;
            ind_buffer1s[i]=0.0;
            ind_buffer2[i] =current;
            ind_buffer2s[i]=0.0;
           }
        else
           {
            ind_buffer1[i] =0.0;
            ind_buffer1s[i]=0.0;
            ind_buffer2[i] =0.0;
            ind_buffer2s[i]=current;
            }          
         }      
    } 


   for (i=0;i<indicator_buffers;i++) SetIndexDrawBegin(i,Bars-MaxBarsToCount+SignalMA_Period);   


//---- done
   return(0);
 }


@Mocean

Mocean
14 Jul 2013, 03:34

Thanks 2calgo - are you interested in some paid programming? Do you have a direct contact, email?

I am hoping Spotwre will get it right with this "Advanced Protection" feature coming out in the next version release, but chances are they only get some of the fetures needed.


@Mocean

Mocean
14 Jul 2013, 03:30 ( Updated at: 21 Dec 2023, 09:20 )


@Mocean

Mocean
14 Jul 2013, 03:26 ( Updated at: 21 Dec 2023, 09:20 )

Close but it didn't work - it has two colour histograms but only changes colour either side of zero - as in positive or negative.


@Mocean

Mocean
14 Jul 2013, 03:20 ( Updated at: 21 Dec 2023, 09:20 )

 

 

 

 


@Mocean

Mocean
14 Jul 2013, 03:16

3 Errors - Unreachable code?


@Mocean

Mocean
14 Jul 2013, 02:14

Thanks algotrader, any help is appeciated.

//+------------------------------------------------------------------+
//|                                         MACD_ColorHist_Alert.mq4 |
//|                                    Copyright © 2006, Robert Hill |
//|                                                                  |
//+------------------------------------------------------------------+
#property  copyright "Copyright © 2006, Robert Hill"
//---- indicator settings
#property  indicator_separate_window
#property  indicator_buffers 4
#property  indicator_color1  Blue
#property  indicator_color2  Red
#property  indicator_color3  Lime
#property  indicator_color4  Red

#property indicator_width1 2
#property indicator_width2 2
#property indicator_width3 2
#property indicator_width4 2

//---- indicator parameters

extern bool SoundON=False;
extern bool EmailON=false;

extern int FastEMA=12;
extern int SlowEMA=26;
extern int SignalSMA=9;
//---- indicator buffers
double     ind_buffer1[];
double     ind_buffer2[];
double HistogramBufferUp[];
double HistogramBufferDown[];
int flagval1 = 0;
int flagval2 = 0;
//---- variables

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- drawing settings
//   IndicatorBuffers(3);
   IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)+1);
   SetIndexStyle(0,DRAW_LINE,STYLE_SOLID);
   SetIndexBuffer(0,ind_buffer1);
   SetIndexDrawBegin(0,SlowEMA);
   SetIndexStyle(1,DRAW_LINE,STYLE_SOLID);
   SetIndexBuffer(1,ind_buffer2);
   SetIndexDrawBegin(1,SignalSMA);
   SetIndexStyle(2,DRAW_HISTOGRAM,STYLE_SOLID);
   SetIndexBuffer(2,HistogramBufferUp);
   SetIndexStyle(3,DRAW_HISTOGRAM,STYLE_SOLID);
   SetIndexBuffer(3,HistogramBufferDown);
//   SetIndexDrawBegin(2,SlowEMA + SignalSMA);
//---- name for DataWindow and indicator subwindow label
   IndicatorShortName("MACD("+FastEMA+","+SlowEMA+","+SignalSMA+")");
   SetIndexLabel(0,"MACD");
   SetIndexLabel(1,"Signal");
   SetIndexLabel(2,"Histogram");
  
//---- initialization done
   return(0);
  }
//+------------------------------------------------------------------+
//| Moving Averages Convergence/Divergence                           |
//+------------------------------------------------------------------+
int start()
  {
   int limit;
   double temp;
  
   int counted_bars=IndicatorCounted();
//---- check for possible errors
   if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
//---- macd counted in the 1-st buffer
   for(int i=0; i<limit; i++)
      ind_buffer1[i]=iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,i)-iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,i);
//---- signal line counted in the 2-nd buffer
   for(i=0; i<limit; i++)
      ind_buffer2[i]=iMAOnArray(ind_buffer1,Bars,SignalSMA,0,MODE_SMA,i);
//      ind_buffer2[i] = alpha*ind_buffer1[i] + alpha_1*ind_buffer2[i+1];

   for(i=0; i<limit; i++)
   {
      HistogramBufferUp[i] = 0;
      HistogramBufferDown[i] = 0;
      temp = ind_buffer1[i] - ind_buffer2[i];
      if (temp >= 0)
        HistogramBufferUp[i] = temp;
      else
        HistogramBufferDown[i] = temp;
     
      if (i == 1)
      {
        if (HistogramBufferUp[i] > 0 && HistogramBufferDown[i + 1] < 0)
//        if (HistogramBufferUp[i] >  HistogramBufferUp[i + 1])
        {
// Cross up
         if (flagval1==0)
         {
           flagval1=1;
           flagval2=0;
           if (SoundON) Alert ("Macd Cross Up! ",Symbol()," ",Period()," @ ",Bid);
                if (EmailON) SendMail("MACD Crossed up", "MACD Crossed up, Date="+TimeToStr(CurTime(),TIME_DATE)+" "+TimeHour(CurTime())+":"+TimeMinute(CurTime())+" Symbol="+Symbol()+" Period="+Period());
         }
        }
        else if (HistogramBufferDown[i] < 0 && HistogramBufferUp[i + 1] > 0)
//        else if (HistogramBufferUp[i] <  HistogramBufferUp[i + 1] )
        {
// Cross down
         if (flagval2==0)
         {
          flagval2=1;
          flagval1=0;
          if (SoundON) Alert ("Macd Cross Down! " ,Symbol()," ",Period()," @ ",Bid);
               if (EmailON) SendMail("MACD Crossed down","MACD Crossed Down, Date="+TimeToStr(CurTime(),TIME_DATE)+" "+TimeHour(CurTime())+":"+TimeMinute(CurTime())+" Symbol="+Symbol()+" Period="+Period());
         }
        }
      }
     
   }
     
//---- done
   return(0);
  }


@Mocean

Mocean
14 Jul 2013, 01:48

I tried it with 2calgo.com and it doesn't. It only converts 40% of MT4 EA's - and why would I trust and automated code converter?


@Mocean

Mocean
10 Jul 2013, 11:49

Hi Spotware - could you please provide details of this Advanced Protection enhancement?

I'm considering engaging a programmer to devleop a Robot but sounds like what I want might be covered in this enhancement.

Could you also confirm if this feature will be able to be set as a default global trade setting, like the SL / TP on the one click settings? PLEASE add this! Having it as a trade modification after execution is a major hassle and limits its use for fast scalping or news event trades. Traders need the ability to enable BEFORE execution, not post execution.

Could I offer a more appropriate name "Trade Manager".


@Mocean