| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack (2) | Thread Tools | Display Modes |
|
|||
|
Quote:
But, you could aswell use global variables for this. Example of init: int init() { TakeProfit=TakeProfit*Point; StopLoss=StopLoss*Point; TrailingStop=TrailingStop*Point; breakEven=breakEven*Point; return(0); } These are extern variables and you set takeprofit to 50 for example if you want 50 pips. But for this to work in the EA it must be multiplicated with the pip value of the currency 0.001 for example.
__________________
boo Last edited by SimonF; 02-24-2008 at 07:10 PM. |
|
|||
|
re: Coding Knowledge Questions
Quote:
Thanks. Please help make it clear: Does this mean a static variable holds the last value assigned to it even though it is not global? Regarding init(), it looks like it is used as a setup function. - Can you tell me other good examples for it? - Do you have to follow it with deinit()? Big Be |
|
|||
|
Ask
Quote:
I want to learn mql directly from you i have read your tutorial and i have been coding couple of EA. |
|
|||
|
ma color based on closing
HI,
is there any ma indicator that color change according to the close of the candle.For example if the candle close above SMA then the line color is blue but if below MA then the color will change to red. I know there is a indicator that has called "ma_in_color.mq4" sorry but i don't know how to post it, my question is, of there is anybody out there, who could program an sound alert in this indicator. thx a lot |
|
|||
|
Quote:
The other questions someone else might want to answer as I'm not sure.
__________________
boo |
|
|||
|
Limit orders per bar
Hi I have a quick question. Im trying to code an EA where I will only be able to open one trade per bar. So when I use the 1H timeframe I can only open one order. I tried to add this line to limit the amount of orders, but it does not work.
TimeCurrent()-OrderCloseTime()>60*60 Thanks! |
|
|||
|
How to change alert into trading EA
Hi Guys,
How do you change an alert indicator into a trading EA? I've tried changing the command Alert(Symbol()+" "+Period()+" XO Long ",Bid); into OrderSend(Symbol(),OP_BUY,0.01,Ask,3,20,20,"XO-CCI",1,0,Blue); at the start I chose menu to make EA, then content of my alert indicator, i copied to this EA, then I changed the command alert to trading command as above, then i compiled. But the compiled EA is not making any trade after i tried it on 1M chart for a day. Please help. |
![]() |
| Bookmarks |
| Tags |
| histogram, forex, ZUP_v1.mq4 |
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/questions/270-ask.html
|
||||
| Posted By | For | Type | Date | |
| OzFx System:) - Page 639 | This thread | Refback | 06-21-2008 10:53 PM | |
| Forex SRDC Sidus Sibkis EA MT4 Forum OTCSmart | This thread | Refback | 12-08-2007 12:46 PM | |