Jump to content
Medved Trader Forums

Chart freuqnecy in advanced mode

Recommended Posts

I can code in some languages but C# isn't my thing. (I can do AFL and MT4 no problem)

In the code I want to determine the chart frequency that the indicator is loaded on, so I can change the period of the SMA in the code. This is for paintbars and scans.

I just don;t know how to get that variable. I think I need to study up on C# basics.

Link to comment
Share on other sites

Hm. I didn't consider that. One way would be to take the Timestamp of the candle and subtract the Timestamp of the previous candle. The problem with that approach is that sometimes for thinly traded stocks and for pre/afterhours there are no candles for some minutes, and at the beginning of the day the difference between the timestamp of the first candle of the day and the last candle of the previous day is obviously huge.

I will provide a system variable for the frequency. Will post here when done.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...