Anaysis Window with time expired

HI TJ ,
I came with an idea to add some new features in analysis window.
it would be very helpful for some trader which are generate trading signal for specif time to run and stop automatically according the setting.
On the current Analysis window there are function Auto repeat and AR Interval right. i would like to suggest for add one more function might be call as a "Time Expired " this function able to run & stop the Auto repeat for specific time.
e.g : Time Expired : 07.00 am until 13.00pm with this setting the scan/explorer will be work within on that period of time. this is just simple idea perhaps you can do more complete and advance. such as add some script on it or etc.
i hope you could be add on the next upgrade version.

image

Thanks
SatyaDev

It probably sounds like a good idea but there are enough ways currently to emulate the same I guess.

If one is firing live trades or auto trading, its unanimous that the code itself contains enough validation measures for taking trades.

For example all code should be coupled with say TimeNum() <= 160000 so that no new trades are taken after that time.

hi travick
i noted that hardcode could be done on this situation with if and else condition but the analysis still run. e.g :
if (( now > 101000 ))
run this 1..
}
else
run this 2..
}

what is the function on the else section to not run the scan ? the analysis window should be stop to run any instruction.

please advise .. thanks

This is incorrect code but lets say its just a pseudocode for now.

For eg. AA auto-run is set to 1m, but this has no bearing on how you code.

You can't do this because there is no way afaik.
Unless you invoke OLE and "Close" all the AA instances or something more complex.
Enabling auto-run on/off from within the same AFL is a programming procedural paradox.

What you can do to ensure that "your code" Runs only within the Time window that you want,
you can simply enclose the whole code.

CurrentTimeNum = now(4);
if ( CurrentTimeNum > 90000 AND CurrentTimeNum < 160000 )
{
    //  ALL your code that you want to run
}
// else
// No need of an else part

Now in this case, even if AB is running 24hrs a day and Auto-Run explore/scan is running every minute, you don't need to be concerned.

Edit: Then of course AB is flexible, you can even code for weekends or check the newDay condition and then only run code. Possibilities are many.

1 Like

hi travik

thanks for share your insight ...

Suggestions should be placed in members' area Feedback Center http://www.amibroker.com/members/feedback/ Note that there are already thousands of things that are on to-do list, so new ones are likely to be put on hold unless something comes up with really amazing idea useful for everyone, not just person who proposes it.