Amibroker, anyone? -
1 2 3 4

thread: Amibroker, anyone?

  1. #11
    Junior Member Heart's Avatar
    16
    Btw what is forex data feed for amibroker?

  2. #12
    Junior Member Stumbleine's Avatar
    16
    May be I misunderstood you today, dastwo, however, all the detailed descriptions of these things to be exported can be found at MQL docs.

    http://docs.mql4.com/trading

  3. #13
    No Tipster, I believe you misunderstood. I am aware for exporting the CSV file that I do not need Mt4. I wished to know what's needed to be exported by Amibroker to ensure Metatrader can read all order chances. And I'm unfamiliar with MT4 order adminiion. Here there's the description of this mql script
    APPEARS TO WORK BUT NOT FULLY TESTED This is a crude API for MT4. It allows external appliions to command MT4 to perform, alter, close and delete trades Shop in experts/scripts and compile This script folder experts/files every Repeat_Delay_Seconds to get a document commandfile.txt When it exists, reads a single transaction command according to examples below.:
    OrderSend,AUDUSD,OP_BUY,1,Ask,5,0,0,Order1,9999,0, Orange OrderSend,AUDUSD,OP_BUYSTOP,1,0.7670,5,0,0,Order2, 9999,0,Orange OrderModify,Order1,0.7695,0.7620,0.7720,0,Orange OrderClose,Order1,1,Bid,5,Purple OrderDelete,Order1 Note that the arrangement of the CSV lines is similar to the original purpose calls.
    A significant point about managing existing orders ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The controls OrderModify, OrderClose and OrderDelete loe the order that they're targetting with its Comment, NOT by its own ticket number.
    When the command in commandfile.txt is powerful it is deleted and the command is written to commandfile_log.txt Unsuccessful commandfiles are renamed FAILED command . Txt Maintains list of open orders in openorders.txt in format: OrderOpenTime,OrderComment,OrderMagicNumber,OrderS ymbol,OrderType,OrderLots,OrderOpenPrice,OrderStop Loss,OrderTakeProfit

  4. #14
    Hi Tequilla, thank you very much for supplying that code snippet! I guess it's not yet the entire code that you mentioned but just an example. Will look at it and report back. Looking forward to the complete code (if you're willing to discuss it) as I am not familiar with metatrader.
    You do not have to know MT4 to do this, there is already an EA/script which will read the text file created by the AFL code above (. . .did you intend AFL??)

    There's quite a little more code required to make this bullet evidence. But it's not a huge deal if you know what your doing. Great job so far!!

    I can not believe this code doesn't exist yet, as in MT4 and AMI have been around a long time...

  5. #15
    Hi Tequilla, thank you very much for supplying that code snippet! I guess it's not yet the full code you mentioned but just an example. Will look at it and report back. Looking forward to the complete code (if you're inclined to discuss it) as I am not familiar with metatrader.

  6. #16
    Junior Member Stumbleine's Avatar
    16
    Hi , thanks. And just how do you create that csv file with Amibroker? Have you got an instance in place? Have you tried it yet?
    Hey, dastwo. Actually I have just found it so didn't try it yet, because the markets are closed on weekends, but I'm sure it is working and is pretty simple to use. The most tricky part would be to create static vars inside amibroker to follow all of the orders with magical numbers.

    I will post complete afl here when it's going to be ready, but it might take some time. For now you can try yourself through amibroker by creating the document and writing into it.

    Inserted Code _SECTION_BEGIN(Documents); Filepath = ParamStr(Path to trading documents, C:\\Metatrader\\specialists\\TradeFromCsvFile\\); Inputfile = ParamStr(Input filename, commandfile.txt); _SECTION_END(); function ToFile(sOrderString) Result = False; Filename = Filepath Inputfile; File=fopen(Filename,a); should (Document) fputs(sOrderString n(Document); fclose(File); Result = True; return Result; _SECTION_BEGIN(Action); AutoTrade = ParamToggle(Auto trade, Away|Running); BuyOrder = ParamTrigger(Place Buy order,Buy); SellOrder = ParamTrigger(Place market order,Sell); CloseAll = ParamTrigger(Close all places,Close all); CancelAll = ParamTrigger(Cancel all orders,Cancel all); Reset= ParamTrigger(Reset, Reset); _SECTION_END(); if (! Autotrade) ChartId = GetChartID(); Price = int(Study(TR, ChartId)); Stop = int(Study(ST, ChartId)); Profit = int(Study(PR, ChartId)); ReadyForTrade = Price gt; 0 AND Profit gt; 0 AND Stop gt; 0; Title = trading style: WriteIf(ReadyForTrade, Manual, ready\n, Manual, not ready\n); Title = Title EncodeColor(colorSkyblue) Trade price: WriteIf(Price gt; 0, StrFormat(%g, Price), Create Study with TR id) \n; Title = Title EncodeColor(colorRose) Stop price: WriteIf(Stop gt; 0, StrFormat(%g, Stop), Create Study with ST id) \n; Title = Title EncodeColor(colorPaleGreen) Profit price: WriteIf(Profit gt; 0, StrFormat(%g, Profit ), Create Study with PR id) \n; should (SellOrder AND LastValue(Price) gt; 0) SellLimit(Price(Number); if (BuyOrder AND LastValue(Price) gt; 0) BuyLimit(Price, Quantity); /* function BuyLimit(Price, Quantity) sOrderString = OrderSend, logo, cmd, quantity, price, slippage, stoploss, takeprofit, comment, magical, expiry, arrow_color ToFile(sOrderString); */
    once more, I'm unsure about filenames, because I haven't tried it yet, just giving you a clue how to work with documents in ami. Pretty simple...
    This is a code to trade with research. Create a study line and give it a name, like TR (Trade pride), ST (Stop reduction), PR (Profit). Then you'll have the ability to send orders out of ami to metatrader
    Ofcourse you'll need to rework some of the code and complete it, because im writing all this at forums
    It's up to you to dig it up...

    p.s.s And because the MQL script is available you can make anything you want out of it, since you already got the base!

  7. #17
    I only got a copy of AmBroker ver 4.70 for backtesting functions but have not got it down however. Previously, I used MetaStock Professional ver 8. My aim is a friendlier user-interface with similar or better outcomes.

    Any remarks regarding AmiBroker?

    Thanks.
    I use ami for backtesting and creating my EAs. I wont pay anybody for additional software. Value it paying for them simply cant. You may configure everything, You have free upgrades and also lot of folks uses so that You can have answere for all the questions You have.

  8. #18
    Great day!
    It was quite fruing when my first article was not approved by mod, tho it was composed well... I was asking to share the solution with Amibroker MT4 orders. I've found one. And am here to talk about this with anybody who still struggles to connect Amibroker to Metatrader in order to send orders.

    Please find the link below quite useful:
    http://paulsfxrandomwalk.blogspot.co...atrader-4.html

    With MQL connected there you will be able to send orders to Metatrader through text file. Good luck.
    Hello Tequilla, thanks. And how can you make that csv file using Amibroker? Have you got an example set up? Have you tried it yet?

  9. #19
    Junior Member Stumbleine's Avatar
    16
    Good day!
    It was quite fruing when my very first post was not approved by mod, tho it was written well... I was asking to share the solution with Amibroker MT4 orders. I've found one. And am here to talk about this with anybody who still struggles to join Amibroker to Metatrader in order to send orders.

    Please see the link under quite helpful:
    http://paulsfxrandomwalk.blogspot.co...atrader-4.html

    With MQL connected there you will be able to send orders to Metatrader via text document. Good luck.

  10. #20
    Junior Member xxaurix's Avatar
    10
    I have used AmiBroker for 5yrs would not use anything else. Can not beleive that people would pay the price that the others are charging. The price differance is mainly due to the number the other appliions organizations are spending on advertisment to tempt you into buying there product. If you find something that AmiBroker can not do, then you have not read the users guide. It's possible, with a DDE link, tie it together with MT. Haveing AB do the job and sending orders to MT to open/close the rankings.
    I would love any information on how to connect AB using MT4 platform. I am using MT4 for a little while but just started with AB.

    Thank you.

  •