How to code? - page 220

 
Kalenzo:
Here is the tip for ECN brokers:

It is advised to change the following line :

OrderSend(Symbol(),OP_BUY,1,Ask,3,Ask-25*Point,Ask+25*Point,"My order

#2",16384,0,Green);

blah...

}

Thanks Kalenzo, nice tip. I hate to ask stupid questions but usually I find that lots of other people have the same stupid Q... Too busy with my real job to test your solution this week but come next week the weight is off and I can do my tax return (irs for you usa folk) and get back to some scripting that is a lot more entertaining.

 

I really didn't catch what you want, try my script "TrailingLines" from

https://www.mql5.com/en/forum/173000/page28

 
Roger09:
I really didn't catch what you want, try my script "TrailingLines" from https://www.mql5.com/en/forum/173000/page28

I read the code but i still do not know how to move the lines.

 
Roger09:
I really didn't catch what you want, try my script "TrailingLines" from https://www.mql5.com/en/forum/173000/page28

What i want is to get a sound alert when my stop and take profit are hit. Thats why i want the line from that indicator to move where the stop loss/take profit is because the indicator triggers an alert everytime price touches the line. I usually trade stocks while doing forex so if i know that my tp or stp loss was trigger i can go back and see if i have another possible trade.

Thanks

 
raul_jr00:
Thats why i want the line from that indicator to move where the stop loss/take profit is because the indicator triggers an alert everytime price touches the line. Thanks

Show me this indicator, I think I can fix it.

 

Afstar

increase:
Here is an MTF version I did for you with alert

First All I want to thank u for this help, coz I was seekin' thru the web about some alert for this E.A.

any way I have a couple of questions.

1. How to set in all TF, with out change input.

2. I would to know how can we get email alert to our mails or mibiles..

many thank in advance

 

email alert

increase:
Here is an MTF version I did for you with alert

Dear Sir:

Thank you in advance for post this modifyed E.A.

I would to know if is possible do the setting to get Email alert for this E.A.?

Many Thanks

 
increase:
Any help with this one please?

I am using an arrow indicator in an EA, so when I activate the EA I do not get a value via icustom until the first arrow appears

What is the loop to check back in the indicator and find the last arrow value?

Does anyone have the answer to this one?

I have and indicator that shows up and down arrows and I want to use it in an EA, but I only get a signal when there is a new arrow, so when you first load the EA you have to wait for the next arrow for it to initiate a trade.

How do I read backwards to find the last indicator arrow when the EA starts?

 
increase:
Does anyone have the answer to this one?

I have and indicator that shows up and down arrows and I want to use it in an EA, but I only get a signal when there is a new arrow, so when you first load the EA you have to wait for the next arrow for it to initiate a trade.

How do I read backwards to find the last indicator arrow when the EA starts?

Thanks I figured it out

 
Roger09:
Show me this indicator, I think I can fix it.

There you go!!!

Please help me to move the line.

--------------------------------------------------------------------------------

The indicator works as it was design. Sound alarm when price touches the line but i want to expand on that. I want this:

Copy the indicator below then do this 2 modifications:

modification #1:

create a line stoploss1(is already there) and move the line to where ever my stop loss is if i do not have an stop loss set move the line 500 pips away to prevent the alarm from being activated.

modification #2:

Create a line takeprofit1(this is not in the code) and move the line to where ever my stop loss is if i do not have a stop loss set move the line 502 pips away to prevent the alarm from being activated. Also use different sound alert.

Pretty much the indicator will be checking what my stop loss and take profit is and will move at they respective prices if stop loss and take profit is not set will move the lines 500,502 pips away.

That way when the market hit my profit or stop loss the sound will let me know when im not looking at metatrader or have the window minimize, and i can go back i see what other set up i may have.

Thank you very much for your help brother.

//+------------------------------------------------------------------+

//| HLine Alert.mq4 |

//+------------------------------------------------------------------+

#property copyright ""

#property indicator_chart_window

extern string LineName="Stoploss1";

extern color LineColor=Red;

extern int LineStyle=STYLE_SOLID;

extern int AlertPipRange=1;

extern string AlertWav="Alert2.wav";

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

//---- indicators

//----

return(0);

}

//+------------------------------------------------------------------+

//| Custom indicator deinitialization function |

//+------------------------------------------------------------------+

int deinit()

{

//----

//----

return(0);

}

//+------------------------------------------------------------------+

//| Custom indicator iteration function |

//+------------------------------------------------------------------+

int start()

{

int counted_bars=IndicatorCounted();

ObjectCreate(LineName, OBJ_HLINE, 0, 0, Bid);

ObjectSet(LineName, OBJPROP_STYLE, LineStyle);

ObjectSet(LineName, OBJPROP_WIDTH, 2);

ObjectSet(LineName, OBJPROP_COLOR, LineColor);

double val = ObjectGet( LineName, OBJPROP_PRICE1);

if (Bid-AlertPipRange*Point = val) PlaySound(AlertWav);

//----

//----

return(0);

}

//+--------------------------------------------------------------

Reason: