Ask! - page 49

 

Hi,

I am new to MQL4 and would like to write a program that will compare the current Histo bar to the previous Histo bar in MACD and generate an alert saying Histo bar is longer (or shorter) than previous Histo bar. So far I have not been able to figure it out. Any help will be very much appreciated.

 

Code for offsetting Arrow away from Candle?

Hi there, i have searched through FXtsd for anything on what the code for offsetting Arrow away from Candle would be and have found nothing. Thought i'd come to this "Ask" thread and ask ... grin.

All i want to do is place the arrows further away from the candles so they don't block the view of price action.

Is there just a simple tweak to the object draw code to do this?

Thank you in advance,

Thom

 

How to make EA open buy position eventhough there is sell position still open and vice versa? Buy when there is buy signal and sell when there is sell signal

 

Need EA source code..

Dear Coders Guru..

You're my real Guru...

I try to understand your lesson, but my limited knowledge and since I'm not a programmer also my poor english make me difficult to understand and learn MQL programing..

can you help me to make an source code for the EA, you only give me the source code..then I will enter the formula by myself

So I only enter the formula when to execute sell or buy and when to close the order.. that's all, sorry for my poor english.

Regards

Pj

 

Sorry that i am answering as i am not Guru and not Coder.

We have Templates to create EAs and Indicators. It is source code variations.

 
newdigital:
Sorry that i am answering as i am not Guru and not Coder. We have Templates to create EAs and Indicators. It is source code variations.

Thank's newdigital...

 

Can you display text/numbers in colour?

Is it possible to display the text/numbers on an indicator in different colours? If so, how? As an example, I want to show the relevant numbers on the absolute strength indicator in the same colour as the lines in the window. Any help/suggestions would be gratefully received.

Thanks

Files:
 

I have an EA that does not backtest correctly. The backtest only shows one trade, even though more trades were generated than that. If I start the backtest on January 1 to present, it will show the first trade generated on or after January 1. If, for example. the first trade was opened on January 3rd and closed on January 8th, it will only show that trade and no more after that. I then have to restart the backtester from January 8 to present to get the next trade to show up on the backtester. It won't show all the trades at once. No problems show up in the journal tab. Any ideas?

 
reiver:
Is it possible to display the text/numbers on an indicator in different colours? If so, how? As an example, I want to show the relevant numbers on the absolute strength indicator in the same colour as the lines in the window. Any help/suggestions would be gratefully received. Thanks

Hi

I do not think that you can alter the colors of those readings however you can write new code to place the readings in different colours in the same window. You must use the indicator name in the code -

IndicatorShortName("MACD");

double P = Period();

ObjectCreate("MACDMTF4_v2", OBJ_LABEL, WindowFind("MACD") , 0, 0);

ObjectSetText("MACDMTF4_v2",DoubleToStr( P,Digits-4), 15, "Arial", CadetBlue);

ObjectSet("MACDMTF4_v2", OBJPROP_CORNER, 0);

ObjectSet("MACDMTF4_v2", OBJPROP_XDISTANCE, 430);

ObjectSet("MACDMTF4_v2", OBJPROP_YDISTANCE, 0);

This is label code on a MACD indicator showing the Period - Timeframe in the indicator window, and of course if you can find the code that provides the number read outs for your indicator then they can be inserted into the code at P

cja

 

Question that needs your help!

#property indicator_level1 0.14

This creates a level of 0.14 that uses dash marks. How do I get it to use a solid line level, versus dash level from the program indicator??

Your Help is Appreciated!

Dave

<<<

Reason: