Help in Autotrading -- INTRABARPERSIST

Questions about MultiCharts and user contributed studies.
ppan
Posts: 106
Joined: 31 Jan 2007
Has thanked: 2 times

Help in Autotrading -- INTRABARPERSIST

Postby ppan » 09 Sep 2009

I have the following code in a 1 min chart. I use it for autotrading. After I turn on the autotrading, no buy signal present. If I delete the "INTRABARPERSIST", the buy signal can be executed. Is there anything wrong with my code? Or something wrong with the MC?

Code: Select all

//------------------------------------------------
VARS: INTRABARPERSIST TRADE(0);

[INTRABARORDERGENERATION = TRUE]

IF GETAPPINFO(AISTRATEGYAUTO) = 1 THEN BEGIN

IF LASTBARONCHART AND TRADE = 0 THEN BEGIN
   BUY ("B1") NEXT BAR AT MARKET;
   TRADE = 1;
END;

END;

//------------------------------------------------------

ppan
Posts: 106
Joined: 31 Jan 2007
Has thanked: 2 times

Postby ppan » 15 Sep 2009

Did anyone try and has the same problem?

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 21 Sep 2009

Dear ppan,

Here is nothing wrong in your code and there is nothing wrong in MC (in this case).

I would suggest you to read MC help to get details on how backtesting works in MultiCharts and which assumptions model is used.


Return to “MultiCharts”