Experts: 1 MINUTE SCALPER

 

1 MINUTE SCALPER:

1 MINUTES SCALPER EA works best on 1 minute time frame major forex pairs.

1 MINUTE SCALPER

Author: Aharon Tzadik

 
Thank you for sharing!
 

don't work

 
Amin8024:

don't work

Works fine you are doing some thing wrong,upload on screen on few pairs 1MIN time frame and enable aoutomated trading.

 

Hi Aharon, 

I have recently downloaded 1 Min Scalper and trying to check it with MT4 demo. It looks most of the time it remains passive.

I mean it does not open any order. And I entered the code to see the reason. It looks the following code obstacles:

if(Volume[0]>1) return; - THIS IF returns the control back - and the below code does not function.....

   What do you check here with Volume[0]>1 ... I mean Volume is always far higher than 1...... 

    Cant we skip it?


.........{if(EMA3>EMA5&&EMA5>EMA8&&EMA8>EMA10&&EMA10>EMA12&&EMA12>EMA15&&EMA15>EMA30&&EMA30>EMA35&&EMA35>EMA40

       &&EMA40>EMA45&&EMA45>EMA50&&EMA50>EMA55&&EMA55>EMA200)

 



Regards

Bahman

 

I have changed the Volume[0]>1 condition to larger number to allow the control pass down.... now it still does not open..

I put Print commands there to see what is going on... it looks there are too many checking of iMAs that can be met very seldom)...

So, it looks it is not much active to open orders even if it is a 1 min scalper... Too many checking brings little greenlight for opening new orders...

Please correct me if I am wrong...

Regards

Bahman

 
Bahman Askerov:

I have changed the Volume[0]>1 condition to larger number to allow the control pass down.... now it still does not open..

I put Print commands there to see what is going on... it looks there are too many checking of iMAs that can be met very seldom)...

So, it looks it is not much active to open orders even if it is a 1 min scalper... Too many checking brings little greenlight for opening new orders...

Please correct me if I am wrong...

Regards

Bahman

Hello

This condition force the EA to work only with the open price of a candle,so you can back test it with "open prices only" option,you can cancel it by drawing two apostrophes //

but then the EA will work with every tick data and back testing will take long time.

 

Thanks for Your Code, but don't work for me. I set same settings of Your image and show errorsWhat I do wrong?

I use MT 4

(big image for details)

 
Aharon Tzadik: This condition force the EA to work only with the open price of a candle,so you can back test it with "open prices only" option,you can cancel it by drawing two apostrophes //

but then the EA will work with every tick data and back testing will take long time.

Never use the Volume to check for a new bar. Do it properly by using the open time of the latest bar:

#property strict

void OnTick()
{
   // Check for New Bar (Compatible with both MQL4 and MQL5)
   static datetime dtBarCurrent = WRONG_VALUE;
   datetime dtBarPrevious = dtBarCurrent;
   dtBarCurrent = (datetime) SeriesInfoInteger( _Symbol, _Period, SERIES_LASTBAR_DATE );
   boolNewBarFlag = ( dtBarCurrent != dtBarPrevious );

   if( boolNewBarFlag )
   {
      // Do something ...
   }
   else
   {
      // Do something else ...
   }

   // Do things ...
}
 

Thanks Aharon & Fernando,

The essence of this code (Volume related) is clear.

Now, I am testing the EA in general, however, so far.. it loses more than it can gain during a day, the balance is getting down gradually...

I am trying to learn the reason and to suggest some correction if possible.

Regards

Bahman

 
//--- should it be closed?
            if(((Bid<OrderOpenPrice()-iATR(NULL,0,14,0)) || ((MacdMAIN>0 && MacdMAIN<MacdSIGNAL) || (MacdMAIN<0 && MathAbs(MacdMAIN<MacdSIGNAL)))
               || Close[1]==upperBB)) //--- close order and exit

              {if(!OrderClose(OrderTicket(),OrderClosePrice(),Bid,3,Violet)) Print("OrderClose error ",GetLastError()); return;}


Here... in last condition.... || (MacdMAIN<0 && MathAbs(MacdMAIN<MacdSIGNAL))

in the second part ....

&& MathAbs(MacdMAIN<MacdSIGNAL)

I cant see what it means - MathAbs is not a logical function, right?

Then how can it work in the code, without a syntax error?

... I try to see if it closes the order timely... to avoid unnecessary losses...


Here ... && MathAbs(MacdMAIN<MacdSIGNAL) .. it looks as if the brackets are either missing or not in their place..

Please correct me if you can.


Regards

Bahman


Reason: