Press the Alt key, then Enter and a File menu appears. Select New. Your mouse may or may not work but it doesn’t matter. Use the arrow keys to move around. In some cases the Tab key will be more appropriate.
Now type the text on the next page exactly as shown. Or you can highlite it, copy it (Ctrl+C), to notepad, save it as Forex.bas and paste it into the QBasic folder.
When you're through press the Alt button on your keyboard, highlight file, select Save and name it Forex. That's all there is to it.
To run the program simply go to File, select Open, tab down to Forex and press enter. Then press F5 and you're in business.
10 INPUT " P1 = ", A
20 IF A = 1 THEN 430
30 INPUT " P2 = ", B
40 INPUT " P3 = ", C
50 INPUT " ACCEPTABLE LOSS = ", D
60 IF B <>
70 LET L = B - A
80 LET T = L * .25
90 LET X = C + ((B - A) * .25)
100 LET F = C - (2 * 1.2)
110 LET M = C + L
120 LET G = M - X
130 LET H = (D / (X - F)) * 10000
140 GOTO 220
150 LET L = A - B
160 LET T = L * .25
170 LET X = C - ((A - B) * .25)
180 LET F = C + (2 * 1.2)
190 LET M = C - L
200 LET G = X - M
210 LET H = (D / (F - X)) * 10000
220 X = INT((X * 10) + .5) / 10
230 F = INT((F * 10) + .5) / 10
240 G = INT((G * 10) + .5) / 10
250 T = INT((T * 10) + .5) / 10
260 M = INT((M * 10) + .5) / 10
270 H = INT((H * 1) + .5) / 1
280 V$ = " ENTRY POINT: "
290 Q$ = " STOP LOSS: "
300 B$ = " TARGET: "
310 X$ = " PTS TO ENTRY: "
320 K$ = " GAIN: "
330 Z$ = " NO OF UNITS: "
340 PRINT
350 PRINT V$; X
360 PRINT Q$; F
370 PRINT B$; M
380 PRINT K$; G
390 PRINT X$; T
400 PRINT Z$; H
410 PRINT
420 GOTO 10
430 END
If you have trouble selecting Forex press tab then the down arrow. When using the program press enter after each input.
Each line executes in sequence. And, obviously, each line has a purpose. Line 140, for example, jumps over some of the others because the program adjusts for trades going both up and down.
Line 220 - 270 rounds off the numbers. Pressing 1 when “P1" is displayed will end the program and return us to the main menu.
The lines you need to be concerned with are 100 and 180. These lines contain the spread your trade is experiencing. Right now line 100 is showing (2 * 1.2). If the spread changes replace the 1.2 with the new spread. Do the same with line 180. Then Save.
When finished press Alt, select Exit and press Enter. Type exit at the C prompt to return to Windows. Like this: C:\qbasic>exit.
Of course you could also put the formula in a spreadsheet or handheld scientific calculator. But I find qbasic the best, simply because I'm already at my computer and have only to press "Alt" + tab to move to the program. Believe me, when things get hectic this program can be a lifesaver.
Here is a special guide that will help you set up the program:
http://www.forex-trading-made-ez.com/qbasic_install.pdf
If you would rather not go to the trouble of downloading Qbasic, you may wish to use an online calculator here: http://www.forex-trading-made-ez.com/forexcalculator.htm
or download a forex calculator to your PC here:
http://www.forex-trading-made-ez.com/calculator.html
0 comments:
Post a Comment