Hey guys!
I´ve been hanging around in the shadows for a while tryin to learn from your coding knowledge.
I found this Indicator that i would love to make into an automatic trading system, seems like ot got it all.
https://www.prorealcode.com/prorealtime-indicators/hpt-heikin-ashi-smoothed/
From what i understand I need to remove the return and color parts and add the buy and sell code.
Something like the inserted code but I have come to an end of my coding knowledge. Can someone help me?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//---settings
MaPeriod= 6
MaPeriod2= 2
//---end of settings
once maOpen= Open
once maClose= Close
once maLow= Low
once maHigh= High
if barindex > 0 then
maOpen= (maOpen[ 1 ] * (MAperiod- 1 )+ Open )/ MAPeriod
maClose= (maClose[ 1 ] * (MAperiod- 1 )+ Close )/ MAPeriod
maLow= (maLow[ 1 ] * (MAperiod- 1 )+ Low )/ MAPeriod
maHigh= (maHigh[ 1 ] * (MAperiod- 1 )+ High )/ MAPeriod
haOpen= (ExtMapBuffer5[ 1 ] + ExtMapBuffer6[ 1 ] )/ 2
haClose= (maOpen+ maHigh+ maLow+ maClose)/ 4
haHigh= Max (maHigh, Max (haOpen, haClose))
haLow= Min (maLow, Min (haOpen, haClose))
if (haOpen< haClose) then
r= 0
g= 191
b= 255
ExtMapBuffer7= haLow
ExtMapBuffer8= haHigh
else
r= 255
g= 10
b= 0
ExtMapBuffer7= haHigh
ExtMapBuffer8= haLow
endif
ExtMapBuffer5= haOpen
ExtMapBuffer6= haClose
ExtMapBuffer1= weightedaverage [ MAperiod2] (ExtMapBuffer7)
ExtMapBuffer2= weightedaverage [ MAperiod2] (ExtMapBuffer8)
ExtMapBuffer3= weightedaverage [ MAperiod2] (ExtMapBuffer5)
ExtMapBuffer4= weightedaverage [ MAperiod2] (ExtMapBuffer6)
endif
if ExtMapBuffer7[ 1 ] < ExtMapBuffer8[ 1 ] and ExtMapBuffer7[ 2 ] > ExtMapBuffer8[ 2 ] and ExtMapBuffer7[ 0 ] < ExtMapBuffer8[ 0 ] then
buy 1 contract at market
endif
if ExtMapBuffer7[ 1 ] > ExtMapBuffer8[ 1 ] and ExtMapBuffer7[ 2 ] < ExtMapBuffer8[ 2 ] and ExtMapBuffer7[ 0 ] > ExtMapBuffer8[ 0 ] then
sell at market .
endif