Download MetaTrader 5

Previous tick's value - page 2

To add comments, please log in or register
KingOfSand
58
KingOfSand  

I need to clarify that I do not need to see history of the ticks. I just need to "store" them as they come and it will do with 5 to 10 tick prices. It really must be possible to do this!

 Why do I need this?
When I receive a signal of say a BUY, I would like the EA to wait to make the order until the price turns more than X ticks. So if the price continues the same direction with only a few setbacks the EA waits until the price goes the other direction more than X ticks. 

whroeder1
16104
whroeder1  
Why don't you simply count up/down once per tick until you get a count of X?
KingOfSand
58
KingOfSand  
Yes, I know it must be very simple to make this but would you please give me a hint :)
whroeder1
16104
whroeder1  
KingOfSand: I know it must be very simple to make this but would you please give me a hint :)
  1. You know how to save the previous tick.
  2. You know how to compare previous to current.
  3. You know how to increment/decrement a counter.
  4. What more do you need?
If you "know it must be very simple," why didn't you try? learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
KingOfSand
58
KingOfSand  

Sorry for asking for help

KingOfSand
58
KingOfSand  
Anyone else who want to give it a try to help instead of above unnecessary post? 
whroeder1
16104
whroeder1  
There are no slaves here. You don't want to learn. You don't want to hire someone. You want it done for you. You need to grow up.
KingOfSand
58
KingOfSand  
You really need to learn to behave.
ThreadHandle
104
ThreadHandle  
double tick_dir = 0;
double last = Ask;
int count = 0;
int myTickCount = 50;

void OnTick(){

if(count == myTickCount){ Follow or Dont follow signal }

tick_dir += Ask - last;
last = Ask;
count++;
}

 

 Your welcome. 

KingOfSand
58
KingOfSand  

Thanks Keelan!

 This is the best way I learn; to look at others code. Will try this out :)

 

Thanks again! 

12
To add comments, please log in or register