Open prices stlyle vs Every tick
Results 1 to 7 of 7

Thread: Open prices stlyle vs Every tick

  1. #1
    Hi,

    I've a problem with a specialist I am trying to write and I have seen here are a lot of guys that currently a lot about MetaTrader and Experts writing.
    This is my problem: I created an expert which seems to work that way:

    When analyzed on open prices just it yields very very excellent results, but when analyzed on each tick the outcomes will also be great but not like those when analyzed with receptive prices. I wished to ask you guys if there's a way I could make my expert to work the exact same for each tick and prices.
    I analyzed with sleep purpose but seems not to work. I need that each tick to be once/bar. How can I do that?

    I would appreciate all your replies, thank you.

  2. #2
    Quote Originally Posted by ;
    I actuly need that every sign to be once/bar. How can I do this?
    I believe what you are asking is the way to go about programming the EA to ensure it only activates on the start of a new bar. Please explain if that is the case if I have misunderstood what you're looking for, then continue reading.

    Basically, you need to test to see if the bar time is exactly the same for this particular tick as the previous tick which came in. You can achieve this.

    Inserted Code // dtBarTime is a static variable, so it is going to continue to value between calls. Static datetime dtBarTime = 0; // exit the start function if it is not a new bar if (dtBarTime == Time#91;093;-RRB- return(0); // it is a new bar, update dtBarTime dtBarTime = Time#91;0#93;; This code will work, but it is not the strongest. The first tick is going to be processed regardless of if it had been the first sign of this bar, when an EA is started. You can get fancier(test Volume[0], etc.) but I have found this the most reliable and easiest way to carry out the type of test I believe you are asking for.

  3. #3
    Thank you tesla to your response but that is not what I need. The problem is I would like to ship order such as OrderSend(. . .OP_BUYSTOP....expiration). The order delivered at the time that I want, T0, can rise and start a position when the conditions are accomplished later, T0 but in a time that I do not want.

    For example this bit of code returns different effects on open prices versus each tick due to this problem.

    1) Order placed at time T0
    two ) Order could buy/sell when circumstances accomplished after T0 in a time that I do not want.
    3) Mess...

    int start()


    double yHigh,yLow;
    int ticket;
    datetime expire;


    yHigh=iHigh(Symbol(),PERIOD_D1,1);
    yLow=iLow(Symbol(),PERIOD_D1,1);
    expire=TimeCurrent() 24*3600;


    if (TimeHour(TimeCurrent())==0 (TimeMinute(TimeCurrent())==0) )

    ticket=OrderSend(Symbol(),OP_BUYSTOP,1,yHigh-50*Point,3,yHigh-70*Point,yHigh 100*Point,My order #1,16384,expire,Green);



    return(0);



    When running open prices all indicators accessible are from bar to bar, therefore buy/sell in the order delivered in T0 later T0, could be just from the Upcoming ticks T1,T2,. . .from the Upcoming bars. This is what I want.

    Is there some way I could write a code within my start() method in order that my bit of code will take as legitimate ticks just those I want, from all of the ticks, and the results to be the exact same for receptive prices and each tick?

    I want to have dead ticks nothing to happen in those, nothing ,no orders which sell/buy if conditions met.

    Thanks for reading and helping me.

  4. #4
    Quote Originally Posted by ;
    .. .Is there any way I could write a code within my start() method in order that my piece of code will take as legitimate ticks just the ones I want, from all of the ticks, as well as the outcomes are the same for open prices and each tick?

    I'd like to get dead ticks nothing to happen in people, nothing significance nothing no orders that sell/buy if conditions fulfilled.
    I am sorry, but I am having trouble understanding. There's a language barrier I think.

    Using code, you can cause an EA to dismiss any tick you decide on, it just depends on what exactly you're wanting to perform.

    I'll take yet another stab at what I believe you're asking for:
    When a bar makes order to be closed or opened, do nothing else for the remainder of the bar.

    Does that seem right?

  5. #5
    Without reel tick information, backtest is flawfil.
    Do not trust equally methids... no more corectness.
    be carefil. Thank you.

  6. #6
    Thank you guys for all your responses, the only think I needed to do is write a code that makes the very same effects are returned by my pro on launching prices and every tick test types.

    How can open prices work behind? What is the difference between a pending order on receptive prices and a pending order on every tick? These are my main questions. )

    Hope I will find the answers shortly. Thank you if I will find new things about this problems I'll post them here.

  7. #7
    Open prise use open of bar of time you picked (m1,m5,m15,etc).
    Every tick use fractil modil price (not reel price tick - but imitate price).
    The two methid never agreee, sorry.
    In case you've reel tick information, then really excel.
    If no, then forget - you midsection time, sorry.
    thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.