Previous tick's value

Back to topics list  | 1 2 To post a new topic, please log in or register
avatar
15
KingOfSand 2015.12.04 13:33 #
 

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. 

avatar
12985
WHRoeder 2015.12.04 14:17 #
 
Why don't you simply count up/down once per tick until you get a count of X?
avatar
15
KingOfSand 2015.12.04 15:27 #
 
Yes, I know it must be very simple to make this but would you please give me a hint :)
avatar
12985
WHRoeder 2015.12.04 15:35 #
 
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.

avatar
15
KingOfSand 2015.12.04 15:39 #
 

Sorry for asking for help. 

avatar
15
KingOfSand 2015.12.05 19:47 #
 
Anyone else who want to give it a try to help instead of above unnecessary post? 
avatar
12985
WHRoeder 2015.12.05 21:20 #
 
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.
avatar
15
KingOfSand 2015.12.07 19:45 #
 
You really need to learn to behave.
avatar
70
Keelan 2015.12.07 20:57 #
 
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. 

avatar
15
KingOfSand 2015.12.08 12:16 #
 

Thanks Keelan!

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

 

Thanks again! 

Back to topics list   | 1 2  

To add comments, please log in or register