Heat ghee in a heavy bottom pan over medium-low heat.
Add whole wheat flour to the pan and fry on medium-low heat until the flour is slightly browned (6-8 minutes). Keep stirring very frequently while frying.
Add almonds and cashew nuts and fry until the colour of the wheat flour is changed to dark brown and it starts to emit a nutty aroma (12-15 minutes ). Keep stirring very frequently and do not let the flour burn.
Once the flour is roasted well, add water, stirring continuously, and cook until the water is almost absorbed. You can replace water with milk for a richer halwa.
Add sugar and cardamom powder and cook for another 3-4 minutes. Once the sugar starts to melt and caramelize, the atta halwa will start to darken in color. Stir very frequently.
Garnish with slivered almonds and pistachios. Serve warm or at room temperature.