Forex
Google

Go Back   Forex Trading > Discussion Areas > Suggestions for Trading Systems
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-24-2006, 03:07 PM
cucurucu's Avatar
cucurucu cucurucu is offline
Senior Member
 
Join Date: Jan 2006
Posts: 315
cucurucu is on a distinguished road
Previous Tick Price

Hi,

Can anyone tell me what is the code (if it exists) for the previous tick price?
I'm trying to write an EA with price crossing SMA but I need to know the previous tick price. I don't need the previous bar's Close. I want the EA to buy when the price is crossing the SMA upwards and to sell when the price is crossing the SMA downwards.

For this I need to compare the actual price and the previous tick price with the SMA. (If the atual price<SMA & the previous tick price > SMA then buy.)

The best solution I've found so far, is to use previous M1 Close but this isn't so accurate as using previous tick price.


Thank you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-24-2006, 10:29 PM
cockeyedcowboy's Avatar
cockeyedcowboy cockeyedcowboy is offline
Senior Member
 
Join Date: Nov 2005
Posts: 267
cockeyedcowboy is on a distinguished road
cucurucu

Assign the current tic value to a HoldVariable and check it with any incoming tic if different then tic is new. { do something } then assign the HoldVariable the new value, and continue.

Must warn you that tic values can bounce to both sides of a MA many times in a short period of time.


The CockeyedCowboy


Quote:
Originally Posted by cucurucu
Hi,

Can anyone tell me what is the code (if it exists) for the previous tick price?
I'm trying to write an EA with price crossing SMA but I need to know the previous tick price. I don't need the previous bar's Close. I want the EA to buy when the price is crossing the SMA upwards and to sell when the price is crossing the SMA downwards.

For this I need to compare the actual price and the previous tick price with the SMA. (If the atual price<SMA & the previous tick price > SMA then buy.)

The best solution I've found so far, is to use previous M1 Close but this isn't so accurate as using previous tick price.


Thank you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
What's the best way to check if the tick is the first tick of the new bar? blooms Metatrader 4 2 10-31-2006 06:10 AM
Problem using Variables Tick-by-Tick unltdsoul Metatrader 4 2 07-04-2006 03:36 AM
First or Previous Indicator's data? phildunn Setup Questions 3 03-28-2006 09:43 AM
Previous high and low phildunn Metatrader 4 3 03-21-2006 03:10 PM


All times are GMT. The time now is 01:34 PM.