Results 1 to 8 of 8
 4 Attachment(s)    

Thread: TD moving average I Alert

  1. #1

    Default TD moving average I Alert

    Hi all,
    Can someone add an alert to this indicator when the first green or red point shows in the chart, please?
    Many thanks
    Davide
    Attached Files Attached Files

  2. #2
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by paciola View Post
    Hi all,
    Can someone add an alert to this indicator when the first green or red point shows in the chart, please?
    Many thanks
    Davide
    Hi paciola,

    Here it is.
    Attached Files Attached Files

  3. #3

    Default

    Hi Funyoo
    thank you very much, you are a great man.

    Davide

  4. #4

    Default

    Hi Funyoo,
    You are always my last hope.
    I will try to create an expert with this indicator. I created the variables to determine the signals buy or sell in this way:

    double tdsell=iCustom(NULL,0,"TD moving average I",HighsLowsPeriod,AllowedGapPeriod,AveragesPeriod ,2,1); //Down
    double tdbuy=iCustom(NULL,0,"TD moving average I",HighsLowsPeriod,AllowedGapPeriod,AveragesPeriod ,3,1); //Up

    But I can not understand what the code to say to EA: "When appear the green dot go buy, when appear the red dot go sell".
    Which value do I compare with the variables tdbuy e tdsell? The open price of the new candle?

    I.e. if open price > tdbuy .....open position buy
    if open price < tdsell ......open position sell.

    Sorry if I talked nonsense and also for my bad English!!

    Thanks
    Davide

  5. #5
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by paciola View Post
    Hi Funyoo,
    You are always my last hope.
    I will try to create an expert with this indicator. I created the variables to determine the signals buy or sell in this way:

    double tdsell=iCustom(NULL,0,"TD moving average I",HighsLowsPeriod,AllowedGapPeriod,AveragesPeriod ,2,1); //Down
    double tdbuy=iCustom(NULL,0,"TD moving average I",HighsLowsPeriod,AllowedGapPeriod,AveragesPeriod ,3,1); //Up

    But I can not understand what the code to say to EA: "When appear the green dot go buy, when appear the red dot go sell".
    Which value do I compare with the variables tdbuy e tdsell? The open price of the new candle?

    I.e. if open price > tdbuy .....open position buy
    if open price < tdsell ......open position sell.

    Sorry if I talked nonsense and also for my bad English!!

    Thanks
    Davide
    Hi paciola,

    if(tdbuy>0 && tdbuy!=EMPTY_VALUE)buy...
    if(tdsell>0 && tdsell!=EMPTY_VALUE)sell...

  6. #6

    Default

    Quote Originally Posted by funyoo View Post
    Hi paciola,

    if(tdbuy>0 && tdbuy!=EMPTY_VALUE)buy...
    if(tdsell>0 && tdsell!=EMPTY_VALUE)sell...
    Thank you Funyoo.
    When you have time you can explain me the significance of these two commands please?

  7. #7

    Default

    Hi Funyoo,
    this is my first EA using a part of your template.
    I tried to create a very simple expert based on TD Moving Average. So for fun.
    I think that the code is ok and it work, but it does only one trade, the first, then stop.
    Please when you can, control the code and tell me what there is wrong?
    Many thanks
    Davide
    Attached Files Attached Files

  8. #8
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by paciola View Post
    Hi Funyoo,
    this is my first EA using a part of your template.
    I tried to create a very simple expert based on TD Moving Average. So for fun.
    I think that the code is ok and it work, but it does only one trade, the first, then stop.
    Please when you can, control the code and tell me what there is wrong?
    Many thanks
    Davide
    Hi paciola,

    Check this one.
    Attached Files Attached Files

Similar Threads

  1. Replies: 0
    Last Post: 07-21-2014, 11:18
  2. EA WITH ONLY ONE MOVING AVERAGE
    By afoson in forum Trading discussion
    Replies: 0
    Last Post: 07-09-2010, 19:09
  3. Replies: 3
    Last Post: 06-13-2010, 19:06
  4. Moving average EA
    By Rascacio in forum Expert advisors backtesting
    Replies: 3
    Last Post: 02-16-2010, 18:46

Tags for this Thread

add, average, candle, expert, indicator, moving average, signals, simple, stop, time

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •