[FAQ] How to Get Help

Read before posting.
User avatar
TJ
Posts: 6586
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1907 times

[FAQ] How to Get Help

Postby TJ » 10 Jan 2013

1. [FAQ] How to Post Codes ... so that people can read.

When you post codes without code tags, they look like ordinary text.
If your post is long and with intertwining code and texts, the codes will blend in with your message, making it difficult to read (and comprehend). If you are asking for help, you would want to make it as easy as possible for people to help you, including making your codes easy to read.


Untagged codes look like this: everything is intertwined in a confused mess

can someone help me with this code? it is not doing what I want. It compiles and plots
but does not give correct value.
Function for DMI Oscillator;
inputs: Price( Close ), Length( 20 ), ConfirmBars( 1 ), //MA
FastLength( 12 ), SlowLength( 26 ), MACDLength( 9 ) ; //MACD
variables: var0( 0 ), //MA
var1( 0 ), var2( 0 ) ; //MACD
var1 = MACD( Close, FastLength, SlowLength ) ;
var2 = XAverage( var1, MACDLength ) ;
ps. Oscillator value should be above zero line when +DMI is above -DMI.
You cannot tell the difference between the code and your message.


You can show the codes separately in a Code Box, with formatting, thus making reading easier.

Tagged code looks like this -- in a box:

Code: Select all


Inputs:
Price( Close ), Length( 20 ), ConfirmBars( 1 ),  //MA
FastLength( 12 ), SlowLength( 26 ), MACDLength( 9 ) ;  //MACD
   
Variables:
MA( 0 ) , //MA
MA.CD( 0 ) ; //MACD

MA.CD = MACD( Close, FastLength, SlowLength ) ;
MA = XAverage( var1, MACDLength ) ;


User avatar
TJ
Posts: 6586
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1907 times

2. How to Post Codes

Postby TJ » 10 Jan 2013

Here's how to tag codes:

When you are posting your message,

Step 1: Highlight the code portion of the message you are about to post. (see blue colored section below)

Step 2: Click on the </> button located at the top of the message window

That's it, you have tagged your code, and the code will be presented in a box for easy reading.
You do not have the required permissions to view the files attached to this post.

User avatar
TJ
Posts: 6586
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1907 times

3. How To Speed Up Your Help Process

Postby TJ » 15 Aug 2015

How To Speed Up Your Help Process
Have the following information ready:

Please have the following information ready (where applicable):

1. Which version of MultiCharts are you using?
-- don't just say the "latest one"; go to MultiCharts>Help>About and copy the version number

2. Who is your broker/dataprovider?
-- What is the version of the broker software?
-- Does it require Java?
-- Is this a demo account? or paper trading account?

3. What is the instrument? What is the symbol? How many data streams?
(does the problem happen to all the symbols?)

4. What is the chart resolution? 5 min? tick? 24 hr session?
(does the problem happen to all the chart resolutions?)

5. When do you observe this problem?
Portfolio trader? Real time? Backtest? Walk forward test? Optimization? After hour? Fast market?

6. Describe your problem, and tell us your expectation;
-- don't just only say "it is not working". (see post #4 below)
-- if you copied the code from the internet, tell us where did you find it. Give us the background, so that we do not have to do unnecessary detective work.

7. Take a screenshot of the error message. Don't just say "it has error", or "it won't compile".

8. Post your codes. Nobody can give you coding help if you don't post your codes.

9. Post screenshots of your chart. Draw diagrams. (Write notes on the picture to point out the problem area).
10. Make a video if the problem is a moving target.

This is a good example of presenting your problem
viewtopic.php?f=1&t=50847

If the problem is system or environment related,
11. What is your hardware? CPU, RAM, Harddisk, SSD? RAMDisk?
12. What is your operating system? 32 or 64 bit? Are you using it on top of Apple or Linux OS?
13. What is your internet service? What type of router?
14. Is this a hosted system at a remote site? VPS? or shared system in a server?
15. Have you changed any registry settings?
16. Do you use anti-virus? firwall? VPN?
17. What other programs you are running? Browser? Games? Screencapture?

User avatar
TJ
Posts: 6586
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1907 times

4. Debugging YOUR code

Postby TJ » 15 Aug 2015

How to Get Help -- Don't just say... "It is not working"
Tell us what is not working
Tell us when is it not working
Tell us where is it not working
Tell us what is the expected behavior

Subtitle: Debugging YOUR code
Subtitle: Take ownership of your code !!!
Subtitle: Take ownership of your problem !!!
Subtitle: Be specific with the problem you encountered, and tell us your needs.


We cannot read your mind.
We can only help you with the information you provide us.

1. Don't just say "It is not working", or "It's wrong", or "It's won't compile".
We cannot see your computer screen, and we cannot read your mind.
You need to describe the problem, make print outs, post your codes,
-- MAKE A SCREEN SHOT OF YOUR CHART --
-- write notes on the chart to point out the problem.
-- MAKE A SCREEN SHOT OF THE ERROR MESSAGE --

2. Tell us where did you get the code.
Did you write it yourself? or did you copy it from somewhere?
Tell us the background of this code -- don't make us guess in the dark.
-- POST THE CODE --
-- POST THE SOURCE OF THE CODE --


3. Do not expect others to instantly observe the same problem you do.
Two people could be running the same script, but never experience the same problem.
If you are asking a coding question... ** Post your codes **
Tell us what your code is supposed to do.
Describe what you want to see, and describe in fact what is happening that you believe is "wrong".
Make print outs, make screenshots, write notes on the chart.
If the logic involves more than one If-Than-Else, please draw a flowchart.
A picture is worth a thousand words.

4. When and where do you observe this problem?
In the Portfolio trader? Real time or Backtest?
Walk forward test? Optimization? After hour? Fast market only?
Do you see the same problem with all the symbols?
Do you see the same problem with different chart resolutions?

5. Tell us what debugging efforts you have made, so that we do not waste time duplicating your tests.

6. Ask and Ye Shall Be Given
If you ask a general question, people will give you a general answer.
If you ask a hypothetical question, people will give you a hypothetical answer.
If you ask a specific question, people will give you a specific answer.
If you ask a coding question, post your codes.

7. Don't make people guess what you want.
We don't assume, because... It will make an ASS out of U and ME

8. Don't say "I need help" and expect someone to write the complete code for you.
-- Show us your efforts: this is your project, not ours.
-- Describe your project: Describe you want to do. Don't just say "I want this".
-- Show us your flow chart. (Google/Youtube if you don't know what it is)
-- Show us a mockup drawing. If it involves plotting, show us how it should look.
-- What is your problem? we can help you with syntax questions and logic debugs.
-- For complex projects, you might need to hire a professional programmer.

9. If you have a problem expressing your words in English, you might want to write your questions in your native language . It is easier to use Google-Translate on your native language than to guess on your wrong English words. We have users from around the World, one of us might understand.



ps. The phrase "It is not working" could mean one of a million things:
** and each problem requires a different debugging method **
a) the indicator/strategy did not compile
b) the indicator/strategy compiled, but with error message when applied to a chart
c) nothing is shown on the chart
d) the chart crashes when the study is applied
e) the chart is slow
f) the color is wrong
g) the plot disappeared
h) XYZ variable makes the wrong calculation
i) floating point error
j) the order does not trigger
k) the order triggers sometimes but not the other times
l) the order triggered for one symbol but not the other
m) the order triggered at the wrong time
n) the order triggered at the wrong place
o) wrong type of order was triggered
p) wrong quantity
q) wrong price filled
r) no trades reported
s) ...

You get the idea.

User avatar
TJ
Posts: 6586
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1907 times

5. The First Step in Debugging Your Code

Postby TJ » 22 Sep 2015

5. Stop Banging Your Head Against the Wall and Open Your Eyes.


THIS IS A #1 MUST DO before you start your debug --> Replace all the Generic Variable Names with Meaningful Names.

ie. Remove these:
value1, var01, condition1, condition2... etc.,

and Replace them with names that associate with their purposes
eg. MA20, GoingUp, New.High, etc.,


eg. REMOVE these cryptic codes:

Code: Select all


value1 = Average( close, 20 );
condition1 = value1 > value1[1];

Change them to "Read-and-Understood" codes:

Code: Select all


var:
MA20(0);
GoingUp( False );

MA20 = Average( Close, 20 );
GoingUp = MA20 > MA20[1];




You will appreciate the meaningful variable names when you have to revisit your codes 3 months from now.

ps. as a practice, I do not waste time on codes with generic variable names.

User avatar
TJ
Posts: 6586
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1907 times

6. Developing Your Strategy

Postby TJ » 13 Oct 2015

Developing Your Strategy

Click here:
viewtopic.php?f=1&t=50220



Image

User avatar
TJ
Posts: 6586
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1907 times

7. Error Messages

Postby TJ » 26 Sep 2017

7. POST YOUR ERROR MESSAGE

How could people help you if you do not let them know the error?



Image

Image

Image


Return to “MultiCharts FAQ”