Add the code to this indicator to manually trade

 
This is a very good indicator. The arrow of this indicator appears in the old candle when the new candle is opened and not painted again. I want the arrow to appear earlier in the old candlestick and it may disappear when the candle is closed for manual trading.
Can anybody help me with adding code and alert?

Thank you very much! 


Files:
 
tuanprowins:
This is a very good indicator. The arrow of this indicator appears in the old candle when the new candle is opened and not painted again. I want the arrow to appear earlier in the old candlestick and it may disappear when the candle is closed for manual trading.
Can anybody help me with adding code and alert?

Thank you very much! 


That indicator already repaints

Adding the code to show arrows even earlier would make it repaint even more

 
Mladen Rakic:

That indicator already repaints

Adding the code to show arrows even earlier would make it repaint even more


Arrows appear when 2 MAs intersect. Why is it repainted?

Can you help me add code so it appears earlier to manually trade?

Thank you very much!

 
  1. tuanprowins: Arrows appear when 2 MAs intersect. Why is it repainted?

    Because that isn't what it does. It compares the previous MA to bar one MA and bar one MA to bar zero MA. Therefor it will always be one bar late. It also never removes an arrow once drawn.

    fasterEMAnow = iMA(NULL, 0, FasterEMA, 0, MODE_EMA, PRICE_CLOSE, i);
    fasterEMAprevious = iMA(NULL, 0, FasterEMA, 0, MODE_EMA, PRICE_CLOSE, i+1);
    fasterEMAafter = iMA(NULL, 0, FasterEMA, 0, MODE_EMA, PRICE_CLOSE, i-1);      
    :
    if ((fasterEMAnow > slowerEMAnow) && (fasterEMAprevious < slowerEMAprevious) && (fasterEMAafter > slowerEMAafter)) {
    :
    else if ((fasterEMAnow < slowerEMAnow) && (fasterEMAprevious > slowerEMAprevious) && (fasterEMAafter < slowerEMAafter)) {
    
  2. tuanprowins: I want the arrow to appear earlier in the old candlestick and it may disappear when the candle is closed for manual trading.
    Can anybody help me with adding code and alert?
    • At the top of the loop add CrossUp[i] = CrossDown[i] = EMPTY_VALUE; so intermittent signals are removed.
    • Remove the after comparisons.
    • You know where the arrows are set, add your Alert there.

    • Help you with what? You haven't stated a problem. Show us your attempt and state the nature of your problem.
                No free help
                urgent help.

 
whroeder1:
  1. Because that isn't what it does. It compares the previous MA to bar one MA and bar one MA to bar zero MA. Therefor it will always be one bar late. It also never removes an arrow once drawn.

    • At the top of the loop add CrossUp[i] = CrossDown[i] = EMPTY_VALUE; so intermittent signals are removed.
    • Remove the after comparisons.
    • You know where the arrows are set, add your Alert there.

    • Help you with what? You haven't stated a problem. Show us your attempt and state the nature of your problem.
                No free help
                urgent help.


Thank you for explaining, sorry for my ignorance.

Can you help me write an arrow indicator when 2 MA lines with the following parameters intersect?

Thank you very much!


 
Help you with what? You haven't stated a problem.
You have only four choices: We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using SRC) and the nature of your problem.
          No free help
          urgent help.
Reason: