help me out to put text next to right price

 

hi im alan new in code mql4... i just learn to code indicator and learn basic thing like object and text

perhaps some one can help me on this... i have code the right price and text but it seem only the price comes out on all snr price levels..

how can i call the "v" function to convert in text next to the rigtht price symbol..

the "v" function for the right price works fine and good

i have struggle 4 to 6 days googling and recoded so many times but i got failed..

im so sad n frustrated.... hopefully someone glad to come to solve this text code structure for this..


here is the code..

if(draw_edge_price){
            
               v = zonSNR+PRICESNR+"HL"+BULLISHCount;

               
               ObjectCreate(v,OBJ_ARROW,0,0,0);
               ObjectSet(v,OBJPROP_ARROWCODE,SYMBOL_RIGHTPRICE);
               ObjectSet(v,OBJPROP_TIME1, z);
               ObjectSet(v,OBJPROP_PRICE1, m);
               ObjectSet(v,OBJPROP_COLOR,Red);  //this area seem works good and fine
               
               
               
                
               
               "dd" = zonSNR+PRICESNR+"HL"+SNDCount;   //this area cannot be compiled
               
               ObjectCreate( "dd", OBJ_TEXT,0,0,0);
               ObjectSetText( "dd", "RESISTANT",14, "Verdana", Red);
               ObjectSet( "dd", OBJPROP_TIME1, z);
               ObjectSet( "dd", OBJPROP_PRICE1, m);


hope some one can help on this text issue.... i got no clue and real codes to solve the text display next to the right price issue


please help me tq..


all ur help im so appreciated it

 
MQL_newbie:

hi im alan new in code mql4... i just learn to code indicator and learn basic thing like object and text

perhaps some one can help me on this... i have code the right price and text but it seem only the price comes out on all snr price levels..

how can i call the "v" function to convert in text next to the rigtht price symbol..

the "v" function for the right price works fine and good

i have struggle 4 to 6 days googling and recoded so many times but i got failed..

im so sad n frustrated.... hopefully someone glad to come to solve this text code structure for this..

here is the code..

hope some one can help on this text issue.... i got no clue and real codes to solve the text display next to the right price issue

please help me tq..

all ur help im so appreciated it

The documentation tells you everything you need.

https://docs.mql4.com/objects

Object Functions - MQL4 Reference
Object Functions - MQL4 Reference
  • docs.mql4.com
Object Functions - MQL4 Reference
 

Also this code you posted....

"dd" = zonSNR+PRICESNR+"HL"+SNDCount;   //this area cannot be compiled

Variable names cannot be surrounded by quotes.

"dd" is a value

dd is a variable

- jack

 
Jack Thomas:

Also this code you posted....

Variable names cannot be surrounded by quotes.

"dd" is a value

dd is a variable

- jack


hi jack thomas tq for replying...


if i put  without quotes it is compiling but its the seem the text doesn't come out...


so how to call v function as well as the symbol_rightprice prices


any idea how to code the right way... still fail to recode back here...


hope jack thomas can show me how to call the dd function into text...

ill appreciate ur help.... tq ... waiting for sample code how to call the function..

here is the the function when i not call the dd function

dd text without call dd function

 
MQL_newbie:

hi jack thomas tq for replying...

if i put  without quotes it is compiling but its the seem the text doesn't come out...

so how to call v function as well as the symbol_rightprice prices

any idea how to code the right way... still fail to recode back here...

hope jack thomas can show me how to call the dd function into text...

ill appreciate ur help.... tq ... waiting for sample code how to call the function..

1) You didn't write this code. It's obvious because you don't understand the difference between a variable, a value, and a function.


2) I already provided you the link to the documentation which has examples of how to work with objects.



any idea how to code the right way... still fail to recode back here..


3) If you want people to help you, you need to put in a little effort.


Documentation

https://docs.mql4.com/


Tutorial Book

https://book.mql4.com/


You can also hire someone to write the code for you.

https://www.mql5.com/en/job/new


- Jack

MQL4 Reference
MQL4 Reference
  • docs.mql4.com
MQL4 Reference
 
MQL_newbie:

hi im alan new in code mql4... i just learn to code indicator and learn basic thing like object and text

perhaps some one can help me on this... i have code the right price and text but it seem only the price comes out on all snr price levels..

how can i call the "v" function to convert in text next to the rigtht price symbol..

the "v" function for the right price works fine and good

i have struggle 4 to 6 days googling and recoded so many times but i got failed..

im so sad n frustrated.... hopefully someone glad to come to solve this text code structure for this..

here is the code..

hope some one can help on this text issue.... i got no clue and real codes to solve the text display next to the right price issue

please help me tq..

all ur help im so appreciated it

Forum on trading, automated trading systems and testing trading strategies

Something Interesting to Read

Sergey Golubev, 2017.09.16 05:40

Expert Advisor Programming for MetaTrader 4


This book will teach you the following concepts:

  • The basic of the MLQ4 language, including variables and data types, operations, conditional and loop operators, functions, classes and objects, event handlers and more.
  • Place, modify and close market and pending orders.
  • Add a stop loss and/or take profit price to an individual order, or to multiple orders.
  • Close orders individually or by order type.
  • Get a total of all currently opened orders.
  • Work with OHLC bar data and locate basic candlestick patterns.
  • Find the highest high and lowest low of recent bars.
  • Work with MetaTrader’s built-in indicators, as well as custom indicators.
  • Add a trailing stop or break even stop feature to an expert advisor.
  • Use money management and lot size verification techniques.
  • Add a flexible trading timer to an expert advisor.
  • Construct several types of trading systems, including trend, counter-trend and breakout systems.
  • Add alert, emails, sounds and other notifications.
  • Add and manipulate chart objects.
  • Read and write to CSV files.
  • Construct basic indicators, scripts and libraries.
  • Learn how to effective debug your programs, and use the Strategy Tester to test your strategies.

All of the source code in this book is available for download, including an expert advisor framework that allows you to build robust and fully-featured expert advisors with minimal effort.

Forum on trading, automated trading systems and testing trading strategies

Something Interesting to Read

Sergey Golubev, 2017.09.16 05:48

Expert Advisor Programming for MetaTrader 5


This book will teach you the following concepts:

  • Learn the basics of MQL5, including variables and data types, operators, functions, event handlers, and object-oriented programming.
  • Place, modify and close market and pending orders.
  • Calculate, verify and add stop loss and take profit prices to an open position.
  • Add a flexible trailing stop and/or break even stop to your strategy.
  • Manage your trade risk with money management.
  • Use pending orders to scale in and out of positions.
  • Use price, time and indicator data in your expert advisors.
  • Control program execution by trading on new bar open, and add flexible trade timers to your strategies.
  • Walk through the creation of several basic trading strategies from start to finish.
  • Inform the user with dialog boxes, email alerts, mobile notifications and sounds.
  • Draw trend lines, arrows and text labels on the chart.
  • Read and write data to CSV files.
  • Learn the basics of creating indicators, scripts and libraries in MetaEditor.
  • Debug, test and optimize your trading strategy.
  • And much more!

Whether you’re an experienced programmer moving from MQL4, or a novice just starting with MQL5, this book will give you the foundation to quickly program fully-featured and robust trading systems.

 

i just new code in modifying indicators.. dont know about ea.. sorry fernando....

 
MQL_newbie:i just new code in modifying indicators.. dont know about ea.. sorry fernando....

Whether it is an Indicator or an EA or a Script, you lack the basic coding skills that applies to all of them.

So, you should concentrate on first learning the basic coding skills which the book (or other books) provide:

This book will teach you the following concepts:

  • The basic of the MLQ4 language, including variables and data types, operations, conditional and loop operators, functions, classes and objects, event handlers and more.
  • Place, modify and close market and pending orders.
  • Add a stop loss and/or take profit price to an individual order, or to multiple orders.
  • Close orders individually or by order type.
  • Get a total of all currently opened orders.
  • Work with OHLC bar data and locate basic candlestick patterns.
  • Find the highest high and lowest low of recent bars.
  • Work with MetaTrader’s built-in indicators, as well as custom indicators.
  • Add a trailing stop or break even stop feature to an expert advisor.
  • Use money management and lot size verification techniques.
  • Add a flexible trading timer to an expert advisor.
  • Construct several types of trading systems, including trend, counter-trend and breakout systems.
  • Add alert, emails, sounds and other notifications.
  • Add and manipulate chart objects.
  • Read and write to CSV files.
  • Construct basic indicators, scripts and libraries.
  • Learn how to effective debug your programs, and use the Strategy Tester to test your strategies.
Don't be so quick to refuse investing in your education!
 

ok TQ... Fernando Carreiro


for your advice.... ill want to study i show the simple parameters but no one get a simple clue too...

such use the .. .. .. then ill google it and find some info and continue to recode it back... thanks again..

 
MQL_newbie: for your advice.... ill want to study i show the simple parameters but no one get a simple clue too...

such use the .. .. .. then ill google it and find some info and continue to recode it back... thanks again..

You were given "clues" by @Jack Thomas and he explained to you what was wrong and how to correct it.

Unfortunately you did not understand those "clues" and guidance because you still don't understand the "basics".

If you were trying to learn "klingon" and asked for advice from a "klingon" and he answered you in "klingon" - how would you understand the answer if you still don't know how to communicate in "klingon"?

The same applies here - you first have to learn the "basics" of coding before you will understand any of the advice given to you in the coding!

The book is available online and it is not that expensive. Do yourself a favour and read it (or any other book on the subject). We are giving you guidance, so don't ignore it.

 
Fernando Carreiro:

You were given "clues" by @Jack Thomas and he explained to you what was wrong and how to correct it.

Unfortunately you did not understand those "clues" and guidance because you still don't understand the "basics".

If you were trying to learn "klingon" and asked for advice from a "klingon" and he answered you in "klingon" - how would you understand the answer if you still don't know how to communicate in "klingon"?

The same applies here - you first have to learn the "basics" of coding before you will understand any of the advice given to you in the coding!

The book is available online and it is not that expensive. Do yourself a favour and read it (or any other book on the subject). We are giving you guidance, so don't ignore it.

I really hope you will not start with "no common language to communicate".