Re: Something interesting from Chatgpt/AI please post here

131
I asked AI Perplexity to come up with a basic four session indicator instead of just three.... here it's showing Asia session, Frankfurt open, London open, and US open. You can put your own hours in, (based on chart time).
Image
These users thanked the author nomojofomo for the post (total 2):
JCCTREND, JohnL33




Re: Something interesting from Chatgpt/AI please post here

138
JohnL33 wrote: Sat Sep 28, 2024 1:45 pm TMA+CG mladen NRP_Edit_AI

These changes ensure that only the first signal for each direction (up and down) will be drawn, even if the indicator recalculates its values based on current prices. The rest of the code remains the same, maintaining all other functionalities of the indicator.

this is for current chart.next version i will try add in multiply timeframe in current chart with arrow code and color change input parameter.



"One man's trash is another man's treasure"
Hi, thank you for your effort to make us better traders, I noticed form the common of this indicator it says non repaint, but it does repaint

Re: Something interesting from Chatgpt/AI please post here

139
mafe wrote: Sun May 11, 2025 8:21 am Hi, thank you for your effort to make us better traders, I noticed form the common of this indicator it says non repaint, but it does repaint
I've analyzed the code you provided for the "TMA+CG.mq4" indicator. Let me explain how the arrow drawing logic works and confirm whether the arrows repaint or disappear.
The key section for the arrow drawing is in the start() function:

Code: Select all

// Arrow drawing logic for first signal of each direction
if (High[i+1]>upBuffer[i+1] && Close[i+1]>Open[i+1] && Close[i]<Open[i]) {
    if (lastDirection != 1) {  // Only draw if last direction was not up
        upArrow[i] = High[i]+iATR(NULL,0,20,i);
        lastDirection = 1;
    }
}
if (Low[i+1]<dnBuffer[i+1] && Close[i+1]<Open[i+1] && Close[i]>Open[i]) {
    if (lastDirection != -1) {  // Only draw if last direction was not down
        dnArrow[i] = Low[i]-iATR(NULL,0,20,i);
        lastDirection = -1;
    }
}
Looking at these elements:

The indicator includes a line that explicitly states #property description "no repaint" which is a good sign.
The arrow signal is based on completed bars (i+1), not the current bar. It looks at historical price action that cannot change once a bar is closed.
The indicator uses a lastDirection variable to track the previous signal direction, which helps prevent multiple arrows of the same type from appearing consecutively.
At the top of the indicator, there's a note stating the arrow code was designed "according to idea presented by rajiv" and "no repaint."

Based on this analysis, I can confirm that the arrows in this indicator should not repaint or disappear once they're drawn because:

They only appear based on completed bar data (i+1)
The signal conditions depend on the relationship between past bars and indicator values
The code has specific logic to prevent duplicated signals in the same direction

The arrows will remain fixed once they appear on the chart because they're based on historical data that cannot change. This is a properly designed "no repaint" indicator.

by :Claude

Anyway Thank For Testing The Indicator.
These users thanked the author JohnL33 for the post:
Abdi