How to code? - page 244

 

Detrend Price Plot Indicator

Hello everyone,

I'm trying to figure out how to draw histogram bars that are not anchored to the zero line in the indicator window.

I basically want to subtract the price high and low of a bar from a moving average and plot it around a zero line for cycle analysis.

Any code snippets or directions to similar indicators would be wonderful (this is not the same as the current detrend oscillator). Attached is what it looks like in excel. Thank you! Cheers.

Gaf

Files:
untitled-1.jpg  137 kb
 
syk1kz:
thanks, but i thought the problem is external variables like "NewsTime" wont accept anything other than a static variable

you could set it using the script, but then you couldnt change it ?

is that correct?

I mean:

Add to EA (in start block):

int start() {

NewsTime = GlobalVariableGet("GlobalNewsTime");

...

}

[/CODE]

In script write something like this:

[CODE]#property show_inputs

extern datetime NewsTime = D'05.08.2010 10:15';

int start() {

int iDateTime = GlobalVariableSet("GlobalNewsTime", NewsTime);

}

When You drop the script to chart (any pair), it ask for external variables (becouse of #property show_inputs). Set NewsTime to what You need. Then all EAs in all charts read this new date (on next tick) from global variable named GlobalNewsTime, so no need to change anything in EAs settings. This global variable with Your new date will be maintained even after you restart the terminal, and EAs will read and use it until You change or delete this global variable

PS Sorry for my english

 

Sound Alert and Arrow in indicator QQE

Hi all,

I need help to code the Indicator QQE, I want a sound alert and a arrow when the blue line cross the yellow line.

Arrow Up when the bue line cross up the yelow line, and Arrow Down when the blue line cross down the yelow line.

The arrows and the sound alert must be appear in the next candle when the blue and yelow lines crosses.

Can any body help me??

Thanks very much to all.

(The indicator attach have alert when the blue line crosses 0)

Files:
 

Thanks, Kalenzo

Thanks, Kalenzo.

 

If someone could please help, they can use this profitable ea

Hi guys.

Would someone be able to shed any light on modifying the order send function in an ea, so that it can operate with a market excecution broker.

I am aware that you can not have a stop loss and take profit attched to order send with this sought of excecuttion so I am wanting this modifyied

so that it places the naked buy or sell order, then places the stop loss, take profit and breakeven afterwards.

If someone is happy to do this for me, I can send them the EA.

Thanks very much

Bennay

 

You have to use an order send command without setting the SL and TP parameters or any other parameters that ECN don't accept, e.g slippage (I don't know because I have never used an ECN broker).

Then you have to send an order modify command to set the other parameters you want. Modify the order using the ticket number.

To get the ticket number when you do the OrderSend command just put:

Ticket_Long1 = OrderSend(.........)

Chris

Edit: From re-reading your post, I have the impression that you do not code MQL and that the above will sound like dribble to you, so send me the EA and I will do it for you.

 
chrisbenjy:
You have to use an order send command without setting the SL and TP parameters or any other parameters that ECN don't accept, e.g slippage (I don't know because I have never used an ECN broker).

Then you have to send an order modify command to set the other parameters you want. Modify the order using the ticket number.

To get the ticket number when you do the OrderSend command just put:

Ticket_Long1 = OrderSend(.........)

Chris

Edit: From re-reading your post, I have the impression that you do not code MQL and that the above will sound like dribble to you, so send me the EA and I will do it for you.

Hi chris, thanks for your help, will send it through and let you know my settings and how ive been using it. What is your email addy? cheers

 

..................

 

I tried to PM you but I need 10 posts so I will post it here:

chrisbenjy26@hotmail.com

Chris

 
chrisbenjy:
I tried to PM you but I need 10 posts so I will post it here:

chrisbenjy26@hotmail.com

Chris

sent. Look foward to hearing back.