Experts: Smart Tunel Trading - page 3

 

Hi Ali,

I downloaded your EA as it sounded promising and yet simple to adjust whilst being profitable. I am familiar with how to work EA's although it doesn't seem to be creating positions; i have attached it to the chart and created a .set file for it and i can visually see the trades it would be making.

It seems like every time the market hits one of the indicated levels, it just moves the level further away, creates an arrow where it would have traded and then waits.

I have attached my .set file - can you see if there is anything wrong with the configuration? or suggest a .set file of your own for me to test?

Many thanks.

Files:
 
TheForexKid:
Thanks man, keep up the great work. This strategy has a lot of potential. 

thanks my friend. Hope for the future

 
Ali Sabbaghi:

thanks my friend. Hope for the future

Can you advise how i can edit this part of the code so EA only trades between 01:00 and 16:00 Broker time.

bool CheckTime(string StartHour, string StopHour)

{

  //------------------------------------------------------------------

  bool AllowTrade = true;

  {

    bool allow1=true;

    string sh1, eh1;

    sh1 = StartHour; eh1 = StopHour;

    //------------------------------------------------------------------

    if (sh1 < eh1)

      if (TimeToStr(TimeCurrent(), TIME_MINUTES) < sh1 || TimeToStr(TimeCurrent(), TIME_MINUTES) > eh1)

        allow1 = false;

    if (sh1 > eh1)

      if (TimeToStr(TimeCurrent(), TIME_MINUTES) < sh1 && TimeToStr(TimeCurrent(), TIME_MINUTES) > eh1)

        allow1 = false;

    if (sh1 == eh1) allow1 = false;

    //------------------------------------------------------------------

    if (!allow1) AllowTrade = false;

  }

  //------------------------------------------------------------------

  return (AllowTrade);

 
TheForexKid:

Can you advise how i can edit this part of the code so EA only trades between 01:00 and 16:00 Broker time.

bool CheckTime(string StartHour, string StopHour)

{

  //------------------------------------------------------------------

  bool AllowTrade = true;

  {

    bool allow1=true;

    string sh1, eh1;

    sh1 = StartHour; eh1 = StopHour;

    //------------------------------------------------------------------

    if (sh1 < eh1)

      if (TimeToStr(TimeCurrent(), TIME_MINUTES) < sh1 || TimeToStr(TimeCurrent(), TIME_MINUTES) > eh1)

        allow1 = false;

    if (sh1 > eh1)

      if (TimeToStr(TimeCurrent(), TIME_MINUTES) < sh1 && TimeToStr(TimeCurrent(), TIME_MINUTES) > eh1)

        allow1 = false;

    if (sh1 == eh1) allow1 = false;

    //------------------------------------------------------------------

    if (!allow1) AllowTrade = false;

  }

  //------------------------------------------------------------------

  return (AllowTrade);

Smart tunnel it have a similar function


the function is CheckTime

 
Ali Sabbaghi:

Smart tunnel it have a similar function


the function is CheckTime

Awesome work bro. I got now my Start and End times setup like i wanted them. Can you add an AutoLot feature? in another EA i use for example below, i can enable Auto Lots to "True" and setup the minimum lot @ 0.10 and AutLot size to 1000 which means lotsize will increase automatically by 1 cent per every 100.00 in balance. So if you have a 1k account, initial lot will be 0.10, when account grows to 1,100.00 then orders will be placed @ 0.11 then 0.12 and so on.


 
Thanks for this fine EA and clever strategy.  I tried using the Optimizer to optimize some of the parameters and noticed that the Optimizer gave different results than the Backtester, for identical input data.  It turns out that the Optimizer cannot create objects, making it unreliable for optimization when Objects are used.  I verified this with a simple test program.
 
TheForexKid:

Awesome work bro. I got now my Start and End times setup like i wanted them. Can you add an AutoLot feature? in another EA i use for example below, i can enable Auto Lots to "True" and setup the minimum lot @ 0.10 and AutLot size to 1000 which means lotsize will increase automatically by 1 cent per every 100.00 in balance. So if you have a 1k account, initial lot will be 0.10, when account grows to 1,100.00 then orders will be placed @ 0.11 then 0.12 and so on.


there is no option to on/off auto lot. BUT the function that name is Checklot() it is an automatically find best trade volume with defined risk in the input parameter.

with your account balance and with defined risk calculate the best volume trade.

 
raposter:
Thanks for this fine EA and clever strategy.  I tried using the Optimizer to optimize some of the parameters and noticed that the Optimizer gave different results than the Backtester, for identical input data.  It turns out that the Optimizer cannot create objects, making it unreliable for optimization when Objects are used.  I verified this with a simple test program.

thanks for your comment. in visual mode all the object crated and chanje during the price change... Is not it?

 
Thanks bro, i tested now the new code with Start time 01:00 and End Time 16:00 but when i run a backtest to check it it opens orders starting at 19:00. Not sure what the problem may be.
 
I had two gbp orders close @ loss without touching the stoploss. Can it be becuase of the Risk Management % or does that only control the size of the order lots