Two Dimensional Array vs One Dimensional Array -
1 2

thread: Two Dimensional Array vs One Dimensional Array

  1. #11
    Hey ec.... Yes, scripts are a one shot deal....

    You produce scripts the same fashion as ea's just choose script when MetaEditor asks what you need to make....

    Copy and paste the example code above and compile.... Then place it on any presentation chart.... Most scripts don't show the input signal, on this one switch trade to true....you'll see the orders put....

    I always use scripts for putting large number of orders.... For safety....

    Yes, you can do the same thing with ea's , just need some backup code to assure nothing has hung up....

    I lost a few grand in a little while after when a loop retained placing orders at a live account.... It might have been worse...h

  2. #12
    2 Attachment(s) hey ec.... Actually the ea counts the orders double to assure no mix ups.... It uses limit and stop orders in large numbers....

    It was counting the wrong kind orders... so it never maxed out....

    No big deal however, enormous losses are typical for me and this one is no where near the record book....

    It was the dumb mistake that I gave myself a fantastic thrashing for...h
    https://www.cliqforex.com/general-fo...day-trade.html
    https://www.cliqforex.com/trading-sy...s-success.html

  3. #13
    Junior Member Stefani21's Avatar
    16
    I dropped a few grand in a few minutes after every time a loop kept placing orders at a live account.... It might have been worse...h
    Ouch! ... Yes, I have had this happen to me also, except luckily it was on a demo account. However, it was something I could correct, and looked like it had been a programming problem.

    Here is an illuion of what I do to assure just 1 order is open at any specific degree:

    PHP Code: <code><span style=?color: #000000?> <span style=?color: #0000BB?></span><span style=?color: #FF8000?>//--OpenBuyOrder
    </span><span style=?color: #007700?>if(</span><span style=?color: #0000BB?>Ask</span><span style=?color: #007700?>==</span><span style=?color: #0000BB?>Targ5</span><span style=?color: #007700?>#91;</span><span style=?color: #0000BB?>I</span><span style=?color: #007700?>#93;</span><span style=?color: #0000BB?>Gate5</span><span style=?color: #007700?>#91;</span><span style=?color: #0000BB?>I</span><span style=?color: #007700?>#93;==</span><span style=?color: #0000BB?>0</span><span style=?color: #007700?>)

    </span><span style=?color: #0000BB?>Tk_5</span><span style=?color: #007700?>#91;</span><span style=?color: #0000BB?>I</span><span style=?color: #007700?>#93;=</span><span style=?color: #0000BB?>OrderSend</span><span style=?color: #007700?>(</span><span style=?color: #0000BB?>Symbol1</span><span style=?color: #007700?>,</span><span style=?color: #0000BB?>OP_BUY</span><span style=?color: #007700?>,</span><span style=?color: #0000BB?>Lots1</span><span style=?color: #007700?>,</span><span style=?color: #0000BB?>Ask</span><span style=?color: #007700?>,</span><span style=?color: #0000BB?>Slip1</span><span style=?color: #007700?>,</span><span style=?color: #0000BB?>0</span><span style=?color: #007700?>,</span><span style=?color: #0000BB?>0</span><span style=?color: #007700?>,</span><span style=?color: #DD0000?>''''</span><span style=?color: #007700?>,</span><span style=?color: #0000BB?>0</span><span style=?color: #007700?>,</span><span style=?color: #0000BB?>0</span><span style=?color: #007700?>,</span><span style=?color: #0000BB?>Lime</span><span style=?color: #007700?>);</span><span style=?color: #0000BB?>Gate5</span><span style=?color: #007700?>#91;</span><span style=?color: #0000BB?>I</span><span style=?color: #007700?>#93;=</span><span style=?color: #0000BB?>1</span><span style=?color: #007700?>;

    </span><span style=?color: #FF8000?>//--CheckifOrderhasClosed
    </span><span style=?color: #007700?>if(</span><span style=?color: #0000BB?>OrderSelect</span><span style=?color: #007700?>(</span><span style=?color: #0000BB?>Tk_5</span><span style=?color: #007700?>#91;</span><span style=?color: #0000BB?>I</span><span style=?color: #007700?>#93;,</span><span style=?color: #0000BB?>SELECT_BY_TICKET</span><span style=?color: #007700?>,</span><span style=?color: #0000BB?>MODE_HISTORY</span><span style=?color: #007700?>)==</span><span style=?color: #0000BB?>authentic</span><span style=?color: #007700?>)

    </span><span style=?color: #0000BB?>datetimectmT5</span><span style=?color: #007700?>=</span><span style=?color: #0000BB?>OrderCloseTime</span><span style=?color: #007700?>();should(</span><span style=?color: #0000BB?>ctmT5</span><span style=?color: #007700?>gt;</span><span style=?color: #0000BB?>0</span><span style=?color: #007700?>)</span><span style=?color: #0000BB?>Gate5</span><span style=?color: #007700?>#91;</span><span style=?color: #0000BB?>I</span><span style=?color: #007700?>#93;=</span><span style=?color: #0000BB?>0</span><span style=?color: #007700?>;

    </span><span style=?color: #0000BB?></span> </span> </code> And Gate5[I] (in accord with Targ5[I] and Tk_5[I]) is preset to 0 that, when the order is placed, is set to 1. And it will stay set to 1 (thus prohibiting any new orders) until OrderCloseTime() is queried and it has decided that the order has really shut. At that point Gate5[I] is reset to 0 and Targ5[I] is reached, it opens into a new order.

    As long as I implement something like this, I seldom seem to have any issues.

  •