Tick Indicator and EAs - page 16

huntstunt
5
huntstunt  

ok cud u show me how to code it?

d4v3
27
d4v3  
huntstunt:
ok cud u show me how to code it?

double LastTick; //Must be a global variable, not local

double NewTick=Bid;

if(LastTick>0)

{ double Diff=LastTick-NewTick;

// rest of your code

}

LastTick=NewTick;

Jayson Davie
136
Jayson Davie  

Indicator idea

Hi all

I have an idea for an indicator I would be greatful if some one could help me out by codding this for me and anyone else that might want to use it. I don't quite know how useful it would be but I thought about it ages ago and think it possible could be useful, anyway here it goes.

What I would like is tick volume for bulls/bears.

So the input of the indicator would be each bull ticks and bear ticks.

The indicator should be displayed as a histogram style.

Each bull tick would be show as a blue above a zero line and each bear tick as red below the zero line for each candle.

Once the tick is counted it should stay visuel

I don't know by how much each tick would increase the size of the bar, but I'm sure that a good coder would be able to do this.

I hope that someone can help with this and can understand what I mean not sure if I have explained it properly or not. If not let me know and I will try and explain more clearly.

huntstunt
5
huntstunt  
huntstunt:
I'm trying to make an EA that opens orders after a large enough change in tick price. So can someone help me with the code for storing the bid of the first tick, then subtracting the bid of the 1st tick from the 2nd tick?

Here is what I have coded, but I get OrderModify Error 130. Can anyone help?

double LastTick;

int start()

{

if (OrdersTotal() > 0)

{return(0);}

{ double NewTick=Bid;

if(LastTick>0)

{ double Diff1=LastTick-NewTick;

double Diff2=NewTick-LastTick;}

double spread = Ask - Bid;

double Buy1_1 = Diff1;

double Buy1_2 = alpha*spread;

double Buy1_3 = beta*spread;

double Buy2_1 = iADX(NULL, PERIOD_M1, 14, PRICE_CLOSE, MODE_MAIN,0);

double Buy2_2 = m1ADX;

double Buy3_1 = iADX(NULL, PERIOD_M5, 14, PRICE_CLOSE, MODE_MAIN,0);

double Buy3_2 = m5ADX;

double Buy4_1 = iADX(NULL, PERIOD_M30, 14, PRICE_CLOSE, MODE_MAIN,0);

double Buy4_2 = m30ADX;

double Buy5_1 = iMACD(NULL, PERIOD_M1, 12, 26, 9, PRICE_CLOSE, MODE_MAIN,0);

double Buy5_2 = m1MACD;

double Buy6_1 = iMACD(NULL, PERIOD_M5, 12, 26, 9, PRICE_CLOSE, MODE_MAIN,0);

double Buy6_2 = m5MACD;

double Buy7_1 = iMACD(NULL, PERIOD_M30, 12, 26, 9, PRICE_CLOSE, MODE_MAIN,0);

double Buy7_2 = m30MACD;

double Sell1_1 = Diff2;

double Sell1_2 = Sellalpha*spread;

double Sell1_3 = Sellbeta*spread;

double Sell2_1 = iADX(NULL, PERIOD_M1, 14, PRICE_CLOSE, MODE_MAIN,0);

double Sell2_2 = Sellm1ADX;

double Sell3_1 = iADX(NULL, PERIOD_M5, 14, PRICE_CLOSE, MODE_MAIN,0);

double Sell3_2 = Sellm5ADX;

double Sell4_1 = iADX(NULL, PERIOD_M30, 14, PRICE_CLOSE, MODE_MAIN,0);

double Sell4_2 = Sellm30ADX;

double Sell5_1 = iMACD(NULL, PERIOD_M1, 12, 26, 9, PRICE_CLOSE, MODE_MAIN,0);

double Sell5_2 = Sellm1MACD;

double Sell6_1 = iMACD(NULL, PERIOD_M5, 12, 26, 9, PRICE_CLOSE, MODE_MAIN,0);

double Sell6_2 = Sellm5MACD;

double Sell7_1 = iMACD(NULL, PERIOD_M30, 12, 26, 9, PRICE_CLOSE, MODE_MAIN,0);

double Sell7_2 = Sellm30MACD;

int ticket;

if (Buy1_1 >= Buy1_2 && Buy1_1 = Buy2_2 && Buy3_1 >= Buy3_2 && Buy4_1 >= Buy4_2 && Buy5_1 > Buy5_2 && Buy6_1 > Buy6_2 && Buy7_1 > Buy7_2)

{ticket=OrderSend(Symbol(),OP_BUY,0.1,Ask,3,Ask-StopLoss*Point,Ask+Point*TakeProfit,"My order",12345,0,Green);}

if (Sell1_1 >= Sell1_2 && Sell1_1 = Sell2_2 && Sell3_1 >= Sell3_2 && Sell4_1 >= Sell4_2 && Sell5_1 < (-1)*Sell5_2 && Sell6_1 < (-1)*Sell6_2 && Sell7_1 < (-1)*Sell7_2)

{ticket=OrderSend(Symbol(),OP_SELL,0.1,Bid,3,Bid+StopLoss*Point,Bid-Point*TakeProfit,"My order",12345,0,Red);}

if( OrderSelect(ticket,SELECT_BY_TICKET) && OrderCloseTime()==0 ) {

if( OrderType()==OP_BUY ) {

OrderModify(OrderTicket(),OrderOpenPrice(),Open[0]-Point*TrailingStop,OrderTakeProfit(),0);

}

else if( OrderType()==OP_SELL ) {

OrderModify(OrderTicket(),OrderOpenPrice(),Open[0]+Point*TrailingStop,OrderTakeProfit(),0);

}

}

LastTick=NewTick;

return(0);

}}

stas13
6
stas13  

ticks

Hi all,

is there an indicator that tells how many upticks there have been in the past x period, versus downticks, and then graphed according to total ticks?

Thanks

Laurus12
55
Laurus12  
stas13:
Hi all,

is there an indicator that tells how many upticks there have been in the past x period, versus downticks, and then graphed according to total ticks?

Thanks

Hello Stas, try this one by FOREXflash over at forexfactory.com

Patrick
40
Patrick  

MT4 Send ticks ...

If you need a program to refresh your EA every x milliseconds even if no ticks are coming thru, this is for you. It's free ...

Hope this is useful to some

MT4 Tick Sender

remynz
3
remynz  
wittymonkey:
Hi all,

We have released for free an EA that allows you to store all Mt4 ticks in a MYSQL database and to calculate anything you want on the stored ticks.

Boston Technologies - Technical Solutions for Forex, CFD, and Futures Trading Platforms

One can use this EA to calculate for example

* The average spread of a feed

* The largest spread

* The smallest spread

* The average spread during a daily time period

* And any other statistics one wants to calculate

One can also use this EA to store ticks so that you can do proper back testing.

George

CEO, Boston Technologies

Bit of a thread dig here... but, does anyone know of any similar system where you can collect ticks in a database that isn't in .ex4??

This is system is great for meta trader, however, I need to run this on a platform that doesn't support .ex4 but can support .mq4

any help much appreciated!

saj1011
93
saj1011  

tick data needed

hello lovely people !

i am looking for tick data upto last 7 years for all currency majors, metals and oil.

anybody willing to advise on a good source or even donate the data like a good fellow community member ?

thanks

biddick
339
biddick  

You can buy it from Olsen.