Scripts: Period Converter

 

Period Converter:

Use this script to make own nonstandard timeframes.

Author: MetaQuotes Software Corp.

 
This is awesome...
So far, I only tried it when the market was closed so i haven't actually seen the offline chart being updated (but I like the refresh mechanism)
However, I had to add a short sleep function in order to prevent my CPU from being hogged.

Just before the end of the while loop:
        // [amg]
        // Going to sleep for 50ms, waiting for a new tick to arrive...
        // Otherwise, 100% CPU is incurred
        Sleep(50);
        // [amg]
 
amg:
This is awesome...
So far, I only tried it when the market was closed so i haven't actually seen the offline chart being updated (but I like the refresh mechanism)
However, I had to add a short sleep function in order to prevent my CPU from being hogged.

Just before the end of the while loop:
        // [amg]
        // Going to sleep for 50ms, waiting for a new tick to arrive...
        // Otherwise, 100% CPU is incurred
        Sleep(50);
        // [amg]

Is it possible to use this to go to a chart say a 6 second chart ? how would I set parameters up ?




Reason: