Risk warning

All articles, strategies and indicators are just reflecting a single traders opinion and should be viewed as that.
I advice everybody to trade with a DEMO account!

Sunday, January 9, 2011

New dealbook ver 2.21.73 Beta

GTF is making continuously improvement on their deal book. I have been testing out their latest version:
version 2.21.73 Beta. I saw the following improvements:

- The programs loads a lot faster, operation is a lot smoother
- It is now possible to use "global" variables.

This is what i have been waiting for a long time. It is now possible to store a variable that isn't lost when the strategies run.

I will give an example :
*************************************************************
number SL; {=> here i store a global variable}

strategy test;

input lots = 1;

begin

series fast;
bool longallowed,shortallowed; {local variable are store here now }
integer currentbar;


currentbar := back(close);
if currentbar < 100 then return;
Fast_Stochastics();
fast:=Fast_Stochastics.line_d;

if fast[currentbar]<20 then
begin
buy(lots);
SL:= low[currentbar-1]; { here is put a stop loss level in the global variable}end;

if close[currentbar]<SL and long() then {here i check is close is under stop loss level}begin
if long() then exitlong();
end;

if fpl()<-5 then
begin
if long() then exitlong();
end;
 
end.
*************************************************************

Great job GTF :-)

7 comments:

  1. hello,

    is it possible to find an equation with 2 unkown variable ? For exemple:

    I don't manage this equation: y = (5*x)+(1*x)

    i try to find "x" .

    "y" mustn't be more than 50.

    How to find "x" to do "y" less than 50?

    i tried a lot of loop but i didn''t the right one.

    Can you help me?

    I am not english so sorry for my bad speaking.

    ReplyDelete
  2. if Y=5*X + 1*X
    than Y=6*X
    and X=Y/6
    take the 2 extremes
    X=50/6=8,33
    x=0/6=0
    so the answer is
    that x can between 0 and 8,33 for Y to be smaller than 50

    ReplyDelete
  3. I can find x . but i d'ont know how to write in CTL IDE...

    ReplyDelete
  4. If you explain exactly what the code must do. I can try to write it for you..

    ReplyDelete
  5. it's ok for me. thanks a lot for your answer.

    ReplyDelete
  6. Hi thanks for the blog. it's very helpful.

    i'm trying to figure out how to initialize a global variable. is it possible with the new global variable feature?

    ReplyDelete
  7. Yes it is. Example

    number profit:=0.0;

    strategy example;
    input lots=1;
    begin
    ........

    ReplyDelete