Jump to content

flib

Members
  • Posts

    61
  • Joined

  • Last visited

Posts posted by flib

  1. Interesting idea.

     

    A couple of months ago I spent some time trying to find something like this to help with trading alongside the DeMark TDCombo method but I failed to find anything other than the two that you've included in your zip file (and one more called MA_Angle_v4 which you can get via google).

     

    Looking at your PDF I don't think it'd be too difficult to code but it's beyond my level. There are some good coders on here so maybe someone will step in to help.

  2. use this indicator

     

    #property indicator_chart_window

     

    /*

    Filename: HISTORYDATA-MTP.mq4

    Description: Export history data

    Author: Muhammad Hamizi Jaminan aka hymns

     

    Version History

    ***************

    Version 1.0.5

    - add string time frame on file instead of minute numbers.

     

    Version 1.0.4

    - add new frequency update for reduce memory usage on writing.

     

    Version 1.0.3

    - fixed exausting memory usage on writing for all pair (19 pair 5 timeframe).

     

    Version 1.0.2

    - add completed bar parameter

    - add debug mode parameter

    - add timeframe 60, 30 & 15 minute data

     

    Version 1.0.1

    - add custom extension for filename

    - add custom bar numbers

     

    Version 1.0.0

    - Enjoy my first release

    - Export D1 & H4 chart history

    */

     

    //external input

    extern int frequency_update = 60;

    extern string file_extension = ".csv";

     

    //bar input

    extern int number_bars = 2000;

    extern int from_year = 1978;

    extern bool completed_bar = false;

    extern bool enable_debug = false;

     

    //period input

    extern bool period_weekly = true;

    extern bool period_daily = true;

    extern bool period_4hour = false;

    extern bool period_1hour = false;

    extern bool period_30min = false;

    extern bool period_15min = false;

     

    //writing permissions

    bool writedata = false;

     

    //file handler

    int handler, cnt, shift;

    int current_time = 0;

     

    //string handle

    string strline, filename;

     

    //start function

    int start()

    {

    //timer controller

    if (current_time == 0 || current_time < StrToTime(TimeToStr(TimeCurrent(), TIME_MINUTES)))

    {

    current_time = StrToTime(TimeToStr(TimeCurrent()+frequency_update, TIME_MINUTES));

    writedata = true;

    }

     

    //check writing permissions

    if (writedata == false)

    {

    return(0);

    }

     

    //check complete bar

    if (completed_bar)

    {

    shift = 1;

    }

    else

    {

    shift = 0;

    }

     

    //weekly period

    if (period_weekly)

    {

    write_history(PERIOD_W1);

    }

     

    //24 hour period

    if (period_daily)

    {

    write_history(PERIOD_D1);

    }

     

    //4 hour period

    if (period_4hour)

    {

    write_history(PERIOD_H4);

    }

     

    //1 hour period

    if (period_1hour)

    {

    write_history(PERIOD_H1);

    }

     

    //30 minute period

    if (period_30min)

    {

    write_history(PERIOD_M30);

    }

     

    //15 minute period

    if (period_15min)

    {

    write_history(PERIOD_M15);

    }

     

    //reset permission back

    writedata = false;

     

    return(0);

    }

     

    //write history data

    void write_history(int period)

    {

    //switch period string

    string period_string;

     

    switch(period)

    {

    case 10080 :

    period_string = "W1";

    break;

     

    case 1440 :

    period_string = "D1";

    break;

     

    case 240 :

    period_string = "H4";

    break;

     

    case 60 :

    period_string = "H1";

    break;

     

    case 30 :

    period_string = "M30";

    break;

     

    case 15 :

    period_string = "M15";

    break;

    }

     

    //filename

    filename = Symbol() + "_" + period_string + file_extension;

     

    //debug : open file

    if (enable_debug)

    {

    Print("Debug: Accessing file ",filename,"...");

    }

     

    //open file : assign handler

    handler = FileOpen(filename, FILE_CSV|FILE_WRITE, "\t");

     

    //failed create handle

    if(handler < 1)

    {

    //debug : file open failed

    if (enable_debug)

    {

    Print("Debug: Cannot open file ", filename," : error_",GetLastError());

    }

    return(0);

    }

     

    //debug : file open

    if (enable_debug)

    {

    Print("Debug: Success accessing file ",filename,"...");

    }

     

    //reset string

    strline = "";

     

    //read existing bars

    for (cnt = number_bars; cnt >= shift; cnt--)

    {

    //check year

    if (from_year < TimeYear(iTime(Symbol(), period, cnt)) )

    {

    //assign contents

    strline = TimeToStr(iTime(Symbol(), period, cnt),TIME_DATE|TIME_SECONDS);

    strline = StringSubstr(strline, 0, 4) + StringSubstr(strline, 5, 2) + StringSubstr(strline, 8, 2) + "," + StringSubstr(strline, 11, 5);

    strline = strline + "," + DoubleToStr(iOpen(Symbol(), period, cnt), 4) + "," + DoubleToStr(iHigh(Symbol(), period, cnt),4) + "," + DoubleToStr(iLow(Symbol(), period, cnt),4) + "," + DoubleToStr(iClose(Symbol(), period, cnt),4) + "," + DoubleToStr(iVolume(Symbol(), period, cnt),0);

     

    //writing contents

    FileWrite(handler, strline);

    }

    }

     

    //debug : complete

    if (enable_debug)

    {

    Print("Debug: Writing file ",filename," completed!");

    }

     

    //close handler

    FileClose(handler);

     

    //debug : closing

    if (enable_debug)

    {

    Print("Debug: Closing file ",filename,"...");

    }

     

    return(0);

    }

  3. Re: (ASK) Placing orders

     

    Hi Scarface,

     

    Thanks very much for the link.

     

    Looking at my original post I don't think I explained things too well :-/ My indicator is showing me buy, stop loss and target values on my chart at any given time but for me to make the trade I have to type these into MT4 each time. What I'm after is a way to automate that so that I just start a script (or EA ?) which takes the numbers from my indicator and places the trade.

     

    I'll have a read of your info at the weekend and hopefully that'll be a good start. I don't expect it to be as easy as it sounds, lol

  4. Hi guys,

     

    I'm at the stage where I've written a few basic indicators, mainly by muddling through so I'm in no way proficient at the coding. What I'd like to do next is learn how to place orders when I decide to (not automatically).

     

    For example, if I have an indicator which has done some simple arithmetic and has output three numbers 1, 2, 3 what is the best method to allow me to open a trade that opens a BUY-STOP to buy at 2 with a stop loss of 1 and a target of 3 ?

     

    Is this an expert advisor that I turn on when I want to trade ? Or is it a script ?

     

    So, I'm just looking to be pointed in the right direction. Maybe someone has an example that I could look at ?

     

    Thanks.

  5. Re: Trading in the Buff course by John Templeton

     

    As I said a few months back ^^ I don't really see this pattern as a trading indicator but bar 1 can be viewed as an area of interest when/if the price returns to that level. It's very similar to the support/resistance ideas that are shown in the Sam Seiden videos (easily found with google).

     

    If you see this three bar pattern in a higher TF then wait to see if the price retraces and if it does you can drop down to a lower TF and prepare your trade depending on what happens once it gets there. I seem to remember the PDF explains a few different scenarios and even the author isn't recommending you use this as a simple blind indicator, you need to consider the larger picture.

  6. Re: Tro Drain The Banks

     

    I remember looking at this ages ago. The screenshots always look great but try trading live with it and the repainting often leaves you feeling duped because you enter the trade when everything looks right, the price goes the wrong way, the indicator repaints and it looks like you jumped in too early.

     

    I classed this as a fairly important lesson tho ;)

  7. Re: Dynamic Trader 5 Ver 5.0.84.131

     

    I am a believer in 'human psychology' creating repeatable patterns (such as the Elliot Wave and the 'trading in the buff' 3 bar pattern). Saying that, my aim is to get away from indicators, systems and software such as MTP so I haven't spent much time on it but if you read this thread (specifically the first post and the last post on page 14) you can see some interesting stats about how MTP is used and made to work

     

    h**p://www.mtptrader.com/showthread.php?t=777

  8. Re: Steve Nison - Candlestick Re-Ignited

     

    One thing I don't quite get about the candlesticks is you can see a perfect 'swimming dolphin' or 'spinning grandma' (whatever the latest names are) but when you change TF where do they go....

     

    Also, if you look at some of his latest marketing, it's just looks a bit too tacky. Any page that has a pop up when you try close it is :-?

     

    h**p://www.nisonspecial.com/myforexdiscovery

  9. Re: Dynamic Trader 5 Ver 5.0.84.131

     

    Check out the MTP thread (viewtopic.php?f=41&t=4152). The guy who's behind that used to be the programmer at Dynamic Trading and left to set up his own company.

     

    You can input forex data from MT4 using the indicator explained on that thread and also use CSV files for stocks etc.

  10. Re: (Req) Need help to set up a program

     

    If you don't want to do it then fair enough. I just view it as time well spent as I will be using this ability to aid my trading.

     

    I've had a quick go writing this indicator for you. It's fairly crude as it's just drawing a vertical line at the beginning of each hour and the only input variable is the colour of the vertical lines.

     

    h**p://www.mediafire.com/file/jwwt5xmjoiy/Vertical_Hours.mq4

×
×
  • Create New...