Please help convert BrainTrader indicator to lua. format Thanks please see the attachment Amongst them the Sig and Stop ones are most important Following is the instruciton
BrainTrend1 and BrainTrend2 are market direction indicator . It shows trend direction by colors, when the market changes to or stays in an up-trend, the bars become or remain BLUE. When the market changes to or stays in a downtrend, the bars become or remain RED. When the market goes sideways or is not strong on either side, the bars become or remain green . BrainTrend1 and BrainTrend2 indicators can work with any time bar charts.
BrainTrend1Sig and BrainTrend2Sig are semi-system indicators, which integrates the time-proven BrainTrading trading rules and generates BUY or SELL signals.
BrainTrend1Sig will provide a buy signal with a big Cyan dot when buy conditions are met. The value of the big cyan dot is the initial stop for the position. BrainTrend1Sig will provide a sell signal with a big Magenta dot when sell conditions are met. The value of the big dot is the initial stop for the position.
BrainTrend2Sig will provide a buy signal with a big Blue dot when buy conditions are met. The value of the big Blue dot is the initial stop for the position. BrainTrend2Sig will provide a sell signal with a big Red dot when sell conditions are met. The value of the big Red dot is the initial stop for the position.
BrainTrend1Stop and BrainTrend2Stop are trend-stop indicators, and are demonstrated by multicolored dots. For distinguishing purposes, BrainTrend1Stop uses Cyan and Magenta dots, and BrainTrend2Stop uses Blue and Red dots.
IMPORTANT!
BrainTrend1StopLine and BrainTrend2StopLine are the same as BrainTrend1Stop and BrainTrend2Stop but in form of Line for pictorial presentation of BrainTrend1Stop and BrainTrend2Stop indicators. You may use these indicators or not.
Both BrainTrend1Stop and BrainTrend2Stop must identify a trend first then begin to paint the dots. This is why you may not see any dots sometimes.
Cyan or Blue Dots below the lows of the bars indicate two things:
(1) the market is in an up-trend;
(2) the values of the Cyan or Blue Dots are the protection stops or the profit target stops (if the position had profit) for the long position. The value of the Cyan or Blue points can be seen in the Data Window after moving your mouse pointer to this indicator point.
The Magenta or Red Dots above the highs of the bars indicate two things:
(1) the market is in a down-trend;
(2) the values of the Magenta or Red Dots are the protection stops or the profit target stops (if the position had profit) for the short position. The values of the Magenta or Red points can be seen in the Data Window after moving your mouse pointer to this indicator point.