Kindly help to write the AFL code for this

#1
Hello Folks,

Could you kindly help to write the below's afl code which used with TWS? :)

ticker = ^DJI, capital = $10000
When first buy signal is raise, then use 40% captial ($10000 * 40% = $4000) to process the first buy order.
When second buy signal is raise, then use 100% capital ($6000 * 100% = $6000) to process the second buy order.
 
Last edited:

Similar threads