Know more about other "Trading Strategies" - page 3

 
luenbo:

This kind of strategy names martingale, you'd better use it with a stop loss if not your account will be broken sooner or later.

And it usually suits for a fluctuation market. If you can combine this strategy with trend following strategy ,the it will give your better performance.

But it's always a difficult thing to  estimate whether the market is flat or trend~

Can you attach an EA which shows this to be the case?
 
Ubzen:

Description: The UbzenA_20130725 is a system which places random_trades. Adds to negative trades when the number of -pips exceeds the bollinger_bands pips. I would consider it a scalper. Includes a stoploss using actual deposit currency $. The take profit is also actual currency $. The volume_size uses a time_passage to increase the volume (if system still negative). I like this volume_sizing because you can dial-up or dial-down the aggression depending upon your appetite.

  • -Pros: Ability to survive multiple years of testing and market conditions.
  • -Cons: No get rich quick. Requires a relatively large investment capital.

There's no optimization done to this system. Any suggestion for improvement, positive or negative (just don't be rude about it).

  • Your system is interesting, I will have a closer look to it. Obviously 30% profit in 5 years isn't a lot but it's your only way to control your drawdown.
  • Why are you consider it a scalper ? It's not a scalper in my opinion.
  • Why are you setting SL=0.00001 and TP=999999999.00000 on all your orders ?
 
angevoyageur:
  • Your system is interesting, I will have a closer look to it. Obviously 30% profit in 5 years isn't a lot but it's your only way to control your drawdown.
  • Why are you consider it a scalper ? It's not a scalper in my opinion.
  • Why are you setting SL=0.00001 and TP=999999999.00000 on all your orders ?

1) I tend to focus on draw-downs. People tend to refer to me as a grinder. I prefer slow constant curves compared to wild-swings erratic curves. If the draw-down is $1500 on 0.01 base lots. It's easier for me to imagine what would happen on base lots of 0.02.

2) The SysTkePftVal of 5 has been Pips with some versions. I guess in this case its $5 so doesn't look much like scalper. However, as the lotsizes progresses it'll act like scalper for larger sizes.

3) Programming lack of knowledge (I guess). When I started mql5, It kept giving me errors when trying to send orders with sl and tp of zero. That was my way around it.

 
Ubzen:

1) I tend to focus on draw-downs. People tend to refer to me as a grinder. I prefer slow constant curves compared to wild-swings erratic curves. If the draw-down is $1500 on 0.01 base lots. It's easier for me to imagine what would happen on base lots of 0.02.

2) The SysTkePftVal of 5 has been Pips with some versions. I guess in this case its $5 so doesn't look much like scalper. However, as the lotsizes progresses it'll act like scalper for larger sizes.

3) Programming lack of knowledge (I guess). When I started mql5, It kept giving me errors when trying to send orders with sl and tp of zero. That was my way around it.

I know coding style is personal preference, but when you post code publicly I guess it's for other to read it, so I permit me some suggestions/remarks :

  • Make comments
  • Mainly if you are using cryptic (for other) function name (ClsSymSetPos, YesLstTrdWin, YesLstTrdWin...)
  • Use the styler (CTRL+,) to arrange your code.
  • Space between lines of code are allowed.

What is more readable ?

void SetTradePrices(ENUM_ORDER_TYPE Type,MqlTradeRequest& Trade){
    if(Type!=ORDER_TYPE_BUY && Type!=ORDER_TYPE_SELL){return;} double Price=0;
    if(Type==ORDER_TYPE_BUY){Price=SymbolInfoDouble(CurSetSymbol,SYMBOL_ASK);}
    if(Type==ORDER_TYPE_SELL){Price=SymbolInfoDouble(CurSetSymbol,SYMBOL_BID);}
    Trade.price=Price;//////////////////////////////////////////
    double  SymPoint=SymbolInfoDouble(CurSetSymbol,SYMBOL_POINT);
    if(Type==ORDER_TYPE_BUY){Trade.sl=SymPoint;  Trade.tp=999999999;}
    if(Type==ORDER_TYPE_SELL){Trade.tp=SymPoint; Trade.sl=999999999;}
}

or

void SetTradePrices(ENUM_ORDER_TYPE Type,MqlTradeRequest &Trade)
  {
   if(Type!=ORDER_TYPE_BUY && Type!=ORDER_TYPE_SELL)
      return;

   double Price=0;

   if(Type==ORDER_TYPE_BUY)
      Price=SymbolInfoDouble(CurSetSymbol,SYMBOL_ASK);

   if(Type==ORDER_TYPE_SELL)
      Price=SymbolInfoDouble(CurSetSymbol,SYMBOL_BID);

   Trade.price=Price;

   double  SymPoint=SymbolInfoDouble(CurSetSymbol,SYMBOL_POINT);

   if(Type==ORDER_TYPE_BUY)
     {
      Trade.sl=SymPoint;  Trade.tp=999999999;
     }
   if(Type==ORDER_TYPE_SELL)
     {
      Trade.tp=SymPoint; Trade.sl=999999999;
     }
  }
 

As you process only BUY and SELL order in the previous function you can use this syntax in mql5 :

void SetTradePrices(ENUM_ORDER_TYPE Type,MqlTradeRequest &Trade)
  {
   if(Type!=ORDER_TYPE_BUY && Type!=ORDER_TYPE_SELL)
      return;

   double SymPoint=SymbolInfoDouble(CurSetSymbol,SYMBOL_POINT);

   Trade.price    =SymbolInfoDouble(CurSetSymbol,Type==ORDER_TYPE_SELL ? SYMBOL_BID : SYMBOL_ASK);
   Trade.sl       =Type==ORDER_TYPE_BUY  ? SymPoint : 999999999;
   Trade.tp       =Type==ORDER_TYPE_BUY  ? 999999999 : SymPoint;
  }
 
angevoyageur:

I know coding style is personal preference, but when you post code publicly I guess it's for other to read it, so I permit me some suggestions/remarks :

  • Make comments
  • Mainly if you are using cryptic (for other) function name (ClsSymSetPos, YesLstTrdWin, YesLstTrdWin...)
  • Use the styler (CTRL+,) to arrange your code.
  • Space between lines of code are allowed.

What is more readable ?

or

Thanks for the suggestions. I'll much rather explain for those looking to understand the code. Obviously, my style is easier for me to understand. In your post above you used two different kinds of bracketing styles. I'm just wondering why?

   if(Type==ORDER_TYPE_BUY)
     {
      Trade.sl=SymPoint;  Trade.tp=999999999;
     }

vs

   if(Type==ORDER_TYPE_BUY)
      Price=SymbolInfoDouble(CurSetSymbol,SYMBOL_ASK);

Those are the type of questions I'll have to deal with. Some people like brackets .. some hate it. Some people like line by line comments ... I for one hate it. I much rather seeing a description at the header of each function. In my mind creates allot more work for something most people wouldn't be modifying. Again for those interested, I'm more than willing to explain.

 
angevoyageur: As you process only BUY and SELL order in the previous function you can use this syntax in mql5 :
Cool thx.
 
Ubzen:

Thanks for the suggestions. I'll much rather explain for those looking to understand the code. Obviously, my style is easier for me to understand. In your post above you used two different kinds of bracketing styles. I'm just wondering why?

vs

Those are the type of questions I'll have to deal with. Some people like brackets .. some hate it. Some people like line by line comments ... I for one hate it. I much rather seeing a description at the header of each function. In my mind creates allot more work for something most people wouldn't be modifying. Again for those interested, I'm more than willing to explain.

For the first brackets are mandatory as 2 instructions must be executed when the condition is true. For the second they are not mandatory (1 instruction), but there is no problem to add brackets also of course.
 
angevoyageur: For the first brackets are mandatory as 2 instructions must be executed when the condition is true. For the second they are not mandatory (1 instruction), but there is no problem to add brackets also of course.

Yeah thats right. I just always start out with if(){;} and don't have to worry about it :P ... thx again.

ps> the white_spaces in your code is driving me nuttsssssssss.

 

averaging in is always ok, when you have huge lot size and wants to exit, there might be no volume for you to exit at the price u want.

when news release, i wonder if this system can survive like aud these days 

Documentation on MQL5: Standard Constants, Enumerations and Structures / Chart Constants / Chart Representation
Documentation on MQL5: Standard Constants, Enumerations and Structures / Chart Constants / Chart Representation
  • www.mql5.com
Standard Constants, Enumerations and Structures / Chart Constants / Chart Representation - Documentation on MQL5
Reason: