Menu

FXi_Alpha_Expert-Advisor_v1.7 - Questions

Chrisstoff
2008-03-03
2013-03-22
  • Chrisstoff

    Chrisstoff - 2008-03-03

    MrSands & TinasheChipomho,

    Thank you for this great project and the nice coding. I think this trading system has a great potential. I appreciate your efforts on decreasing the drawdown.

    I am not a professional programmer though I am interested in MQL. I looked through your code and I got some questions that I would like to ask.

    It seems that you designed the EA to fit IBFX's currency pair assortment. Other brokers may have different assortments, e.g. CADJPY that has no magic number calculation in the code. Would it be useful to adapt MakeMagicNumber() function to compute SymbolCode for other currency pairs as well?
    There are two currency pairs with the same SymbolCode (=1000) in the MakeMagicNumber() function. I know that it is not a bug but there are many free positions for using different magic numbers.

    I studied the hedge strategy code. May I ask you whether using
    Bid <=  s3 instead of Bid >= s3 and
    Bid >=  s3 - (Strategy.Hedging.Slippage*Point)instead of Bid <= (s3+(Strategy.Hedging.Slippage*Point)
    would be slightly better?

    I was also thinking about a safety distance between r3 (or s3) and the trigger point of hedging orders. There are occasions when the price goes through r3 or s3 by a couple of pips then retraces. Do you think that a safety distance would be useful in these cases? If yes, I think about using something like this:

    if ( (Ask >=  r3 + R_Cushion) &&
         (Ask <= (r3 + R_Cushion + (Strategy.Hedging.Slippage*Point)) )                  
       ){
         ...
    and
    if ( (Bid <=  s3 - S_Cushion) &&
         (Bid >= (s3 - S_Cushion - (Strategy.Hedging.Slippage*Point)) )     
       ){
         ...

    Where e.g.
      double R_Cushion = MathAbs(r2-r3);
      double S_Cushion = MathAbs(s2-s3); 
    and
      double r2 = prices[FIBO_LEVEL_R2];
      double s2 = prices[FIBO_LEVEL_S2];

    Thanks again for the valuable project,

    Regards,

    Chrisstoff

     
    • Chrisstoff

      Chrisstoff - 2008-03-13

      I think the trades may have good chance to be profitable even after 12 hours provided they did not go too far into the negative territory. If they are deeply in the negative  field and we use hedging, then our loss will not increase further. We could use higher lotsizes for hedging, this way we could realize profit from hedging on a strongly trending market or we could close all the orders when the hedge profit = - trade losses.
      Reverse the order of opening trades: Using Fibonacci retracement there is a rule of thumb that the entry point is at the midpoint of two Fibo levels. Transforming this to FXi rules we get that if the price bounced back from R1 the entry point is at the midpoint of R1 and Pivot; if the price bounced back from R2 the entry is at the midpoint of R2 and R1, etc.

      Opening a hedge instead of using stop loss is a good idea, the hedge substitutes the stop loss and gives us a second chance while the stop loss is definite. Nevertheless, the hedge opening point could be in the place of stop loss and thus opening the hedge at R3 or S3 is a bit early. The stop loss level should have been over the next Fibo level, e.g. the entry of a short trade is at the midpoint of R2 and R1, then according to the rule of thumb the stop loss level is around R3 + 1/3 *( R2 - R1). So, if we enter the trade at the midpoint of R3 and R2 our stop should be well over R3. This way we would get less hedging orders but hopefully the hedge would be more efficient.

      Finding good entry point to a hedge is important since hedge orders cause relevant cost if they are triggered but the price bouncing back from the support or resistant level or the price goes through the S or R levels and bouncing back from a point that is situated just a little over those levels.

       

Log in to post a comment.